Created On: 01 July 2011
Problem:
ASP.NET Web Services and Web Sites developed with Studio Enterprise Edition 6.0 run correctly under IIS in the development environment but the same applications when deployed to a production computer with only Server Enterprise Edition 6.0 installed do not run correctly.
Error page states that Object Reference not set to an instance...
What is the problem?
Error page states that Object Reference not set to an instance...
What is the problem?
Resolution:
There is a problem with the Server Enterprise Edition 6.0 product in that it does not include the COBOL compiler so ASP.NET Web Services and Web Sites that need to be compiled "on-the-fly" cannot be.
The following are the rules that should be followed when deploying an ASP.NET Web Service or Web Site under Server Enterprise Edition 6.0:
------------------------------
This can be done by using the Publishing option of Visual Studio under the Web Site menu option.
The following are the rules that should be followed when deploying an ASP.NET Web Service or Web Site under Server Enterprise Edition 6.0:
------------------------------
You must install the Server Enterprise Edition 6.0 product on your production computer that runs IIS.
You must also install a .NET Server license using Apptrack in order for the Web Service or Web Site to run.
This is in addition to the standard Server EE 6.0 license that allows you to run native Windows applications.
Contact your local Sales Representative to obtain a .NET license if you do not already have one.
Because the Micro Focus Server products do not provide a development environment, e.g. a compiler an ASP.NET Web Service or ASP.NET Web Site must be precompiled before it can be deployed to a production computer.
This can be done by using the Publishing option of Visual Studio under the Web Site menu option.
Select a folder on the local drive of the development computer in which to place the compiled application and publish it to this folder.
1. Copy this folder hierarchy to the computer on which you wish to deploy, i.e. C:\\MySite.
2. On the target computer start Windows Explorer and navigate to the C:\\MySite folder, right click on your file with the .asmx extension (Web Services) or .aspx extension (Web Page) and select edit.
You will see something similar to the following line:
Remove the Language="COBOL" option so it looks like:
and save it and close the editor.
3. Right click on web.config in the same folder and select Edit.
You will see the following section:
You need to change the debug option to "false" and comment out the compilers section so it looks like:
4. Open up IIS Manager under Administrative Tools.
5. Navigate under Connections to the branch for Default Web Site and Right click and select Add Virtual Directory.
Alias should contain the name of your web site and Physical Path should be the top level folder, e.g. C:\\MySite.
6. In IIS, Right click on your new Alias and select Convert to Application. Click OK.
7. If you are deploying your ASP.NET Web Site or Web Service to a 64-bit OS then you have the option of doing the following:
- In IIS Manager click on the branch for Application Pools.
- In the list of Application Pools select DefaultAppPool and under Actions select Advanced Settings.
- Set the option Enable 32-Bit Applications to True and click OK.
If you choose to do this then step 3 above does not need to be done and the web.config file can be left as is.
Your Web Service or Web Site should now run correctly.
Incident #2523623
Old KB# 34216
#Server
#Enterprise
#StudioEnterpriseEdition
#netexpress
#COBOL
#EnterpriseServer