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" <> wrote in message
news:...
> 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").v alue = "Attachment"
>
> msgobj.fields.update()
>
> msgobj.DataSource.Save()
>
> End If
>
> msgobj = Nothing
>
>
>
>