Reputation: 2717
I have created a website using ASP.Net and running on port 8080. When server is still running, I can some changes in the code. Interestingly, those changes are reflected on my site when I pressed refresh button. I just wondering with this because I guess we have to compile and rebuild site to see new changes.
thanks !
Upvotes: 2
Views: 82
Reputation: 37506
When you have the full source for an ASP.NET web site (not a web application) running, your site will be dynamically compiled, and changes you make will be detected.
From the MSDN documentation, Understanding ASP.NET Dynamic Compilation:
Any changes to a dynamically compiled file will automatically invalidate the file's cached compiled assembly and trigger recompilation of all affected resources. The next time a request to the code is made, ASP.NET recognizes that the code has changed and recompiles the affected resources of the Web application. This system enables you to quickly develop applications with a minimum of compilation processing overhead. (Note that depending on the change to the resources, the result can range from recompiling a single page to recompiling the whole Web site.)
Upvotes: 0
Reputation: 25495
That depends on if you have an asp web site of a web application. Take a look at this msdn page for more info.
Upvotes: 1
Reputation: 62484
Yes, WebSite working in this way. WebApplication requires rebuild all because all codebehind logic are built in DLL of WebProject
See this MSDN article: Comparing Web Site Projects and Web Application Projects
Web Site Projects Prefer dynamic compilation and working on pages without building entire site on each page view (that is, save file and then simply refresh the page in the browser).
Upvotes: 1