After installing sp1 on Windows Vista, my previously created web sites would no longer start and I got the following error:
WebDev.WebServer.exe has stopped working
Unable to connect to the ASP.NET Development Server
with the following exception:
System.Net.Sockets.SocketException was unhandled
Message="An attempt was made to access a socket in a way forbidden by its access permissions"
Source="System"
ErrorCode=10013
NativeErrorCode=10013
StackTrace:
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.VisualStudio.WebHost.Server.Start()
at Microsoft.VisualStudio.WebServer.WebServerApp.Main(String[] args)
The work around? Unbind from Visual Source safe, delete the web project from the solution, rename the folder where the website is stored and then re add to the solution as an existing web site and then bind to source safe again.
While this works, I would prefer not to have to rename every folder where I have a web site. The issue appears to be that somewhere Visual Studio stores all of the information about a web site that has been created. If you don't perform the folder rename, when you add the web site back in you will see that it has the same dynamic port settings it had originally. It is renaming that forces the new port and whatever else is going on behind the scenes that restores the functionality.
I've tried to find out where this site info is stored so I can delete it or correct it, but have been unsuccessful. I've searched in the registry, tried deleteing the temporary asp.net files and poked around the numerous config files and have been unable to find it so I'm stuck with the rename option.
Does anyone know where this is stored or how to clear it out so VS will reset itself for these sites?