E
ESmith
I created a WebService that receives customer information and I want to have
the WebService create/add a new user contact. When the webservice gets the
information and try's to instantiate an Outlook object (I'm using VS2003
w/C#):
public class OutlookContact
{
private Outlook.Application oApp;
private Outlook._NameSpace oNameSpace;
private Outlook.MAPIFolder oOutboxFolder;
public OutlookContact()
{
//Return a reference to the MAPI layer
oApp = new Outlook.Application(); <----- Die's here
oNameSpace= oApp.GetNamespace("MAPI");
....
}
the error returned is:
"System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.UnauthorizedAccessException: Access is denied.\n at
WebConnectionServices.OutlookContact..ctor() in
c:\\inetpub\\wwwroot\\webconnectionservices\\outlookcontact.cs:line 24\n
at
WebConnectionServices.BarUserFileUpload.AddNewMailContact(BarExamUserWebSafe
beu)
....
So the key thing here is: UnauthorizedAccessException
How can I "authorize" a process (in this case, my webservice) to be able to
write contacts?
the WebService create/add a new user contact. When the webservice gets the
information and try's to instantiate an Outlook object (I'm using VS2003
w/C#):
public class OutlookContact
{
private Outlook.Application oApp;
private Outlook._NameSpace oNameSpace;
private Outlook.MAPIFolder oOutboxFolder;
public OutlookContact()
{
//Return a reference to the MAPI layer
oApp = new Outlook.Application(); <----- Die's here
oNameSpace= oApp.GetNamespace("MAPI");
....
}
the error returned is:
"System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.UnauthorizedAccessException: Access is denied.\n at
WebConnectionServices.OutlookContact..ctor() in
c:\\inetpub\\wwwroot\\webconnectionservices\\outlookcontact.cs:line 24\n
at
WebConnectionServices.BarUserFileUpload.AddNewMailContact(BarExamUserWebSafe
beu)
....
So the key thing here is: UnauthorizedAccessException
How can I "authorize" a process (in this case, my webservice) to be able to
write contacts?