I know there's a way to, in Visual Studio, test a change by getting the page running in the browser, and then by just refreshing the browser page rather than by rerunning the application. But although it was working before, it isn't working now, and I'm fairly new to MVC, so I don't remember what I was doing to make it work. Instead, I'm having to actually re-run the application each time.
Specifically, I 1) run from VS, 2) copy the URL from the webpage I just launched, 3) stop debugging from VS (and the browser closes), 4) paste that URL into a new browser window and hit enter, 5) get "This webpage is not available" from Chrome and "This page can't be displayed" from IE.
I'm using VS Express 2013, and was also using that when it was working. I've tried with both IE and Chrome, and I've rebooted my computer and cleared my cache. What did I do wrong / how do I fix it? Thanks!!
Install IIS locally on the machine you run visual studio on. Create a new site in IIS and point it's path to the path of your MVC project. Change the application pool for it to use .net 4 and set the identity on the application pool to your user account.
Then give it a binding of something like localdev and a host header in your hosts file, then just build the site and go to http colon localdev in the browser.
It will reset the app pool automatically when the build changes.
The way I build sites is I virtualize. I use Oracle VirtualBox and install windows server 2008 r2 (or windows 7 x64) to a virtual machine in virtual box. Then I install Sql Server 2014 and Visual Studio 2013. Then I install Toirtoise SVN and Visual SVN extensions and get the source code from our sub version server and set up websites in IIS similar to how we set them up in production. Then when I want to debug code I just attach the debugger to ws3p.exe.
I searched SO for an answer before, but couldn't find one until after I'd posted mine (doh!). This question has the answer I wanted. Default MVC5 Application will not run out of debug mode in browser VS Express 2013
The issue was that I couldn't edit code (I could edit cshtml) when the debugger was still running. You can disconnect the running debugger and still keep the IIS session active if you uncheck Project Properties / Web / Enable Edit and Continue.
Related
So, this is my first time diving into ASP.NET. I've programmed in C# before (Unity), but I've never made a ASP.NET app. The problem is, I can't seem to get SSL to work! When I create a new project using these steps, I get the following error:
However, it works perfectly fine when I go to Properties > Debug and uncheck "Enable SSL". I've also tried using Microsoft Edge, but it gives the same error. Here is what I have tried to fix this:
Disable my antivirus software (Kaspersky) and restart Chrome
Restart my computer
Delete the applicationhost.config file in the .vs folder (source)
Delete the .vs folder and run a command (more info here)
Run VS Studio as Administrator
Delete a domain security policy in Chrome (more info here)
Do netsh http show iplisten - nothing was listed (source)
Repair IIS (Control Panel > Programs & Features > Select IIS > Repair)
Check if the port # was in the correct range (source)
Make sure there is only one certificate for localhost (source)
Follow the steps here
Uninstall and re-install IIS
LITERALLY UNINSTALL AND REINSTALL ASP.NET
Run in incognito mode (Chrome)
As you can see, I've tried everything that has come to my mind. Could somebody please explain why this is happening? To re-iterate, this happens when I don't change any of the default code you get by following these steps, so it can't be a timeout or something.
I'm using IIS Express 10.0 (iisexpress_amd64_en-US.msi from here) with .NET Core 5.0 and Visual Studio 19. As of now, everything is up to date.
I really, really hope you guys can help me with this!!! I would want to use https (because, ofc, its more secure than http).
EDIT: I have tried using Firefox, and who would've guessed? It's the same error. (PR_CONNECT_RESET_ERROR)
I ran into the same issue on a fresh Windows 10 and VS2019 install, for me this solved it
https://improveandrepeat.com/2020/05/recreate-the-self-signed-https-certificate-for-localhost-in-iis-express/
In short
Open cmd with admin rights
Navigate to “C:\Program Files (x86)\IIS Express”
Run IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:PORT/ -UseSelfSigned changing PORT for the port you're trying to use.
I know there are a few topics similar to this but none have my main issue in mind. I don't want to run Visual Studio 2017 as Administrator. Why should we be forced to run it this way? In doing so you lose a few abilities:
ability to simply drag files to the solution explorer to add them to your project.
Cleanly stopping a debugging session by closing IE or stopping the debugging within VS (and it will close IE for you).
There may be others
For posterity the error is:
Unable to start debugging on the web server. IIS does not list
a web site that matches the launched URL.
I have already followed the advice thusly:
Start >> Control Panel >> Click Programs
Click Turn Windows features on or off.
In the User Account Control dialog box, click Continue
Expand Internet Information Services, expand Web Management Tools, and then expand IIS 6 Management Compatibility
Click to select the IIS Metabase and IIS 6 configuration compatibility check box, and then click OK.
I do not wish to use the IIS Express included with VS but the real local IIS I have installed.
This did not solve the issue. I have yet to find a solution that will allow me (us) to run Visual Studio 2017 and use local IIS without running it as administrator. Can anyone provide a solution?
I'll reference this article as similar but it doesn't resolve the base issue: Debugging website on local IIS without administrative privileges
Refer: Why run Visual Studio as "Run as Administrator"?
Its mentioned with MSDN reference that Administrator permissions are required If we need for
Debugging applications that a run under a different user account, such
as ASP.NET websites.
I've created an asp.net 4.5 application in Visual studio 2017 however when I run it I get an message in chrome saying your internet access is blocked. I'm sure why this is happening and I'm struggling to find any resources online that fixes this issue.
Any suggestions would be appreciated!.
It appears that you are trying to run an SSL secured page on IIS Express using the non-secure IIS option.
To Fix this run your project and look at the taskbar system tray for the IIS express icon
Right click on that and you will see two options one with an http and one with https click on the https on and this should open the website properly
Are you in your home local network or in your company network? If in company your firewall can block website on the port or badly defined proxy.
I have an issue which I believe is IIS Express related. I am making a Web App with ASP Web Forms(I know I should be using MVC, but for this project, Web Forms was specified as required). Whenever I build it opens the url http://localhost:53605 and loads the website. The problem is the copy is showing is old, this started happening yesterday, I haven't installed any updates to VS or Windows.
Things I have tried:
Disabling Chome Cache
Using another browser
Change the IIS Express build url (This works, for ONE build and then it's back to the same issue)
Delete the /bin & /debug folders
Does anyone have a solution to this? I can just change the build URL everytime, but anyone who had made an ASP Web App will you rebuild 100's of times a day...
Thanks
If IE setting is OK, then set vs setting
Go to Tools-Options
Under Projects and solution ->
Build and Run select "Always build" under "On Run, when projects are out of date"
For Chrome VS debug, refer
I am building a .NET 4.0 Web Forms application in C#. After working for around 4-5 months on this application, the other day when I went to 'Start' the application from Visual Studio 2010 and the application does not want to start. When trying to connect using telnet on the local host and that port, it connects, and after a while I get an error '400 - Bad Request'.
The funny thing is that when I Publish the application on another IIS server, it works fine, it seems like the problem is from the asp.NET Development Server. While I know that I can set-up a local IIS, I would prefer not to avoid doing this in order to avoid certain problems which might be related to having a different configuration of the local IIS from production.
I have checked the hosts file, re-installed visual studio and confirmed that the application works when published. I have also checked that the port is not being used by another process.
What else should I check?
If the application will not start, then the odds of you being able to connect to it via telnet on a port are 0. (It's not running.)
I am assuming the application can compile if you can publish it. Have you tried running the application without debugging? CTRL + F5