When I update an ASPX page with simple text change, it reponds very slowly the next time i call the page from the web. I'm running on windows 7, with IIS7. It seems to me that the page has to recomplile the next time i call it from the browser. any help?

  • You should use resx files for text contetn if you need to change text parts and you do not wan't to wait for recompilation. – Andreas Rehm Sep 15 '10 at 22:48

A ASP.Net page consits of thre parts:

  1. code before (page.aspx)
  2. code behind (page.aspx.(cs|vb|...))
  3. designer code (page.aspx.designer.(cs|vb|...))

You need to manually recompile depending on which part you change. The code behind and designer part needs to be compiled.

You can change the code before part and it will manually recompile (but only the code before).

You should use resx files if you are just changeing text. They can be used by resourcekeys or in your code behind. Changeing a resx does not slow down your app.


Disable recompilation - you need to edit web.config:

         <compilation batch="false">
  • I've been working on web applications in ASP.NET C# for years. And this just started happening. If I open up a default.aspx page, (normal html page with no server code) and just add a simple div tag and then I refresh the page in the browser ... the page has to recompile and takes 25-30 seconds to refresh. This was not case before i switched to IIS7 on windows 7. is there some setting i can change... my co-workers computer does not take this long to refresh.. so it has to be a setting on my pc. help! – Dave Sep 16 '10 at 17:30
  • You can disable recompilation. – Andreas Rehm Sep 16 '10 at 20:27

This is a normal function of Asp.net. Once an ASPX file changes, the application is recompiled the next time the web server gets a request.

  • Yes - but this doesn't happen if you change the code behind... Except ASP.NET with Visual Basic. – Andreas Rehm Sep 15 '10 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.