PC Review


Reply
Thread Tools Rate Thread

With different credentials.

 
 
Yahya
Guest
Posts: n/a
 
      4th Apr 2005
Dear Sirs,

I would like to run the below code using other credentials than the user
running it, how can I use different credentials?

Thank you,
Yahya

Dim msgobj

msgobj = CreateObject("CDO.Message")

msgobj.DataSource.Open(sUrl, , 3)

If msgobj.fields("urn:schemas:httpmail:hasattachment").value = True And
msgobj.fields("DAV:contentclass").value = "urn:content-classes:message" Then

msgobj.attachments.deleteall()

msgobj.fields("urn:schemas:mailheader:keywords").value = "Attachment"

msgobj.fields.update()

msgobj.DataSource.Save()

End If

msgobj = Nothing




 
Reply With Quote
 
 
 
 
Pipo
Guest
Posts: n/a
 
      4th Apr 2005
Yahya,

Check if the
WindowsIdentity.Impersonate Method
Allows code to impersonate a different Windows user is what you're looking
for

"Yahya" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Dear Sirs,
>
> I would like to run the below code using other credentials than the

user
> running it, how can I use different credentials?
>
> Thank you,
> Yahya
>
> Dim msgobj
>
> msgobj = CreateObject("CDO.Message")
>
> msgobj.DataSource.Open(sUrl, , 3)
>
> If msgobj.fields("urn:schemas:httpmail:hasattachment").value = True And
> msgobj.fields("DAV:contentclass").value = "urn:content-classes:message"

Then
>
> msgobj.attachments.deleteall()
>
> msgobj.fields("urn:schemas:mailheader:keywords").value = "Attachment"
>
> msgobj.fields.update()
>
> msgobj.DataSource.Save()
>
> End If
>
> msgobj = Nothing
>
>
>
>



 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      4th Apr 2005
You can use impersonation to have ASP.NET run under a different user
account.

For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyUserName">
password="password"/>

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Yahya" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Dear Sirs,
>
> I would like to run the below code using other credentials than the
> user
> running it, how can I use different credentials?
>
> Thank you,
> Yahya
>
> Dim msgobj
>
> msgobj = CreateObject("CDO.Message")
>
> msgobj.DataSource.Open(sUrl, , 3)
>
> If msgobj.fields("urn:schemas:httpmail:hasattachment").value = True And
> msgobj.fields("DAV:contentclass").value = "urn:content-classes:message"
> Then
>
> msgobj.attachments.deleteall()
>
> msgobj.fields("urn:schemas:mailheader:keywords").value = "Attachment"
>
> msgobj.fields.update()
>
> msgobj.DataSource.Save()
>
> End If
>
> msgobj = Nothing
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a service account be embedded in Workbook so that by default the macros are run with service account credentials and not the user credentials??? Divya Sanam Microsoft Excel Misc 0 20th Jul 2006 05:15 PM
Problem: "the credentials supplied conflict with an existing set of credentials" Mike Grishaber Microsoft Windows 2000 Active Directory 2 15th Oct 2005 02:32 PM
credentials supplied conflict w/ existing credentials melanie Microsoft Windows 2000 Security 2 22nd Jul 2004 07:39 PM
credentials supplied conflict w/ existing credentials Melanie Microsoft Windows 2000 Networking 4 22nd Jul 2004 06:41 PM
RE: Error 1219 "The credentials supplied conflict with an existing set of credentials" diasmith [MSFT] Microsoft Windows 2000 Security 0 30th Oct 2003 06:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:03 PM.