简体   繁体   中英

ASP & IIS: Can you have compile errors for only individual URLS?

Say we have a few developers working on an ASP server. Occasionally a page will cause a compile error (but it is site-wide). This is especially annoying if one of us hits save before going to lunch and nobody else can work on their own aspx pages.

Any settings to allow for page specific compiling only, or is the nature of the w3c service such that all assemblies have to compiled (application-wide)?

You have pre-compilation enabled. If you turn it off, the pages will only be parsed and compiled on first request, I guess that's what you want!

Precompilation is done by AspNetCompiler. If that is not triggered by a custom build process, it's likely in the .csproj file. How exactly it looks may vary by project type.

Here is how it looks in a MVC 3.0 Web Role:

<!-- no precompilation here! -->
<MvcBuildViews>false</MvcBuildViews>

<!-- here's the setup for AspNetCompiler...-->
<Target Name="MvcBuildViews" AfterTargets="AfterBuild"
Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" /> 
</Target>

More on AspNetCompiler: http://msdn.microsoft.com/en-us/library/ms164291.aspx

Normally, pre-compilation is turned off by default. This setting is also useful if you actually WANT full checking of all the views' code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM