Hello Boy,
MAKE SURE YOU'VE SET YOUR START PAGE
MAKE SURE YOU'VE SET YOU START PROJECT AS WELL!!!!
I know alot of people who have had this error for my reason above, and that was they had forgotten to set a start project.
Try the following:
1. Right-click on the project that contains the login.aspx file and select Set as Startup Project
2. Right-click on the login.aspx file and select Set as Start Page
3. Press F5 to debug your application.
You can probably delete your WinForms project from the solution at this point.
If that doesn't work, or you don't see those options, then it's possible that your Visual Studio environment is not setup correct. In that case, try the following:
1. Start with a new VS session.
2. Create a Web application by going to File/New Project/C#/ASP.NET Web Application.
3. In the Solution Explorer, right-click on the Solution and select Add/Existing Project
4. Select the project containing the login.aspx file
5. Continue with the above advice.
Hope this helps.