0

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?

1
  • 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. Sep 15, 2010 at 22:48

2 Answers 2

0

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.

Edit:

Disable recompilation - you need to edit web.config:

   <configuration>
      <system.web>
         <compilation batch="false">
      </system.web>
   </configuration>
3
  • 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, 2010 at 17:30
  • You can disable recompilation. Sep 16, 2010 at 20:27
  • I hoped this would resolve the slowness after editing on my server, but it still loads slowly after each edit. But the slowness only happens on ONE of the sites; the other sites load blazing fast after edits. I am still confused. (Also, these are ASP Classic websites as well.)
    – CodingEE
    Feb 21 at 0:31
1

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .