Which of the following two modes are ASP. NET 2.0: website and web application?

Source: Internet
Author: User

The company's website is being converted to a pattern recently, mainly because2.0OfWebsiteMode often causes hard-to-understand compilation errors and system crashes. According to colleaguesDotnetnukeProjects also face the same problem, and they always appear randomly and cannot find the cause. The main problem is as follows:

Loading This Assembly wocould produce a different grant Set From other instances.
(Exception from hresult: Zero X 80131401 )

Description: An unhandled exception occurred during the execution of the current Web request.
Please review the stack traceForMore information about the error andWhereIt originatedInThe code.



 You may have seen this error. The problem is that when this problem occurs, you don't know whether it is the file or not.CodeErrors are caused, especially when> 10 GB. So we can onlyIisreset, And deleteAsp.net. This situation continues.2Later, we found that this error will not occur as long as no one updates the files on the website. Generally, it occurs when a file is updated and the website is compiling itself.

 

WhenVs2005When publishing,WebsiteThe development mode of is one of the most important highlights. However, in actual use, we find that,WebsiteFor example, you can directly modify anyCode-behindAndApp_codeCode without re-compilation. HoweverProduction ServerThe application is still using this method, it is a bit inappropriate. The main problem is that whenProgramAfter the code has been modified and uploaded, the website itself needs to be re-compiled, and there will be multiple external accesses; this can easily cause confusion throughout the compilation process. The other problem is that programmers can only know whether the modified Code is correct after the website self-compilation is complete, which is very dangerous.

 

Based on these problems, we decidedWeb Application.WebappYesAsp.net 1.1The default Development Mode in, but inVs2005Cannot be found in the initial version. You need to installHotfixAndPlug-inTo use this function.

 

Install "MS Visual Studio 2005 hotfixes"

Install "vs2005 web application projects"

Http://www.microsoft.com/downloads/details.aspx? Familyid = 8b05ee00-9554-4733-8725-3ca89dd9bfca & displaylang = en

Install "vs2005 web deployment projects"

Http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/

 

 


Figure:After the installation is complete, you will find thatWeb ApplicationProject Type

 

However, for existingWebsiteMode project, you can use the shortcut menu to convert itWebapp, After the new compilation, you will findBinThe folder is back.

I personally think that usingVs2005OfWebsiteMode development is a good choice, but if you want to deploy it, especially when the website project is very large, you still need to useWeb ApplicationIn this way, you know whether the website has been compiled, where all files are needed, and the latency of dynamic website compilation is also reduced, performance also has some advantages.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.