• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3110
  • Last Modified:

How to configure IIS for Asp.net

I recently reformatted my computer ( operating system windows xp pro) and installed vs 2005 an vs2008.  When testing an asp.net web application on my localhost Asp.Net applications are starting up using ASP.Net Development Host.  This has never been an issue before.

I went into the application properties and changed the server settings to use IIS Web Server.  The first run I received a message that I did not have IIS installed on the computer.  So I went through the process of installing IIS (add / remove components).  Apparently I did not do something correct.  

The application that I am testing works fine at work (on the localhost) however, on my machine at home it does not.  When using the asp.net development server, my test page does not completely load (browser progress bar stops)  

I created a new asp.net page with one button and it loads fine in the browser (using asp.net development server).  However, the asp.net project I am working on has special controls that I need to look at also; the application has some javascript functions.

I tried disabling Windows firewall and my antivus (AVG) but still same results. I also checked my browser properties to make sure Javascript was not disabled.

Further information,  We purchased some software (3rd party controls for asp.net) and the software package comes with an exe file the displays examples of different controls and the way they function.  I ran the exe file and the controls do not display in the browser. (they should work fine)  

Every thing I have tested works fine on my computer at work.
1 Solution

If I'm guessing it correctly, you are having problems because you installed first the visual studio (i.e. .net framework) before installing IIS, so I think is is not registered properly with the framework.
So you have to register IIS with the particular framework you are using for example like this:
Basically you have to use the utility aspnet_regiis.exe found under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz    (where vx.y.zzzz depends on the version number of .net installed on your system and which you are using)
you just open that path in command prompt and run this command: aspnet_regiis.exe -i
Hopefully It'll solve the problem. For knowing why this command has to be run if you install iis after .net framework visit the source I have pasted below.
Source: http://www.devx.com/vb2themax/Tip/18849 
Hope it helped!
mmsiAuthor Commented:
I did as you suggested.  However, my project is still starting in Asp.Net Development Server.  If I goto my project properties and change server from use Asp.Net Development to Use IIS Web Server.  I get the following message.

The Local IIS http://localhost/ specified for web project test has not been configured.  To Keep these setting you need to configure the vertual directory.  Would you like to create the virtual directory now?

However, I did solve my main issue about the controls not displaying in the browser.  At the bottom of the browser I seen an icon and the word intranet  I double clicked it and changed my internet security properties from local intranet to internet and my page fully loaded in asp.net developer server.  

I still would like my projects to start using IIS.
Gyanendra SinghArchitectCommented:
here is the step ..

Run -> inetmgr

right Click Default website - Select new -> virtual dir ...

now follow the steps and select path of your webapplication ... ...  
please refer this link for details

Now we move to change  the settings in vs so it will call your application from iis not from dev server ..

open your project/application with VS  and, in the Solution Explorer, right-click the name of the Web site
for which you want to specify an IIS Web server, In the Property Pages dialog box, click the Start Options tab. Under Server, click Use custom server.

In the Base URL box, type the URL that VS 2005 should start when running the current Web site.
You can use localhost, your machine name, or an assigned domain name for your IP.

From that point on, the VS.NET IDE will not use the internal web server,
but will use IIS to open your pages.

You must, previously, create a virtual directory for your application in the IIS Manager. Thats it

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

mmsiAuthor Commented:
I followed the steps and still same results.  I'm going to attach a few screen shots.  1) is the picture of my IIS.  2) is a picture of the message I get when i change my settings in visual studios applicion properties.
mmsiAuthor Commented:
Attached is the second file.  It looks as if my files are not being attached to the comment so this might not help.
mmsiAuthor Commented:
After configurating IIS and then changing the application properties to start with IIS I clicked the button and created a Virtual Directory.  I received the message "Virtual Directory Created".  I ran the application and the browser is not requesting a username and password.  I went into IIS and tried changing to windows Authenication but it appeared that it was already checked.  
mmsiAuthor Commented:
In the previous comment I miss typed a word.  "I ran the application and the browser is "NOW" requesting a username and password.
Gyanendra SinghArchitectCommented:
now where is you are facing problem ?
Sounds like permissions to the C:\inetpub\wwwroot directory.  ASP.NET (1.0, 1.1 and even some 2.0 installs) was notorious for messing up the permissions on the directory.  Make sure the ASP.NET worker process account has Full Control to C:\inetpub\* directories.  Be sure to cascade the permissions to all subfolders and not just the parent one.
If that doesn't work, try putting your entire project under the C:\inetpub\wwwroot\ folder - sometimes that works.
mmsiAuthor Commented:
I placed my web application in the c:\inetpub, and changed my applications web property to use IIS web server.  

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now