<< Latest Post

Saturday, January 07, 2006

Executing a Exe on a Mapped Drive through IIS

When a web application is trying to run an EXE in a Mapped drive, we would run into Security issues. I was recently trying to execute a WebApp which was just doing a CreateObject on a third party Dll.The Dll is internally trying to execute a Exe on a Mapped drive and my program fails saying ActiveX object cannot be created.Apparently IIS does not have enough permissions to run a Exe on a Mapped Drive.I even tried giving admin rights to ASPNet,IUSR and IWAM user.

After playing around with all the security settings,I finally gave up instantiating (createobject) the DLL directly through the program. The workaround is, I have created a COM+ object that does the instantiation of the third party dll. Now my program references this COM+ object and the COM+ object is given enough rights to instantiate the third party Dll. This work around works fine on Windows 2000 & Windows XP scenario.Unfortunately,I am still having trouble making this work on Windows 2003,which has much more security features than the other two.