IIS express suddenly not displaying web page - asp.net

Perhaps someone can help me figure out what's going on.
I'm running VS 2013 and working on a Web Forms application (not an MVC app). I'm using the templates that came down, including all the cool FriendlyUrls functionality. I've been working on this website for several weeks without any problem.
Today, for no apparent reason, one of my pages stopped working. When I attempted to view it, I got an error message that the server was not configured to list directories. My web page does not attempt to list the contents of any directory. It just has some images and some relatively simple Javascript (which does not attempt to enumerate anything).
The error message suggested I run the following command in the IIS Express directory:
appcmd set config /section:system.webServer/directoryBrowse /enabled:true
Just for the sake of experimenting, I ran that command. Now when I attempt to view the page, I get something that looks like this (the page is named Menus.aspx)
localhost - /Menus/
[To Parent Directory]
Clicking on "To Parent Directory" takes me to the home page, as one might expect.
I created a new page, Menus2.aspx, and copied all of the code from Menus.aspx into Menus2.aspx, and Menus2 runs fine. In addition, when I upload the site to Azure, Menus works correctly (as does Menus2). So I think my code is innocent of any wrongdoing.
I then deleted Menus.aspx and renamed Menus2.aspx to Menus.aspx, and I'm back to the same problem.
I was working in a git branch, and reverted back to master to see if at least my original configuration would work, but now even in master I can't get the page to come up.
So it looks like the problem is that something got jacked up in my local configuration, but I can't for the life of me figure out what it is. I have exited VS and rebooted the machine in hopes that the problem will disappear as mysteriously as it started, but no luck.
Every other page in the site (6 so far) works fine. It's just this one, with this name.
So my options at this point are to simply not have a page named Menus.aspx in my project because the name has somehow become cursed, or do all of my testing by uploading to the server and seeing how it works up there, which is a pain and should not be necessary.
Can someone suggest how and where I should start looking for what happened here? This isn't the problem I expected to be working on today.
Thanks in advance.
-Rob

Related

Having Issues with setting up site/start page with Angular HelloWorld project in VS 2017

I know the VS Code is the tool most seen in Angular demos and I've tried them but I was going through a YouTube demo on using Visual Studio to develop a Hello World Angular app.I started out using NPM START to run the app then was following the instructions here to use the Visual Studio Start button to initiate the app.
The app was sometimes rerunning and sometimes not. I was thinking it had something to do with the startup folder but now I wish that I would have modified by startup page instead.
Here's what my folder structure looks like:
Anyways, I first I started messing with the application root URL. I tried changing it from
http://localhost:61539
to
http://localhost:61539/src
and some other values too. I confirmed that i wanted to create a virtual folder and played around entering multiple values. As a result, I noticed that my IISExpress icon in the tray started to show all of the URLS that I had entered
I wanted to try an undo these virtual folders that I created but I didn't know where they were stored. Finally, I saw that the last path that I specify is stored in the VS Project file but I don't know where all of the other sites are stored. I'd like to delete them. Is there some IIS Express config file?
The whole problem started when I was trying to get the initial the web page to come up and I was getting a "Forbidden" error. Now I think that it could possible be solve by setting my initial page to src/index.html, although the YouTube video didn't mention it.
Now, every time I hit the start button to run the web app, the following URL is displayed with an extra trailing slash after the html page name.
http://localhost:61539/src/index.html/
and I still get the forbidden error.
Question
So, how do I clean up my IIS Sites that I don't need and set my startup params so that the web page comes up and displays index.html?

ASP viewstate always contains invalid characters

I'm having problems with one of our ASP websites when I try to run it locally.
The problems have appeared since my laptop crashed this afternoon. Since then the view state is always invalid. The cause is clear: Any time I visit the homepage and inspect the viewstate input tag in my webpage, it contains invalid characters which are displayed in firebug as a diamond with a question mark inside it. Whenever I submit the page, of course, I get an error screen.
Since then I've tried the following:
Restart my laptop
Delete the temporary ASP files folder
Stop/Start IIS
Recycle the application pool
Remove the website from IIS, delete all the source code, check out the source code from TFS, and rebuild the solution
The website does run fine on my colleague's PC with the same source code.
If anyone has any suggestions, please let me know!
EDIT: It happens to TWO of the websites I'm trying to run.
All the others I try run correctly

Visual Studio shows blank page when web application is run

I've had an occasional issue with my laptop where the power instantly cuts out - without the machine shutting down properly. This happened a couple of times yesterday while I was working on a project in VS 2013. Since then when I try to run the project the browser loads and the name of the start up page appears in the url box but it just shows a blank page.
Before, the page loading icon in the Chrome tab would swirl for a while as it was loading, but now it hardly does that at all, as if it's not even trying to load the page.
Some extra info:
I tried setting a different starting page - same result.
I put a break point in the page load code - it doesn't get hit.
If I view the source of the blank it is completely empty, not even
tags
Other projects seem to work find still.
I'm using VS 2013 on Windows 7.
Tried deleting the temp asp.net files
(c/windows/microsoft.net/framework64/v4.0.30319/Temporary ASP.NET
Files) but curiously this folder is already empty - I'm sure this is
what I've done with problem projects before - although I've never
seen this particular problem.
I'm running on IISExpress and have tried all browsers and running without debugging with the same result.
Has anyone seen this problem before? Any ideas??
Thanks
I had the same problem. Solved it by adding a break point at Application_Error function in Global.asax.cs. Then I was able to see the real problem. It was because of some conflicting dlls.
I had the same problem as well. Suddenly when I launch my MVC web application from Visual Studio 2013, the browser comes up and the app is running, but the browser displays blank, no url and does not even try to load the page. In Visual Studio, none of the Script Documents are loaded either.
Simply by setting a breakpoint in Global.asax.cs, Application_start, everything went back to normal, problem solved.

Problems with Publish Web giving blank page

I have written my first asp.net website and I'm ready to deploy. I've followed this tutorial to the letter in order to test first and all seems to proceed without any hitches or errors. However, the webpage gives a blank page with nothing rendered, only
<html><head><style type="text/css"></style></head><body></body></html>
All the files seem to have deployed correctly and I can see them in C:\inetpub\wwwroot\Test Webpage and if I attempt to run using inetmgr I get the same.
Can anyone advise what the problem(s) might be? Below are some screenshots of IIS if it helps but will post up more info if needed.

Why does Web developer built-in web server serve zero byte files suddenly?

Visual Web Developer 2010 Express. C#, MVC3.
Clicking F5 to debug.
It starts up the built-in ASP web server on http://localhost:50188/
The Output window tells me WebDev.WebServer40.EXE is loading loads of DLLs.
Up until yesterday it worked. Today all URLs give me a blank page!
All controllers (all that changed yesterday was one controller, and some of its views; but it was working yesterday after all those changes). Same results in two different browsers. Use a different port gives an error (Telling me that there is something listening on port 50188!!) No errors anywhere. Just 0 byte files received.
My question is What happened and how do I fix it?
More Info:
Rebooting the machine made no difference.
I also found the obj/Debug directory and deleted it. It got recreated next time I hit F5 to debug. Still exactly the same problem!
And I went back 24hrs, in git, and still the same problem. So I'm sure the problem is not being caused by any of my source files. (The .csproj file is in git too.)
Look for a file called app_offline.htm (in your web root directory). It is a zero byte file. If it exists then this is served instead of any of your content! (It is a great feature if you wanted to take your site down for maintenance - put a custom message in that file.)
The Fix: Simply delete it and your website starts working again!
It appears (and I'm not sure about this) that the file is put there automatically when both you and your website want to access the DB at the same time. It should be deleted again automatically. But I guess a crash of something might leave it behind.
(To be honest, I think it would have been much wiser to put some content in app_offline.htm, explaining what it is and why it was automatically created. Quietly creating a zero-byte file is a tad sadistic...)
More information here: Why does app_offline.htm keep appearing in my web project?
And here: http://www.daniweb.com/web-development/aspnet/threads/215912/why-app_offline.htm-is-created-automatically-whats-the-mystery#

Resources