This error causes because of your website stopped in IIS or some other properties missed in your application to solve this error follow below methods.
In this method first check your particular website has started or not if not start your website
Open you’re IIS and select your particular website right click on that site and select Manage WebSite under that click start option.
Now test your application if it works fine then ok otherwise check another method
1) Open IIS and now select your application ---> Right click on that application and select Properties
2) Now one window will open in that Select Directory tab ---> under that select Application settings ---> Click on “Create” button (Once it created that button text will change to “Remove”)
After that click Apply and click OK button.
If you’re using IIS7 no need to do the first and second steps just select your application and right click on it and select option “Convert to Application”
Now run your application and test it I hope it will work fine otherwise follow another method.
1) 1) Open IIS
2) 2) Select your website and right click and go to properties
3) 3) After that select Asp.net tab
4) 4) Under that click on Edit Configuration
5) 5) Select Application Tab
6) 6) Under Select C# as default language and check the Enable Debugging checkbox
Some times that default language was set to vb. After set the above properties run your application now it will work for you Still if it doesn’t work for your follow another method
Open the command prompt and run ASPNET_REGIIS.EXE with -i parameter
Now test your application it will work for you. If not check another method
1) 1) Right click on your project in VS2005 or VS2008 or VS2010.
2) 2) Click on Properties
3) 3) Click on Web tab
4) 4) Under Servers, click on the radio button Use Visual Studio Development Server
5) Check Auto Assign Port radio button
5) 6) Uncheck NTLM Authentication and Enable Edit and Continue