Solved

How to configure IIS for Asp.net

Posted on 2008-11-01
10
3,063 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
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
 

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now