Author: Hankman | Posted on: 10/18/2009 10:17:47 AM | Views : 1139

I have a web service that I am creating that binds to a running process on my machine. The service works fine when running under the development enviro, but fails to bind when deployed to IIS 5.1. The code RunningProc = Marshal.BindToMoniker("ProcInterface.ActiveX.Interface"); gives me a 
Invalid syntax (Exception from HRESULT: 0x800401E4 (MK_E_SYNTAX))

When running under IIS. The code is in an Interop assembly wrapper class that gets called from my web service. I am sure this is a security issue, because it works when run in VS2005. I gave ASPNET, IUSER_, IWAM_ admin privileges but it still does not work and tried asp.net impersonation. Are there Machine.Config/ web.config settings that can be used to enable unmanaged code to be called, or can I some how impersonate someone in my wrapper class before I call BindToMon ...

Go to the complete details ...