How to configure IIS for Asp.net

Posted on 2008-11-01
Medium Priority
Last Modified: 2013-11-07
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.
Question by:mmsi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 12

Expert Comment

ID: 22857879

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!

Author Comment

ID: 22858232
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.
LVL 16

Expert Comment

by:Gyanendra Singh
ID: 22858349
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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.


Author Comment

ID: 22859900
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.

Author Comment

ID: 22859908
Attached is the second file.  It looks as if my files are not being attached to the comment so this might not help.

Author Comment

ID: 22859956
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.  

Author Comment

ID: 22859974
In the previous comment I miss typed a word.  "I ran the application and the browser is "NOW" requesting a username and password.
LVL 16

Expert Comment

by:Gyanendra Singh
ID: 22860297
now where is you are facing problem ?

Accepted Solution

njackson60 earned 1500 total points
ID: 22873451
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.

Author Closing Comment

ID: 31512338
I placed my web application in the c:\inetpub, and changed my applications web property to use IIS web server.  

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question