Yesterday I upgraded an ASP.Net 2.0 Web application to .Net 4.
I copied the original to a new physical directory and set up the Virtual Directory/ Application in IIS. This is all on Windows 7. I modified the vbproj file and started visual studio. The upgrade wizard started then I was informed that the Virtual directory did not exist.
I should have stopped here and worked out what was wrong but instead I answered yes to Visual Studio 2010’s offer to create the Virtual Directory. Laziness costs!. All seemed well. I finished the application upgrade , made some changes and ran it through the debugger. No problem. This morning I started my laptop and went to run the same application again. ‘Unable to connect to Web Server’. Looking in IIS the Default Web Site had not been started. hen I tried to start it I received ‘Value Does Not Fall Within Expected Range’.
The Windows event log told me which Virtual Directory was at fault.
I removed the Virtual Directory using IIS manager but it still didn’t start.
Opening up the ApplicationHostConfig file in c:windows\system32\inetsrv folder showed that the entry at fault was the one Visual studio had created. In the name of the Virtual directory were spaces
My manually created name was, for example, ‘My App’ but in the file I found ‘My%20%App’ – the entry added by Visual Studio. Removing the %20% fixed the problem.
Thanks to your post I fixed my problem, I configured a virtual directory inside there were other directories of the project and 5 of them were converted to applications, then I deleted the folder Directly with Windows Explorer and got this error, The problem was that like I've removed the folders "Manually" it the ApplicationHostConfig file wasn't updated, so I just removed the lines were referencing my deleted project and Everything worked perfectly, Thanks.
ReplyDelete