ASP.NET website pages not reflecting recent changes
Asked Answered
B

1

8

I have been working on a new intranet site for a few weeks now, and everything has worked as expected. If I made any changes whatsoever (added raw text, new controls, etc) to my .aspx pages, and then tested them in VS(F5), all changes would be reflected immediately in the browser. Anything as simple as adding a <br> tag or as complex as adding a set of nested controls would show up upon a debug restart.

Earlier today, everything was working. Then I decided I wanted to play around a bit with some of the AjaxControlToolkit goodies. I ended up installing the SP1 Update 2 for VS that was released today (http://www.microsoft.com/en-us/download/details.aspx?id=38188) while I was at it, as well as updating NuGet and installing the AjaxControlToolkit from there.

I added a couple tools, including a ScriptManager and an UpdatePanel, and everything worked as I expected. I then went to make a few changes, and added a second ScriptManager accidentally. When I went to debug/run, it of course failed because you cannot have more than one on a page, so I removed the extra one and ran again. It again gave the same failure. I went through and made sure I didn't accidentally add another one somewhere, did a search on all files in my project and it was the only instance of it, so I commented it out and ran it again. Same thing. I tried a few things and ended up restarting IIS and VS and then the page behaved as expected.

Since that point, any changes I make in ANY of my files in the project no longer update without exiting IIS and restarting it. New, very basic aspx or html files in the project do the same thing. I then reverted to the restore point before updating VS, and used a backup of my site from earlier in the day before I added the AjaxControlToolkit, and still, the problem persists.

What is going on here? I feel like its related to the VS update, but that doesn't really seem to make sense. I can't see such a major bug being overlooked? Why isn't IIS serving the updated page?

Ctrl+F5 in browser does not reflect changes. Rebuild of entire solution does not reflect changes. Closing and reopening browser does not reflect changes. Changing my web.config does not reflect changes. Creating a brand new empty web site and the problem persists. Change to Visual Studio Development Server instead of IIS, problem persists.

The only way I have found to force the correct, updated page to serve correctly is to "Stop Site" in IIS and then restart, which is simply way too much of a hassle to check minor changes to anything in my page.

I am using Visual Studio 2012 Express, IIS Express, .NET 4.0, C# code-behind, files are on an intranet file system (mapped to x:), separate from my actual production hosting server.

Just in case (though I don't think it matters since the problem is now occurring even with a fresh web site) here is my web.config (which is very basic):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <customErrors mode="Off" />
    <httpRuntime />
    <pages>
      <controls>
        <add tagPrefix="ttw" src="~/Controls/CustomerInformation.ascx" tagName="CustInfo" />
        <add tagPrefix="ttw" src="~/Controls/CircuitInformation.ascx" tagName="CktInfo" />
      </controls>
    </pages>
  </system.web>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="X-UA-Compatible" value="IE=EmulateIE9" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

Any suggestions would be greatly appreciated, and I hope a solution will aid others who may be experiencing the same issue after this most recent update.

Brooder answered 25/4, 2013 at 23:44 Comment(11)
Try deleting Temporary ASP.NET Files under the Microsoft.Net folder under Windows. Don't have a link handy but go google and find the proper way to handle this. Sorry, in a rush, gotta go. Good luck!!Lorrimor
I don't work in Express, but if you can expand a bit more on I am using Visual Studio 2012 Express, IIS Express, .NET 4.0, C# code-behind, files are on an intranet file system (mapped to x:), separate from my actual production hosting server ? How can the application be updated (bin code)? You maybe running the original bin deployed code? Web site vs Web application? How are you publishing/deploying?Cimmerian
@Cimmerian I push out to the production server with the copy website tool within Visual Studio. It's not really relevant in this scenario because I don't push to the prod server until the site has been tested, and I'm not even getting to that point since this problem came up today. Started with an empty web site, using only aspx web forms.Brooder
@Lorrimor That works as a workaround, but clearing the temporary files between every debug is even more annoying than restarting IIS. Again, this was working fine with no issues before the VS/NuGet update, and persists to completely new sites.Brooder
have you tried recreate the iis site, maybe use new port or site name. potentially there are changes at web site enabled page caching.Godard
@Godard Yes, I have. I even removed the site from IIS completely in the config and then imported the website into a fresh project and the problem follows.Brooder
Another workaround, but still not a fix...it appears that if I move the site to a folder on my local hard drive, everything works as expected, but if I try to do it from the shared intranet drive (which is where I have been doing ALL of the work so far, and it has been fine, including several other projects over the past few years) it does not behave correctly. What could possibly have changed that would cause this behavior? I can at least operate locally temporarily in this manner but really need to find a solution.Brooder
Just to add a bit more information here, I have tried multiple different shared drives on different servers, and UNC paths (\\xxx\xxx\xxx) as well as mapping those to drive letters and the result is the same. It works as expected only on local drives including my hard drive and also a USB thumb drive. HTML files on the shared drive work and update fine...but not aspx.Brooder
Interesting, is this issue solved?Droit
On main project properties in Web section change Enable Edit and Continue settings and see it that make any difference.Claudie
are you serving .aspx with .cs files saved in UNC path from iis? are you using the same UNC path for development?Psalmbook
G
0

Sounds like a permissions issue. Either the mapped network drive is using credentials that don't have adequate permissions or the IIS app pool identity doesn't have permissions to the folder.

Greatgranduncle answered 9/12, 2014 at 20:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.