WebService Permissions Question

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top