Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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

2 Answers 2

up vote 0 down vote accepted

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>
share|improve this answer
    
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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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