asp.net Web application in vs2008 Web site

Source: Internet
Author: User

Vs2008 in the new B/s structure of the project there are two types, one is the Web application, namely, Web applications, the other is a Web site, the new project if the choice is not correct, in the subsequent development process will inevitably encounter to modify the project type situation. After the online explosion and testing, the following is a solution to the ASP.net application site project methods and background knowledge:

The 1.VS2008 project type is determined by the GUID

In the solution file (. sln), you can see project ("Following the GUID value, the GUID of the Site class project, and the GUID value of the Application class project is not the same," we can create a new Web site, and then put project (" The following GUID value is copied out for standby.

If the value in your solution file is Project ("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"), then this is an application type project, and the value of the Site class project should be: Project ("{ E24C65DC-7377-472B-9ABA-BC803B73C61A} "), all we have to do is change the project type to the GUID value of this site.

2. The website class project is more than the ASP.net application project to come out some parameter value

Web site class projects in the solution file more than a few virtual paths and compile-side parameter information, application class projects do not have these content, so we still want to create a new empty Web site project, the following content copied to the original application project parameters:

Projectsection (websiteproperties) = Preproject
TargetFramework = "3.5"
Debug.AspNetCompiler.VirtualPath = "/website1"-----------------------> here needs to be changed
Debug.AspNetCompiler.PhysicalPath = "./xinrong_steel_tube/"-----------------------> Need to change here
Debug.AspNetCompiler.TargetPath = "precompiledweb/website1/"-----------------------> here needs to be changed
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/website1"-----------------------> here needs to be changed
Release.AspNetCompiler.PhysicalPath = "./xinrong_steel_tube/"-----------------------> Need to change here
Release.AspNetCompiler.TargetPath = "precompiledweb/website1/"-----------------------> here needs to be changed
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
Vwdport = "1271"
Defaultwebsitelanguage = "Visual C #"
Endprojectsection

3. Application-class projects need to identify. csproj project files, but site class projects only need to provide a path

Carefully observe the parameters of the application project, as in the following form:

Project ("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DAL", "Dal/dal.csproj"

To compare the parameters of the site project, see:

Project ("{e24c65dc-7377-472b-9aba-bc803b73c61a}") = "DAL", "./xinrong_steel_tube/"

Obviously, then the GUID value is different, one is to specify the. csproj file path, one is to indicate the root directory path of the site, so we need to change this place.

4. Delete all the *.designer.cs files, replace all the *.aspx files in the codebehind= for codefile=, attention to the case, I do not have a development environment, vaguely remember these two keywords, but the case is certainly not the case.

Finally, you can reload the solution.

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.