Hi
I have the below Web method in my Web service. It works fine when i debug it in Visual studio. But when i create a Web set up project and install in on the server it gives an error.
[WebMethod]
public string WebServiceTest()
{
try
{
Microsoft.Office.Interop.Outlook.Application oOutlook;
oOutlook = new Microsoft.Office.Interop.Outlook.Application(); //error
return "1";
}
catch (System.Exception ex)
{
return ex.ToString();
}
}
The exception is System.UnauthorizedAccessException}
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005."} System.SystemException {System.UnauthorizedAccessException}
How to set permissions to launch Outlook from a web application or web service?
Thanks
Ashok