Entry point of ASP.NET MVC app is not being reached. IIS issue? - asp.net

I got a new laptop at work and, ever since then, I have not been able to run either of the MVC projects I'm assigned to. They build, I've deleted them completely and got the latest version from source control several times. I'm running Visual Studio Premium 2013. I had installed 2012 first but, once I ran out of ideas, I uninstalled both and reinstalled. I did make the following changes to the IIS applicationhost.config file (which are required for our apps because we use certificates, etc):
<iisClientCertificateMappingAuthentication enabled="true">
and
<access sslFlags="SslNegotiateCert" />
The other two developers working on these apps have been through the same procedures with their new laptops and they're not having problems. Here's what I get when I run my app in Chrome (won't let me post a screenshot cause I haven't earned any rep yet):
This webpage is not available
ERR_CONNECTION_RESET
The connection to localhost was interrupted.
It basically goes instantly to this page. I have put a debugging stop in the Global.asax file at:
protected void Application_Start()
and it is never reached.
I've tried everything I can think of. A major problem is that I can't figure out what to even search for for a solution to this. I've Googled everything I can think of but the error is so vague and I'm not getting any exceptions. Please, please help. It's been going on more than a week. Thank you so much.

I just uninstalled and reinstalled IIS Express 8.0 and everything worked. Don't know why I didn't try that before.

Related

Developing .Net with Visual Studio 2015, after installing the Windows 10 update, aspx pages are blank

A forced Windows 10 update installed successfully. The update history shows "2017-07 Cumulative Update for Windows 10 Version 1703 for x64-based Systems (KB4025342)" among a total of 45 other updates installed on 7/29/2017.
After updating and attempting to launch my project in the debugger, which has always worked before:
I now get a blank page for every URL. I'm debugging in IIS Express on localhost. View Source yields an absolutely blank page also (this is definitely not the IIS file association problem that I've seen documented).
I did absolutely nothing else (to cause this) besides install Windows 10 (and I wouldn't have if MS didn't force me to). After this I did a clean/rebuild completely from scratch, I then removed the Bin folder, re-installed all the NuGet packages, still exactly the same result, F5 launches the web application in debug mode and launches the page as usual but it is completely blank. It does not execute any code, Page_Load is not called.
Visual Studio 2017 made no difference
I switched to IIS and got a 500.19 error with 0x80020021 error code which this page 500.19 error with IIS7.5 addresses, after unlocking the two subsections of system.web.server that were locked (why were they locked?)
it now returns 404.3 Not Found, with:
-- It is possible that a handler mapping is missing. By default, the static file handler processes all content. (well, not .aspx pages!)
-- The feature you are trying to use may not be installed. (somehow maybe this is true, but how?)
-- The appropriate MIME map is not enabled for the Web site or application.
(Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.) (right... there should not be a MIME map entry for .ASPX)
-- If ASP.NET is not installed. (how could this be?)
ASP.NET installation -- it is built in to Windows 10, I installed the .NET developer packs and tried 4.5.2, 4.6.1 and 4.7, No change.
In summary: nothing has helped. With IIS Express, or IIS, same problem. All .aspx urls return a completely blank page and no code in the code-behind .cs files gets executed. Fiddler says 503 (but 503 is not shown in the browser, either Edge or Chrome).
Latest unsuccessful effort: I went back to the previous build (rolled back the latest Windows update) by selecting "Go back to an earlier build" from "Update Settings/Windows Update/Update History" and I still have the problem. So, either I'm really stuck now, or I've opened up a lot of possibilities based on a wrong assumption that it was the update that caused the problem. Something is corrupt? Something changed in my project that I'm not aware of? Corrupt: I ran the system file scanner, sfc /scannow and it found no problems. Back to the drawing board...
Success!... OK, so the problem wasn't just Windows 10 Update directly breaking something which I wondered how that was possible, but it sure seemed like it.
I have now rebuilt my solution from scratch, creating a new web site project in VS and pouring the minimum number of files in first, basically Login and some utilities, enough to build and test and see that it worked. Then in about 3 doses I added everything else and it kept on working. I also reloaded all the Nuget packages, and switched from .NET 4.5.2 to .NET 4.6.1. (so I broke the rule of only 1 change). I did a full compare with Beyond Compare and the only differences are some obsolete page files that I just left out of the new one, and the binaries and the different build target (.NET 4.6.1).
Could the Windows update have broken/corrupted a binary? It force rebooted my system which I can't stand. Who knows... maybe, it was quite a coincidence. Oh well.

First ASP.NET webpage launches without debugging, doesn't launch with debugging

Did anyone encounter an error with ASP.NET debugging? I've made a really simple, empty MVC page, I've tried returning /Home/Index.cshtml and a string, and each time I get a windows jingle and the browser can't find the server. It doesn't happen when I run it without debugging though, then the website runs just fine.
I've also tried the default MVC template, with Bootstrap etc, and it's the same - runs without debugging, doesn't run with debugging.
It's probably important: I'm running Visual Studio 2017 on up-to-date Windows 10. I've reinstalled the system several weeks ago, really wouldn't want to do that again :/
Generally we could debug an app with the normal user, but sometimes we need to use the admin, for example, as far as I know, if we want to use the attach to process tool for remote debugging, we often run the VS as the admin or others.
This document share us the tasks we need administrator permissions to complete:
https://msdn.microsoft.com/en-us/library/jj662724.aspx?f=255&MSPPError=-2147217396
If possible, you could refer to it especially "Debugging" area in above link.
Hope it could help you:)

Application_Start() called twice in IIS7.5 hosted MVC 5 application

After moving all my solutions over to a newly installed machine (which makes me think this is a config issue), I am now having this problem with my MVC 5 web application(s).
When I build my web application (VS 2013), this of course regenerates all the web code and IIS will restart the application on next page load. However now it seems, when I go to my start/login page, the Application_Start() fires as expected, but when the page is submitted, before the HttpPost method is reached, the entire application seems to start again (Application_Start runs again). This second start seems to occur before the first Application_End() is called...but regardless of the sequence I have no idea why this is now an issue.
Checking the application shutdown reason in Application_End() I get the notorious vague (and apparently completely undocumented) "BuildManagerChange"...which MSDN gives some ridiculously vague description of.
Does anybody have idea why this would start after loading my development environment onto a new machine. Both machines are Win7 Pro running IIS7.5, and I believe the IIS config is identical to the old one (though, apparently not??). The source code/web.config/etc has not changed between machines.
The only documentation I could find on this issue was in regards to using IISExpress, however I am using the standard IIS7.5 installed with Win7 pro.
Edit: After removing all custom code from the entire startup of the site, and reverting my LoginController back to it's original simple form (no custom code), this still occurs.
Well, wasting 2 days on this was fun! But, this was resolved. Running procmon showed that hash.web was being accessed by mcshield.exe (McAfee AV). Apparently the live "on access scanner" checks the asp.net cache, and somehow IIS is aware of this and thinks it needs to rebuild the site again. For some reason McAfee does not check it after this first time so it functions normally after a second build/restart. I added a scanner exclusion to the c:\Windows\Microsoft.NET folder, and that seems to have solved the issue. –
A bit late to the party, but maybe it'll help someone. For me it was because I accidentally mapped two IIS sites to one directory. This resulted in two IIS background worker tasks and Application Application_Start() being called twice even though the second site was marked as "Stopped" in IIS.

ASP Project on Visual Studio bad performance while debuging

I have a ASP Project running Visual Studio 2013 having very bad Performance while debuging/running the Project. The same Project running on a normal IIS Server is super fast with no Problems. Other Projects are running also super fast with no Problems (also on VS2013).
I have already tryed the following:
Delete All Breakpoints does nothing.
Debug or Release version, doesn't matter.
start without Debugging has the same problem.
Putting my project on a full IIS implementation on a web server runs it super fast with no problems.
Clean Solution, or deleting the .suo also do nothing
comment all the CodeBehind and the JavaScript
the solution with symbol loading from Visual Studio debugging/loading very slow also dont work.
Another often mentioned solution is to deactivate Intellitrace, but I don't found how to do that in VS2013 (the Intellitrace MenuItem in the Tools/Options Menu is missing)
There are many empty ScriptDocuments created while running, dont know if that has anything to do with the Problem.
Thanks for any Ideas!
This may sound strange, I had the same problem and tried all suggestions I found on the internet. The cause for me was I has a blank DVD in my drive. I found this by looking at where Visual Studio was trying to load the symbols from "my d drive (dvd)". After I ejected the blank DVD it was back to normal. This was very strange but just saying, check where VS is trying to load the symbols from in the output window. Hope this save someone from running round in circles.

IIS Express Internet Explorer cannot display the webpage ... until restart

I have one asp.net application which I debug locally using IIS Express.
I have a setup by which I access it as http//machine-name:port/appname (instead of localhost).
This works smoothly until suddenly out of the blue during debugging I get the message:
Internet Explorer cannot display the webpage
What ever I do, it does not work again until I restart Windows.
Has anyone faced this issue before? Is there a way to fix this without restarting Windows?
I am using Windows 7 with Visual Studio 2010, but this also happens in VS 2012.
EDIT This issue stopped occurring. which leads me to believe this was Microsoft bug which they fixed in one of their updates
Just taking a stab in the dark, since you aren't getting any responses... Try deleting (or even just rename) the applicationHost.config under "My Documents\IISExpress\config", then open VS.net and run your project again. A new IISExpress config file will get generated for you. I have had mine junked up with something in the past, and starting fresh with a new one fixed whatever it was.
I have faced the same issue in a perticular scenario.
It was like, Page_Load event of 1st page contains code to redirect response to 2nd page and Page_Load event of 2nd page contains code to redirect response back to 1st page.
So due to this browser response fell into infinite loop and it shows message: "Internet Explorer cannot display the webpage".
So I'll suggest you to check the response redirection logic which may be causing problem.
If you work with a DI framework like Ninject and you are doing changes on your services dependencies, beware not to generate a circular dependency. When starting up the application you might get this same error.

Resources