Search code examples
asp-classiccomiis-7.5windows-server-2008-r2

Running a COM app in Windows Server 2008 R2


My apologies if this has been answered before. I've searched for answers, but none seem applicable to my specific case.

We are migrating old software from Windows 2003/IIS 6 to Windows 2008 R2/IIS 7.5. The software is a COM app (exe, not dll), built using VB6. Recompiling/rewriting the app is out of the question.

I am looking for step by step instructions on how to migrate this application since I am a complete newbie to Win 2008 R2/IIS 7.5. Also, I've never deployed a COM app before, so this is all new to me.

I have tried several things that were suggested on other forums, but none seem to solve my problem.

When I run this ASP code:

<%@ LANGUAGE="VBSCRIPT" %>
<% 
'Response.ContentType = "text/plain"
Response.Buffer = True
Response.Write "Server Is OK"
Set ClientLog = Server.CreateObject("XFTS.FileOps")
Set ClientLog = Nothing
%>

I get the following error in the IIS logs:

2014-06-16 18:22:29 ::1 GET /serverstatus.asp |6|ASP_0178_:_80070005|Server.CreateObject_Access_Error 80 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 500 0 0 15

I have done the following:

1) copied the COM app to c:\Windows\sysWOW64

2) registered the COM app by typing the following at a command prompt elevated to administrator:

    xxxxx.exe /register

3) I set full permissions to this COM object for all the users I can think of (IUSR, NETWORK, NETWORK SERVICE, IIS_IUSRS)

4) I created a Classic .Net application pool (No managed code, enabled 32-bit applications, set pipeline to classic mode, etc.

If someone could give me step by step instructions, that would be really helpful. Many thanks in advance!

Han


Solution

  • Try this steps:

    1) Make folder for root content on any logical disk, like D:\wwworot\website and copy all web-files to this folder.

    2) Make folder for COM components, like D:\wwwroot\ActiveX and copy (or install) all COM components files to this folder.

    3) Create new Application pool in IIS manager and set his name like 'www.mysite.zone' (write down name for future)

    4) Create new website, set root folder from step 1, select application pool name from step 2.

    5) Right click on folder D:\wwwroot and give full permission for hidden user 'IIS AppPool\www.mysize.zone'. Note, hidden username is same as in step 3.

    6) Right click on folder D:\wwwroot\website and set for user IUSR readonly permissions.

    7) Open Component Services (Control Panel - Administration) and set necessary permissions for all your components. Right click on COM name, Properties -> Security. Set launch, access and configuration permission for users: IUSR, IIS AppPool\www.mysite.zon and all other.

    Also, if your COM's is 32-bit, configure application pool as 32-bit application.