Wednesday, July 23, 2008

webdev.webserver.exe has stopped working

Yesterday I had opened up my Visual Studio 2008 solution which contains a couple of web sites, a WCF project, and some other project types. I am currently using the Cassini web server, since we have a couple of developers who do some work for us off an on and they share a single server using terminal services to do their work.

When I tried to browse a page in my site, I was prompted with a wonderful crash dialog indicating: webdev.webserver.exe has stopped working. This continued no matter how often I tried or rebooted.

I am not sure why the failure occured, but I noticed a coupled things:

  • A new web site in a new solution worked fine

  • My existing web sites in a new solution did not work

  • The event log had the following message: Fault bucket 158894065, type 5
    Event Name: CLR20r3
    Response: None
    Cab Id: 0

    Problem signature:
    P1: webdev.webserver.exe
    P2: 9.0.0.0
    P3: 4731664b
    P4: System
    P5: 2.0.0.0
    P6: 47577deb
    P7: 2c04
    P8: 40
    P9: System.Net.Sockets.Socket
    P10:



I am not sure of the relevance of P9 but I thought hmm could the port it was using be blocked. Running netstat -a did not show the ports in use but I decided to try and change the ports anyways.

Visual Studio stores all the project settings for a web site in the solution file. To change the default port for a web site you need to find the following line and edit it:

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Project Name", "Project Name", "{3BD859EC-9AF2-4866-B43C-EE8AEFF0DF49}"
ProjectSection(WebsiteProperties) = preProject
...Addition project properties....
VWDPort = "58332"
EndProjectSection


After modifying it to use a different port Cassini had no issue launching. Hope someone else finds this helpful. And if you have any idea of additional things I should have looked at please leave a comment!


Edit
Editting a solution file is very easy. Find the solution file, and open it up in your favorite text editor. Then find the port setting setting, and edit it.

33 comments:

Josh Berke said...

I've noticed a lot of people are finding this blog post, and I'm curious if this has solved anyones problem. If so drop me a quick comment.

Thanks,
Josh

Anonymous said...

After trying several other suggested solutions to this problem I stumbled across your suggestion and it worked perfectly. Thanks!

I started getting this error after changing VSS bindings for the project. Not sure why this would cause a problem with the dev server. Oh well, it's working now.

Ta,
Dave

Unknown said...

Hi Josh,

I'm getting the exact problem you were getting, but the VWDPort fix has failed to make any difference. In fact, there was no VWDPort attribute in my solution file, so I added it in. Another web application project I have tried runs fine (also with no VWDPort attribute).

Given that it doesn't seem to be Visual Studio 2008 itself that's broken I suppose the most sensible conclusion is some sort of corruption in the Web App files, but I have no idea what it could be. This just started happening this morning, after leaving VS2008 open overnight. Was working last night, not working this morning, no work done on the site in the meantime.
I did some work on the other Web App that I mentioned, subsequent to finishing on the now broken app, but all I did was start setting up a web service reference - I didn't even finish, just got as far as browsing for the service URL.
It would be nice to just be able to get on with doing some work, instead of all the "meta work" involved in getting my machine back to a state where I can do some work!

All the best,
Jon.

Josh Berke said...

Jon,

I hear yea I have spent so much time this past year fighting issues with VS, probally cost my employee 5k-10k easily. Sorry this didn't work for yea.

Dave,

No idea either but glad it worked for you

Unknown said...

Well, whaddya know? A reboot has fixed it. I didn't even bother trying that until now because I'd read so many comments saying that rebooting did nothing to help. In fact I only rebooted because I was fiddling with my DIMMs.

So, a mystery - something that can break on its own, without any input from me, that's specific to one web app, and that can fix itself following a reboot... so there was something bad in memory? Or a locked file? Ghosts?

I like Visual Studio, even though I know I'm communing with the devil every time I use it, but I'm getting a bit tired of closed source solutions. Ho hum, I'm not about to jump on the Ruby on Rails train so I suppose I'll just get back to work now I'm able to.

Cheers
Jon.

Josh Berke said...

Sounds like the typical fairy dust was sprinkled around and made it all go away...you know fairy dust is very effective against the gremlins.

Glad your working again

Anonymous said...

I had a very similar problem with a project I have been working on, but what leapt out at me was the mention of changing VSS bindings... I also had recently changed the SourceSafe bindings (long story, but at one point the mapped drive we use for VSS was no longer working, so I used an explicit path to the VSS files). As stated by some of the other comments, many VS2008 projects do not specify a port, so I decided to try the next best thing: tinkering with the .scc file that holds the source control values. From here I changed the bind path (even if it's to something that doesn't exist) and the next time I attempted to start the project, it noticed the VSS path was incorrect and prompted me to select a new one.
Voila, no more crashing VS2008! Thanks for this post, it helped and led me in the right direction!

Ken said...
This comment has been removed by the author.
Ken said...

Josh, thanks for your post - it was very helpful.

I had this same problem, and google brougt me here. First I tried redoing my source control bindings (I'm using Vault), but that didn't fix it.

I went to a project that *does* work, and copied the VWDPort value from that solution file into my non-working solution file (why is it different?). That did the trick. It would be interesting to know what the deal is with this.

Anonymous said...

Hey - THX - this solved the problem for me. I am working remotely and unable to connect to my home server. Prompted for VSS connection as a result and running in VSS disconnected mode .
BTW - this is a HORRIBLE problem because you expect Cassini to work!

Zhaph said...

Hi Josh,

Yep, just started getting this error after updating an Entity Framework model - every thing had been working fine yesterday, and then it kept crashing out.

Picking a nice high port number resloved the issue for me.

Thanks,

Z

Anonymous said...

Worked for me also. But i need to restart the application to make it work.

Anonymous said...

Thanks a lot, Vs2008 and asp.net are already pain in the ... to work with, Having to start the server manually and not being able to debug was a big issue.

Changing the port worked like a charm..

Jp

Anonymous said...

Worked like a charm, but what a pain.

Anonymous said...

IT WOULD BE USEFUL IF YOU TOLD US HOW TO EDIT THE SOLUTION FILE

Joe said...

Thanks Josh..It worked like a charm!

Eric Selje said...

Yes! It worked. The only thing I can think of that might have changed on my system between the time it last worked and the time it stopped working was installing Trillian Astra, and GoToMeeting.

Anonymous said...

Thanks! Your suggestion worked perfectly for me.

Anonymous said...

Thanks a lot! Martin

Anonymous said...

Thanks that worked a treat. You can also edit the server ports if you go to the properties of the web project and select the WEB tab. In there you should see the servers section where you can modifiy the ports.

Tim said...

Thanks for the help!!! Had the same problem as this and tried most of the suggestions here, resttarting the machine didnt work so i simply changed the WebServer port number and it started working again, magic..
Cheers
Tim

Mike Hankey said...

Not sure why this happened but a project I was working on just stopped working, others worked fine.
Tried a couple of other solutions then came across yours and worked great.

Thanks,
Mike

Anonymous said...

This solution has not worked for me. This is the 3rd day I have had this issue. A reboot only fixes my issue temporarily. I have been using VS 2008 for years, and this is the FIRST time I have had this problem.

Gilbo said...

Hi, not worked for me I'm afraid. tried reboots, different ports etc..Same error.
I was using VS2008 Standard Edition on Windows 7 Ultimate, and all worked fine. I uninstalled and installed VS2008 Professional so I could use Crystal Reports designer and now I get the webdev.webserver.exe has stopped working. AAARRRRRGGHHHH!!

Any other ideas greatfully received

Gilbo

Anonymous said...

Hey guys,

couldnt find the AWDPort attribute, but a few comments up, annon said you can change the port from web section in properties. This worked for me, i just changed the port number et voila....

thanks annonymous....

ck said...

Worked for me!

Ryan said...

It worked for me! Thankyou!

Robin said...

Thanks, so far I "solved" the problem by rebooting, but even that sometimes failed to work.
Changing the .sln worked straight away.
Best regards, Robin

connect2you said...
This comment has been removed by the author.
connect2you said...

As your post, I change solution file to this.
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdminCMS", "AdminCMS\AdminCMS.csproj", "{05C34346-D742-423A-AAF7-150D8C2AF745}"

VWDPort = "58332"

EndProject

But it is not work.
In visual studio 2008, I view property of that project and change "Specific Port: #NewPort#". It work now.

Unknown said...
This comment has been removed by the author.
Anonymous said...

Hi everyone. i had the same problem. I only restart the computer and everything fixed by itself.
Thanks.
Mustafa

Anonymous said...

Hiya,

Many, many, many thanks for this blog (and all the people who left comments :-) I managed to solve it!

I too could not find a "VWDPort" setting in the solution file but used the Properties --> Web screen instead. I also unchecked the "Apply server settings to all users" box at the same time.

This has done the trick!

A couple of other blogs I read whilst searching for a solution to this Webdev.Webserver.exe problem recommend moving over to local IIS. It's more work in the short term, but less stress in the long term!

Something I'll consider in future.

Regards,

JohnN