How to deploy ASP.NET website in IIS 5.1

1. Registering the ASP.NET file mapping.
If you install the .NET framework before IIS, the ASP.NET run time does not recognize your ASP.NET application and will just leave everything alone and pass the raw text to the browser. 


You can use the ASP.NET registration tool (i.e. aspnet_regiis.exe command-line utility) with the -i or –s command-line parameter to make IIS recognize the ASP.NET file types: 

Systemroot\Microsoft.NET\Framework\versionNumber\aspnet_regiis.exe –i

For example, c:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –i

-I command line parameter in the above example will make all your ASP.NET web application use the ASP.NET 2.0.50727 version.

To make only one ASP.NET web application use 2.0.50727 version:

c:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –s your_web_application_folder_name

In addtion, there can be many versions of ASP.NET run time. The above example use the 2.0.50727 version. Also, each version of ASP.NET run time will use different .NET framework:
  • 1.1.4322 - register your application with .NET 1.1;
  • 2.0.50727 - register your application with .NET 2.0, 3.0 or 3.5;
  • 4.0.30319 - register your application with .NET 4.0;
To see all the versions of your ASP.NET installed on your web server, you can use the following command:

c:\Windows\Microsoft.NET\Framework\1.1.4322 \aspnet_regiis.exe –lv

or

c:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –lv

or

c:\Windows\Microsoft.NET\Framework\4.0.30319\aspnet_regiis.exe –lv

2. Create a Virtual directory
Open the Start menu and choose Programs -> Administrative Tools -> Internet Information Services to launch IIS Manager.

Right-click the Default Web Site Item. Choose New -> Virtual Directory. Enter the alias for your virtual directory. For example if your alias is tutorials4shareinfo, you can request pages using URL such as
http://localhos/tutorials4shareinfo/default.aspx
3. Next, you need to choose a directory for storing your aspx files.

4. Finally, copy your web site to the above directory.

No comments:

Post a Comment

Blog Archive

About Me

My photo
I am a software developer with roughly 5 years of experience in developing end-to-end solutions in C#, Java, C/C++, PHP and HTML/CSS/Javascript. At the moment, I am joining the Professional Doctorate in Engineering degree program in Software Technology at Eindhoven University of Technology. My areas of particular interest include software design, data structures and algorithms, problem solving, software security, embedded system, machine learning, and data science.