CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

Fixing a broken asp.net installation. (The Web server reported the following error when attempting to create or open the Web project located at the following....) revisited

November last year I posted a story with this title. It was a fix for the error messgae above. I wasn't the only one having this problem, over time many many comments and comments on the comments were added. It should be turned into a Wiki. In this post I will try to summarize the most usefull comments.

In the original post I suggested 

  1. aspnet_regiis -i

to fix the problem. This can be done in a jiffy. In the course of the comments the most succesfull script has grown to

  1. uninstall IIS
  2. delete (rename) the inetpub directory
  3. Make sure the "Distributed Transaction Coordinator" service is running
  4. reinstall IIS
  5. regsvr32 aspnet_isapi.dll
  6. perform aspnet_regiis -i

which is quite a big job.

What shines through in a lot of the comments is that the problem is often a security setting. The many installations will set the permissions leading to an ASP.NET server working right. Correcting the permissions by hand might be a faster fix. So before you follow this script I suggest you check the ASPNET account. Does it have sufficient permissions in the wwwroot directory ? Might be a lot a faster.

<Update>Check this post for a detailed description of the security settings.</>

Peter



Comments

Peter van Ooijen said:

Hi,
The Fact that the network connection used makes the difference points imho clearly to a security issue. I think your wireles connection lacks some rights.

Peter
# February 6, 2005 3:56 AM

Walter Gaskins said:

Followed the steps to the letter and it worked!!! When I did Step #3 "Make sure the "Distributed Transaction Coordinator" service is running", I noticed that the service wasn't running. I tried to start it, but got an error. I checked the event log and there were 4 error messages related to this service not starting. One error message read as follows: "MS DTC log file not found. After ensuring that all Resource Managers coordinated by MS DTC have no indoubt transactions, please run msdtc -resetlog to create the log file." I did what it said and kept going. I was amazed when I stopped receiving the error message in VS 2003. Thanks so much for spending the time to share this information!
# February 24, 2005 1:53 AM

Manol said:

Thank you Peter!!!!!
I love you as more as I hate Bill Gates!!!!!!!!!!!11
# March 2, 2005 7:38 PM

Peter van Ooijen said:

I like Bill.....
# March 2, 2005 8:10 PM

voidstate said:

Thanks SO much. This worked perfectly.
# April 4, 2005 5:38 AM

John B said:

Thanks so much. The full and final version of this post (with all 6 steps) has saved my bacon.
# April 9, 2005 5:42 AM

Svenni said:

I have been trying to sort out this problem for 6 weeks. This did the trick. Thank you so much.
# April 11, 2005 3:34 AM

Jon said:

Worked great, thanks for the post!

Jon
# April 13, 2005 11:16 AM

Toby Dunn said:

Thanks very much for the help. This solved the problem for me too.

I mistakenly left out step #2 and it still worked:
1. uninstall IIS
2. ( I didn't do this --> ) delete (rename) the inetpub directory
3. Make sure the "Distributed Transaction Coordinator" service is running
4. reinstall IIS
5. regsvr32 aspnet_isapi.dll
6. perform aspnet_regiis -i

I am running XP Pro with SP2, VS.NET 2003.
# June 7, 2005 12:24 AM

Thiago Campos Pereira said:

Hi,
I am using VisualStudio 2003 and Windows XP 2003, with Firewall turn off
I do all steps correct and I continue with the problem.
Do you have other solution?
# June 10, 2005 6:33 AM

Thiago Campos Pereira said:

# June 10, 2005 10:44 AM

Joe said:

I had a locally installed proxy server,
I got this error message when I'd forgotten to start the proxy server service
# June 14, 2005 4:04 AM

Markus Kraus said:

I just had to give add "Read" permission to user ASPNET for drive "C:" (and subfolders) as ASP could not access the .NET Framework files otherwise.
Got the hint from the message "aspnet_wp.exe could not be started ..." in the servers application event log.
# July 5, 2005 5:24 AM

Levi said:

"check the ASPNET account. Does it have sufficient permissions in the wwwroot directory ?"

How do i check for the presence of this ASPNET account? How do i grant it permission do wwwroot directory?

I have uninstalled/reinstalled ASP many times with the same results. Thanks for any help

Levi
llevil@optonline.net
# August 18, 2005 7:22 PM

Levi said:

"
. uninstall IIS
2. ( I didn't do this --> ) delete (rename) the inetpub directory
3. Make sure the "Distributed Transaction Coordinator" service is running
4. reinstall IIS
5. regsvr32 aspnet_isapi.dll
6. perform aspnet_regiis -i
"

I not have DTC installed on my machine. How do i get it, how do i install it, and why do I need to have this running in the first place?
Thanks for your help.

Levi
llevil@optonline.net
# August 18, 2005 7:25 PM

sicc said:

" I had a locally installed proxy server,
I got this error message when I'd forgotten to start the proxy server service"

This was my problem as well. I use firefox as my main browser, and IE when using a proxy [to view/alter data before sending it to the server]. I had forgotten to disable 'use local proxy' in the IE settings when I was done, and visual studio uses the same settings.
# August 25, 2005 1:20 AM

Gilberto said:

I've just spent a good four hours trying everything to get VS2003 and IIS5.1 to work. Until I read one comment here about having IE proxy settings correct. It fixed my problems. Have just reinstalled .NET and IIS a number of times.

NB: Make sure you can access your webapp via IE before trying VS2003.

G
# November 3, 2005 5:46 AM

Chris said:

I believe I'm experiencing the same problem.

It all started when I installed Framework 2.0 and VS 2005 Express.

What will happen when I run perform aspnet_regiis -i
with multiple copies of the framework?
# November 25, 2005 10:37 AM

pvanooijen said:

There are several things to watch with multiple versions of the framework:

Every version of the fraework has its own vesrion of aspnet_regiss of

In the IIS settings of the virt dir there is a tab to select the framework version to use for handling requests to the virt dir

By default 2.0 does not use iis but Cassinei, another webserver
# November 26, 2005 6:25 AM

Eric said:

I have the .Net Framework 2.0 and 1.1 installed on my computer. I had to go into control panel/IIS/ and right click on Default Web Site, then properties then ASP.NET tab and select the 1.1.4322 version from the drop down.

Works perfect now.

# December 12, 2005 9:58 AM

Sreehari said:

Hi all ,

I have tried the above steps but unfortunately it seems it did't fixed my problem. I am getting a HTTP 500 ( internal error ) when i am trying to open the project in VS 2003 as well as trying to browse. I am using IIS 5.0 in win xp.

Can you help me to solve the issue.


Sreehari
# December 28, 2005 9:03 AM

Russ said:

Firsly, many, many thanks Peter for this posting.

I was in the 'still doesn't work for me' camp until today, when I discovered that my copy of DTC was corrupted, likely by a prior install of SQL Server 6.5. So, I had to fix that first, following the instructions in kb article 891801, then apply your 6-step resolution. All is now well.

Thanks again.

# January 4, 2006 2:04 PM

Amberlin said:

Many thanks for this posting. Following the above steps didn't work for me even though I fixed the DTC service which wasn't running on my machine. The problem was that I had .Net Framework 2.0 installed and it was the selected ASP.NET version in the IIS configuration. I changed it to 1.1 and the problem's gone. :) Just as Eric says above. Please add this solution to your posting, I'm sure this will save some time to the users searching for the solution, because I had to discover it myself and fix the problem before I reached the Eric's posting. Thanks again!
# March 3, 2006 6:46 AM

Haris said:

I had same problem and according to http://support.microsoft.com/default.aspx?scid=kb;en-us;822319 ... I did iisreset on command prompt and it worked perfectly.
# March 29, 2006 2:25 AM

Shopliftin said:

For your "version" issues, MS has known bugs when trying to run multiple versions of ASP_NET (whichever flavor -.dll or .exe) depending on IIS Version (5, 6) for 2K or 2K3.  Basically, a new instance is started for however many ASP.NET driven sites you are running, but the important part is the Application Pool that the site is running in must have the same version of ASP.NET running.  So, to be on the safe side and not crash your server, if you have ASP.NET 2.0 specific code for 1 site and ASP.NET 1.0 or 1.1 on another, you should not only specify the ASP.NET version for each site, but create a new Application Pool for the oldest version of .NET.  That way, all of your new sites can keep using the Default App Pool and the old stuff (if there are compatibility issues) can all use the dedicated app pool for ASP.NET 1.1.  
# April 5, 2006 12:35 PM

Peter's Gekko said:

After a failing installation of a VS.NET 2003 add-in,&amp;nbsp;possibly because I &amp;nbsp;have Whidbey and...
# April 12, 2006 11:36 AM

Peter's Gekko said:

Keeping a development webserver alive is almost a daytime task for me. Blogging some the tricks I learned&amp;nbsp;lead...
# July 11, 2006 4:03 AM

Bela said:

When thing I had to do as well, was remove the ASPNET user account after uninstalling IIS, this got things working again.
# July 12, 2006 5:43 PM

Peter's Gekko said:

This is my third post with this title. What started as quick command line fix has grown into something...
# July 18, 2006 5:55 AM

Vlad said:

Thanks a lot, finally It worked for me.

my "Distributed Transaction Coordinator" service was completly missing.
Here is how I installed it:
At a command prompt, type %WINDIR%\System32\msdtc.exe -install

after this find this service->switch from manual to automatic->Start

Beside that I was following all the steps with the computer restart (after each step Just in case).

My computer has both Visual Studio 2003 and 2005 installed as well as SQL Server 2000 and SQLExpress. I suspect that somewere during SQL server installation this service was unninstaled or corrupted. The order in wich I originaly installed software was.

Visual Studio 2003 --> SQL Server 2000 --> SQLExpress --> Visual Studio 2005

I hope my comments will help someone to understand the problem better. Thanks to this blog I only lost 2  days of research and trying different thing. Some other people lost 6 weeks. I am probably the lucky one...........
# August 9, 2006 2:56 PM

Marcelo Miorelli said:

Hi dear all,

I had to reset my machine several time to manage to delete the inetpub directory.

after that I just followed the steps outlined here and now at least I can create a project.

I am struggling as how to debbug a project now!!!

:-)

Marcelo Miorelli

# September 13, 2006 10:45 AM

pvanooijen said:

Check the security settings for the VS debugger group. See the other post for details.

# September 13, 2006 11:51 AM

HKLOO said:

Peter, you just save me! I have spent hours trying to find a fix for this.

Hm..maybe microsoft should employ you to handle their KB.

Thanks again.

# February 4, 2007 10:08 AM

rajesh said:

tht solution is worked . thx .

it is good answer.

# April 24, 2007 8:03 AM

Stas said:

Hi, Peter! Thanks a lot! Your solution was really useful. I wasted about eight hours trying to solve this problem myself...

# April 25, 2007 10:21 AM

Dave said:

I must say that this was a most horrid experience. What came to be was that I didn't even have the MSDtc installed and running, it was corrupt because there were registry entries for it.  So I ran thru the steps listed in the MS KB 891801 article then uninstalled IIS, deleted the inetpub folder, reinstalled IIS and then (regsvr32 aspnet_isapi.dll) and (perform aspnet_regiis -i)

I was now successful in creating a new web app in VS 2003. on my xp pro box.  Thanks for all the help!

# May 22, 2007 7:52 PM

El_Loco said:

Thanks Peter you prescription works :-)

# July 10, 2007 6:42 PM

El_Loco said:

Thanks Peter, you're prescription works :-).

# July 10, 2007 6:43 PM

Amin Shaikh said:

Thank man its helped me a lot thank you very much

# July 19, 2007 8:15 AM

Vinay said:

This worked. Saved my day.

VInay

# July 25, 2007 5:33 AM

Nicki said:

I was experiencing the same problems when trying to create a webapp. My problem ended up being that i didn't have the Distributed transaction coordinator service installed and running. After I installed it and got it running I followed the steps   above for uninstalling and installing iis and now it works.

# July 31, 2007 3:59 PM

Paul said:

This problem's been on my work laptop for months now (I don't  usually do web projects)! The above steps haven't helped me, and neither has the security settings fix.

The web server works fine until I try to access a page using an ASP.NET script, and then it either times out or hangs and sometimes starts using a lot of CPU. Then, attempting to restart IIS sometimes causes the World Wide Web Publishing service to hang. Anyone else had the same symptoms?

It makes me wonder if my IIS files are staying broken no matter how many times I uninstall and reinstall it, so perhaps I need to do a repair of WinXP or something.

# August 2, 2007 1:22 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!

This Blog

Syndication

News