0

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

arcane_vander
  • 73
  • 1
  • 6
  • Have you set the "activation" permission? – sharptooth Jul 18 '14 at 06:47
  • I'm sorry, but what do you mean by activation permission? In Windows Explorer properties, I gave all users full permissions to the COM exe. Was this what you were suggesting? – arcane_vander Jul 21 '14 at 18:52
  • Reading the executable is not enough - there's a COM system level permission http://stackoverflow.com/a/12975019/57428 which you have to set so that the specific user can "activate" the object. – sharptooth Jul 22 '14 at 07:40
  • one last question ... where should the INI file go? On the original Windows 2003 setup, it was placed in the C:\Windows directory. I have placed the INI in that location as well the Com application directory where the EXE was "installed" and a host of other places, but nothing seems to be working. – arcane_vander Aug 04 '14 at 20:26
  • The VB6 com app that I'm trying to migrate to Windows 2008 uses an INI file. – arcane_vander Aug 06 '14 at 13:52
  • Then it's totally up to the app where it expects the ini file. You can either try to read the code or use Process Monitor to figure out where it expects the file to be. – sharptooth Aug 06 '14 at 14:00
  • I looked through the code and it doesn't use a path. I would have never thought to use Process Monitor. Thank you for your suggestion. – arcane_vander Aug 07 '14 at 14:25
  • If the path is not specified it means "current directory" and I have no idea what that will be exactly. If you can change the code you could make it use the same folder as the executable or perhaps some path inside the `%ProgramData%` folder. – sharptooth Aug 07 '14 at 14:31
  • That's the problem ... even though I have the code, I'm not sure if I can compile it or if it's the latest version (long story). I thought it would be "current" directory, or wherever the EXE was located, but on the original 2003 installation, the EXE was located in C:\Windows\System32 and the INI was located one directory up in C:\Windows. So that got me confused. – arcane_vander Aug 08 '14 at 18:20
  • I used Process Monitor as you suggested and it was reading the INI file in C:\Windows. That did the trick. Thank you! – arcane_vander Aug 08 '14 at 19:44
  • As a side note, the COM EXE was never "registered" with Component Services. If I go to the 2003 server and pull up Component Services, the COM EXE is nowhere to be found. And yet the ASP pages work. – arcane_vander Aug 08 '14 at 19:45
  • Thank you Sharptooth for your help. Your suggestion to use Process Monitor helped me figure out what was going on with the COM app. I ended up having to use MKLINK to create symbolic links to the actual data. – arcane_vander Aug 14 '14 at 16:51
  • You're welcome. Process Monitor can help diagnose various issues like this one. – sharptooth Aug 15 '14 at 06:55

1 Answers1

0

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.

VMV
  • 576
  • 4
  • 6
  • When I create the application pool, what should I select for the .Net Framwork and the Managed pipeline mode? – arcane_vander Jul 21 '14 at 19:09
  • I left the defaults for the application pool settings (.Net Framework = 2.0; managed pipeline mode = Integrated). I followed your instructions but I kept getting access errors in the Event Viewer. After banging my head on the wall for a few hours, I stumbled across the solution to the error I've been getting (10016) and the solution was to modify the Launch/Access/Config settings under the DCOM Config tree and not the COM+ Applications tree in step #7 above. Everything works ... sort of. I don't have any more errors in the Event Viewer. Thanks! – arcane_vander Jul 21 '14 at 23:26
  • Thank you VMV. Your steps helped me figure out how to migrate the COM app to 2008. It is now working and running properly. I would have never figured out step 5. That was what was missing in all my permissioning. Interesting side note. I setup the same COM app on 4 servers, supposedly all running the same OS/policies/etc. On two of them, I did not have to add IUSR to the permissions. On the last 2, I did not add IUSR and the COM app did not work. After banging my head for a few hours, I added IUSR and the COM app started working. – arcane_vander Aug 14 '14 at 16:53