Solved

How to configure IIS for Asp.net

Posted on 2008-11-01
10
3,086 Views
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.
0
Comment
Question by:mmsi
[X]
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
10 Comments
 
LVL 12

Expert Comment

by:techExtreme
ID: 22857879
Hello,

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!
0
 

Author Comment

by:mmsi
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.
0
 
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
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16391

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
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:mmsi
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.
0
 

Author Comment

by:mmsi
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.
0
 

Author Comment

by:mmsi
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.  
0
 

Author Comment

by:mmsi
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.
0
 
LVL 16

Expert Comment

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

Accepted Solution

by:
njackson60 earned 500 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.
HTH
0
 

Author Closing Comment

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

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

695 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