Visual Studio Opens Blank Browser Page - asp.net

I got a new laptop for work and installed visual studio 2017 Professional version 15.9.39
But when I try to debug any of our web projects it just opens a blank webpage. If I enter "localhost://XXXXX" where XXXXX is my portnumber then it opens the webpage and I can continue to debug.
I have tried various different browsers and they all work the same way - blank web page but I can enter url and then it seems to connect.
I have also installed VS2019 professional and that works the same way. Why is it not opening to the localhost url with specified port?

Based on the comment, the solution is that changing the start option to "current page".

Related

Webmatrix - upgraded, now cannot browse localhost sites

I am in the process of developing an ASP.NET site. Yesterday it was working fine. I then upgraded WebMatrix as I keep getting pop ups.
Now, when I try to browse to my site all I am getting is the website text, no CSS, no functionality just plain html text.
No links are working but when I try to enter something into the search bar and hit enter I get the following:
Firefox doesn't know how to open this address, because the protocol
(localhost) isn't associated with any program.
You might need to install other software to open this address.
Now I investigated this and found a this topic:
IIS, IE does not recognize web page protocal
And yes when I added the http and copied the address into IE it brought up the correct page. However then when I tried to navigate around I got the same problem in IE with the message:
No apps are installed to open this type of file (localhost)
I'm totally baffled so any advice would be really appreciated.

ASP .Net Page Can't Be Displayed Error

I am having the strangest issue. My website has been working perfectly in Visual Studio 2008 until I tried to work on the website in Visual Studio 2012. Having abandoned that idea, I am now back to Visual Studio 2008 with the following problem.
Problem:
Any page inside any folder displays a "Page can't be displayed" error or similar in all browsers (IE, Firefox, Chrome, Safari) UNLESS the page is a Default.aspx page. Break points do not load for any of the pages having problems, although debugging is enabled in Web.config. There are no errors in the event viewer.
Possible reason for problem:
I tried working on the website in Visual Studio 2012. After it didn't recognize any of the imports, etc., I decided to just continue using Visual Studio 2008.
I also deleted all of the files and folders in my %temp% directory
What I've tried:
Create a new blank page in any folder to see if it will display; the page has the same error
Comment out all code on an existing non-Default.aspx page; same problem
Check the hosts file; nothing is active and other changes I've made had no effect
Browse to another page from Default.aspx; same problem "Page can't be displayed"
Checked for new AV, malware, etc. software recently installed; none installed
Created a new site on the same machine to see if new site will have the same problem. New site works just fine.
Cleared out the contents of C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files; no change
Environment:
Visual Studio 2008 on Windows 7 x64. The backend is in VB .Net
Running on the developer machine using ASP .Net Development Server
Any and all help is appreciated.
Thank you.
So, I figured it out. Essentially, I was redirecting all but the Default.aspx pages to https (inside Global.asax). While this works on the production server that has valid certs, on the development machine, all one gets is the aforementioned behavior. Thank you all for the comments and suggestions.
Had the same error.
Turning customErrors Off worked for me.
In web.config:
<customErrors mode="Off" defaultRedirect="ErrorPage.aspx" ...>
In my case, Dropbox happened to be using the same port (49210). Fixed my issue by terminating the conflicting application. Alternately, change the port under the Project's properties.

localhost not opening website

I created a blank Web App in ASP.NET on Visual Studio 2012.
When I click on Debugging using Google Chrome, Google chrome opens with text localhost on the navigation bar, but it does not open the website and keeps loading.
Go to project properties page and create a virtual directory. Make sure your starting page is pointing to this. Then navigate to http://localhost/myapp
One thing you can check is the following (running on a windows system):
Edit "C:\Windows\System32\drivers\etc\hosts", and ensure that you have this line: "127.0.0.1 localhost"
In my case, I had "0.0.0.0 localhost" in there.
I hope this can help.

visual studio 2005 web page is not displayed after run

Page is not shown in the browser
I am using VS2005. I am working on Web Project. But my problem is whenever I am running my page ..the URL .I am getting is this http: //localhost:23644/UI/LoginUI.aspx
but the page I am getting is "Internet Explorer cannot display the webpage" For other web application its giving the same browser message ..though the URL is changing to the specific URL.
Can anyone help me in this issue? Thanks in advance
Can you please check if the localhost server (IIS) is started? For Visual Studio though,the IDE starts the server by itself, but you can always cross-check if the server is started via services.msc. Check also if the port 23644 is free.

Can't find the 'open in browser' option when r-clicking on default.aspx

Something strange is going on for me.
I can open the web application on my desktop computer just fine, where it opens the asp.net MVC application with a URL like http://localhost:5118/ when I rigth click on the default.aspx file and choose 'open in browser'.
On my laptop, I don't have that option when I right click on default.aspx for some reason (it should give me the option to Open in Browser). I set the project as a web application, but it still doesn't work.
This is a vs.net MVC application.
I want to open the application without having to setup a IIS site for it.
You don't have what option on your laptop? Can you be a bit more clear?
Also, make sure your hosts file has:
127.0.0.1 localhost
-- this is advice from another site --
Can you see it under the File option while current page is aspx page? Shortcut key of "View in Browser" is Ctrl+Shift+W.
You can try to run "devenv /resetsettings" from Visual Studio command to reset settings.
You also can try to run "devenv /resetuserdata" to reset Visual Studio to its out-of-box state.

Resources