IIS Express Caching - asp.net

I have a .Net project that started in Visual Studio 2008, upgraded to VS 2012 and is now in VS 2015. I'm having an issue where I update basic HTML in an ASPX page and when I refresh my browser, none of the changes are pushed across. This happens every time the project is opened and only gets the current version of the file on the first build. If I open the project, build the project, view it, any changes after this point are never displayed in the browser unless I completely close out of VS.
I did think it might be the browser but I've loaded a completely different browser (after clearing my local cache) that I hadn't used before on this machine and the page is still displaying the old information. So I feel like there is a setting somewhere in the project that got carried over from a previous version of VS that is causing the local IIS Express to not pull the latest ASPX file from the hard drive.
I tried to delete the .vs directory while VS was closed and then start it up but I had the same result.
How can I get my changes in VS be visible to IIS Express and then to whatever browser I'm using to view it?
Update: I recently updated a CSS file and those changes were immediately seen in the browser. So, it's only the ASPX files that are not updating when saved.

After some time and digging around, I found that this happened on my DEV server as well. I looked through the web.config file and this setting had some how been added to the system:
<system.web>
<httpRuntime fcnMode="Disabled" />
</system.web>
This fcnMode is a file change notification setting that communicates when a file has been updated so that the old information isn't served up again. I removed this setting entire (setting it back to the default) and it's working as expected now in all environments.
Some more info on this setting if you'd like to read the MSDN docs:
https://msdn.microsoft.com/en-us/library/system.web.configuration.fcnmode

Related

ASP.NET site not updating after changes

So, I have a pretty basic ASP.NET site that was built and published via ftp through VS. Original publication went fine, as did the first few updates. But now I've made page changes (css as well as in the aspx files) and they don't seem to get pushed to the server. I believe that my code behind (C#) files are being updated since there are a few visual elements I call in the code. When I look at the ASPX files, they have old dates and the code is the prior version. VS says the publishing succeeded, and the host (GoDaddy) says there's no caching or quota issues on their side. If I upload a new dummy page it goes through... so it looks like updated pages are the issue.
What am I missing?
If it's styles have you tried doing a hard-refresh on your browser? If everything is saying the files are updated then maybe you have a locally cached version.

asp:Image border-width css inconsistency

So I'm a developer/admin for a medium size .net site, and I've run across a weird inconsistency. For reference, I'm running two instances of my site on the same server (IIS 8.5, .net 4.5); the live website and a sandbox instance of the codebase so I can test all development changes before I push them live. The config files differ only in that the sandbox site uses alternate connection strings and has it's debug flag set to true, and the sites each run on their own (identically set up) application pools.
I noticed recently that anywhere I use an asp:Image, the live site renders 'style="border-style:0px;"' onto the image tag. Interestingly, however, the sandbox instance does NOT render the style attribute.
Any idea what could be causing this discrepancy? I know that a simple solution would be to just not use asp:Images where it's a problem, but if I can I'd like to fix the underlying issue since the whole point of the sandbox is to reliably test changes on the actual server before I push them to the public site.
I got back to this issue after a few days of more pressing matters.
Turns out I missed a line in my web.config. On the sandbox site, the controlRenderingCompatibilityVersion attribute of the system.web <pages> element had been updated some time ago from 3.5 to 4.0. Apparently the live site config file never got updated, and Microsoft changed the border rendering behavior between those two versions. Updated the live site and the issue resolved itself.

VS 2010 asp tags not recognized

Edit: The error I'm getting is that VS intellisense is not recognizing asp tags. Specifically it is saying "unrecognized namespace 'asp.'" I should have included that.
I have literally scoured the internet and have found no solutions that have worked for me. I am using VS 2010 SP1 and ASP tags do not work for any project on any page. The solution deploys just fine and everything works, it just doesn't like my asp tags and I get no intellisense. Here's a list of things I've done so far in no particular order:
Deleted "Reflected Schemas" folder
Reset settings
Deleted the contents of the "10" folder under app settings
Deleted the .suo file
Deleted the bin and obj folders
Restarted VS
Restarted the virtual machine
Repaired the VS installation
Uninstalled and reinstalled VS
Commented out the Register TagPrefix
Rebuilt
Unloaded and Reloaded the project
Right-clicked and hit properties of each of my .dll's in windows explorer to see if any of them were locked
Prayed to/made ritual animal sacrifices to several pagan gods
I'm working on custom sharepoint web parts so I have no master page and no config file. If it is a result on the first 3 pages of a google/stackoverflow/codeproject search for anything similar to the title of this post, I have probably tried it. If anyone can think of anything I haven't tried yet PLEASE let me know.

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.

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