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
    P3: 4731664b
    P4: System
    P6: 47577deb
    P7: 2c04
    P8: 40
    P9: System.Net.Sockets.Socket

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"

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!

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.


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.


Dave Tawse 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.


Jon 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,

Josh Berke said...


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.


No idea either but glad it worked for you

Jon 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.


Josh Berke said...

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

Glad your working again

Erik 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.



Aadhi said...

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

Anonymous said...

Thanks a lot, Vs2008 and 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..


Anonymous said...

Worked like a charm, but what a pain.

Anonymous said...


Joe said...

Thanks Josh..It worked like a charm!

Eric 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..

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.


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


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

Lê Trung Thu said...
This comment has been removed by the author.
Lê Trung Thu 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"


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

Sunil Kumar Lalwani (sksoftmind) 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.

Anonymous said...


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.



Anonymous said...

Editing the file? Why? Just change the port in the properties dialog on the web tab.

Anonymous said...

I was working with config files. I could not get the app to see the App.config file when debugging. So I put the config file in the folder where the WebDev.WebServer.EXE file existed. (For me it was in C:\Program Files\Common Files\microsoft shared\DevServer\9.0) The config file was renamed WebDev.WebServer.EXE.config. My app could find this file.
Next time I got the error that "webdev.webserver.exe has stopped working." Removing the config file fixed this.

Deva said...

Thank you very much. It solved the pbm for me.

Anonymous said...

This was Extremely helpful.
changed the port their and it worked.
this should be an automated thing from Microsoft to make things work better. but thanks for the help.

Anonymous said...

The VWDPort solution didn't work for me, it didn't exsit in my sln files...

but i found DevelopmentServerPort in the csproj files, change it, and problem solved


Hey josh,

VS2008 - WebDev.DevServer.exe stopper working problem.

It worked. I had been through a lot of articles. But finally stopped at your's and it worked like charm.


Shawnolius said...

Your blog post certainly helped me. Changing the Port number did the trick!

Pissed off at VStudio said...

Wow, what a massive waste of time. YOu think the VS Devs would have their web server check to see if the port was available before RANDOMLY assigning it to my project??

And of course when, where, why does it decide to change these things??? MADENNING!!!

Thanks for you post, fixed the issue

Anonymous said...

thank you so much for posting this, helped me save a lot of time!

Shweta said...

Thanks a lot!!! Changing port number worked for me too

Unknown said...

Thanks buddy your trick is useful for me and it saved my time.
the problem was with just one web application while other applications are working fine so first I changed VWDPort = "4002"
(any dummy port no) in .sln file but it was not working then I just changed VWDPort = "5875" this port was working fine in other application. so pick the port no which is already working fine in ur any another application and ur issue will b sorted out.

Anonymous said...

Great It worked for me. Just changed the port to one that was working for another project.

Good Job

Anonymous said...

thanks!! gr8... it worked for me!

sam said...

i got the same problem...but changing the port number didn't resolve it
please help....
thanks in advance....

johnv said...

Solution: Try UNINSTALLING any updates before you started experiencing the issue. I spent countless hours - wasted hours that I will never get back in my life - reading and following every solution possible without success. I uninstalled all SQL Server updates and now everything works fine. Now I have white hair growing because of this.

Danny Volders said...

It solved my problem. Thanks!

Mohit said...

Thanks a ton. After trying so many suggestions, this is the one that really works.


I got the same problem too. Your solution worked. Am in Africa (Kikuyu, Kenya) and I am teaching myself At first I could not even find the solution file or figure out what it referred to. After some looking around I worked out that it is a file with the name of my website with extension ".sln" I opened and edited the file with notepad you advised here and my application started running again. Thank you so much. Since am the the bottom of the learning curve, I can't begin to imagine what caused it. However, I noted in all the googling I did, there was not mention of this issue from any site related to Microsoft. Maybe they also don't know what causes it!

Francisco said...

or just change the port on the website properties Panel. still dont know why this happened.

Guru said...

Thank a lots. it works perfect..

avik said...

I have tried to export a pdf file from crystal report.This reports contains huge number of images.while exporting that report to pdf it generate an error webdev.webserver40.exe has stopped working.please help me to solve out this problem

Chris Fox said...

None of the above worked for me. After some hours of wasted time, I commented out the last few code changes I've made, as an act of desperation. Unsurprisingly, this made no difference. So I uncommented them, and for no logical reason, hit Run - lo and behold it worked. Makes absolutely no sense to me!