I have a fairly big ASP.NET 3.5 website (using a SQL Server database) that refuses to open any page via the 'View in Browser' option of VS 2010 Pro or VS 2012 Pro, i.e. the LocalHost facility does not work for this site. All I get is a 'File Not
Found' error.
This prevents me from using many of the debugging facilities of Visual Studio, which is very frustrating. Two other ASP.NET 4.0 sites (which are much simpler and do not have any SQL Server connections) can be viewed without any problem via the LocalHost
service.
I suspect that the web.config file may be the source of my problem but would really appreciate some diagnostic guidance.
David
BTW, I posted a similar question a long time ago but got no useful answers. I'm hoping for a more positive response this time!
I have looked at the case that you post in this, we often think whether file involve something about url rewrite or routing error when
we face the problem that 'File Not Found' error.
We can hardly make other guess , at the same time I hope someone else could give more positive solution for you.
Regards
Please mark the replies as answers if they help or unmark if not.
Feedback to us
Hi Angie,
Your quoted link is actually to a section of my own previous thread on this forum!! As already mentioned, that thread provided no useful results.
Please clarify what you mean by "url rewrite or routing error".
Having now researched what is meant by 'URL rewriting', that is not something I have ever done. I still have no idea what you meant by 'routing error'.
Having now researched what is meant by 'URL rewriting', that is not something I have ever done. I still have no idea what you meant by 'routing error'.
I guess you maybe used
URL Routing or
URL Rewriting , and it could causes url path error. Since you don't take that, you could take homertechnologies's suggestion and post your default page code and part of webconfig.
Regards
Please mark the replies as answers if they help or unmark if not.
Feedback to us
Create a sample page without sql connection and try it to view in browser. If you can view it then the application is working.
Can you post your default page code and part of webconfig
I had already tried a page with very little code behind it, none of which accesses my SQL Server database. My master page also uses no significant VB.NET code. I still got the 'webpage cannot be found' error when I tried the 'View in browser' option in VS
2010.
I will post code samples here as soon as I get some spare time.
haggis999
Member
130 Points
611 Posts
Why does LocalHost in VS 2012 not work for one of my ASP.NET websites?
Nov 05, 2012 01:50 PM|LINK
I have a fairly big ASP.NET 3.5 website (using a SQL Server database) that refuses to open any page via the 'View in Browser' option of VS 2010 Pro or VS 2012 Pro, i.e. the LocalHost facility does not work for this site. All I get is a 'File Not Found' error.
This prevents me from using many of the debugging facilities of Visual Studio, which is very frustrating. Two other ASP.NET 4.0 sites (which are much simpler and do not have any SQL Server connections) can be viewed without any problem via the LocalHost service.
I suspect that the web.config file may be the source of my problem but would really appreciate some diagnostic guidance.
David
BTW, I posted a similar question a long time ago but got no useful answers. I'm hoping for a more positive response this time!
Angie xu - M...
All-Star
18664 Points
1590 Posts
Microsoft
Re: Why does LocalHost in VS 2012 not work for one of my ASP.NET websites?
Nov 07, 2012 06:36 AM|LINK
Hi
I have looked at the case that you post in this, we often think whether file involve something about url rewrite or routing error when we face the problem that 'File Not Found' error.
We can hardly make other guess , at the same time I hope someone else could give more positive solution for you.
Regards
Feedback to us
Develop and promote your apps in Windows Store
haggis999
Member
130 Points
611 Posts
Re: Why does LocalHost in VS 2012 not work for one of my ASP.NET websites?
Nov 07, 2012 08:35 AM|LINK
Hi Angie,
Your quoted link is actually to a section of my own previous thread on this forum!! As already mentioned, that thread provided no useful results.
Please clarify what you mean by "url rewrite or routing error".
David
haggis999
Member
130 Points
611 Posts
Re: Why does LocalHost in VS 2012 not work for one of my ASP.NET websites?
Nov 07, 2012 10:29 PM|LINK
Having now researched what is meant by 'URL rewriting', that is not something I have ever done. I still have no idea what you meant by 'routing error'.
David
homertechnol...
Member
228 Points
57 Posts
Re: Why does LocalHost in VS 2012 not work for one of my ASP.NET websites?
Nov 08, 2012 12:10 AM|LINK
Create a sample page without sql connection and try it to view in browser. If you can view it then the application is working.
Can you post your default page code and part of webconfig
thanks
Angie xu - M...
All-Star
18664 Points
1590 Posts
Microsoft
Re: Why does LocalHost in VS 2012 not work for one of my ASP.NET websites?
Nov 08, 2012 12:59 AM|LINK
Hi David
I guess you maybe used URL Routing or URL Rewriting , and it could causes url path error. Since you don't take that, you could take homertechnologies's suggestion and post your default page code and part of webconfig.
Regards
Feedback to us
Develop and promote your apps in Windows Store
haggis999
Member
130 Points
611 Posts
Re: Why does LocalHost in VS 2012 not work for one of my ASP.NET websites?
Nov 08, 2012 04:14 PM|LINK
I had already tried a page with very little code behind it, none of which accesses my SQL Server database. My master page also uses no significant VB.NET code. I still got the 'webpage cannot be found' error when I tried the 'View in browser' option in VS 2010.
I will post code samples here as soon as I get some spare time.
David