An explanation of ASP. NET Visual Studio2010 Publishing Web site

Source: Internet
Author: User
Tags visual studio 2010

Today, I studied how to publish a Web site, was always impatient, encountered some problems on the mood, and today finally a bit of patience to figure out. In fact, there are a lot of problems, and there is no full explanation on the internet, so combined with their own other methods for a summary.

Environment: Win7 system, Visual Studio 2010,iis6.1

About the release section, you can view this link http://wanghaitaoboke.blog.163.com/blog/static/1708725122012527716235/, the steps are written in detail. To add: In its second step, "Publish the Web" section, "Destination file" to select a folder that is not project engineering.

If everyone is set up better, read the above article your website has been published, in the LAN can be browsed. However, usually if you are released for the first time, it should not be so smooth. Focus on the following:

There are several possible scenarios when you enter a set IP address + port number in the Address bar.

Problem one, the ASP. NET settings that are not applicable in integrated managed pipeline mode are detected.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/40/09/wKioL1POFKTgahLxAAeP-N2p45M282.jpg "title=" Qq20140722132825.jpg "alt=" Wkiol1pofktgahlxaaep-n2p45m282.jpg "/>

Workaround: Open IIS, select an application pool, and you will see an entry in the Action Bar on the right for "Set Application pool Defaults", click Enter, set "Enable 32-bit application" to true and "managed pipeline mode" to classic.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/40/09/wKioL1POFL7iEPsNAAJZdLWZ2p0111.jpg "title=" Qq20140722141349.jpg "alt=" Wkiol1pofl7iepsnaajzdlwz2p0111.jpg "/>

Issue two, the page that you requested cannot be provided due to the Web server's ISAPI and CGI Restrictions list settings.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/40/09/wKiom1POE9Oh4aDqAAjgluflWzE001.jpg "title=" Qq20140722133016.jpg "alt=" Wkiom1poe9oh4adqaajgluflwze001.jpg "/>

Workaround: Open IIS, select the root directory, double-click the ISAPI and CGI restrictions, and then set both of the "ASP. v4.0.30319" to allow.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/40/09/wKioL1POFQXTVRklAAMMOPZtvoo976.jpg "title=" Qq20140722141722.jpg "alt=" Wkiol1pofqxtvrklaammopztvoo976.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/40/09/wKiom1POE_zzzQm6AAHXQ6mhlfM949.jpg "title=" Qq20140722141949.jpg "alt=" Wkiom1poe_zzzqm6aahxq6mhlfm949.jpg "/>

Problem three, there are no accessible tables. Be sure to register at least one data model in Global.asax and enable scaffolding, or implement custom pages.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/40/09/wKiom1POFCHBOZUAAAgX0pU9_J8622.jpg "title=" Qq20140722133404.jpg "alt=" Wkiom1pofchbozuaaagx0pu9_j8622.jpg "/>

WORKAROUND: Open the project, open the Global.asax file, under the RegisterRoutes method we can see the following content

            //                      important:  Data Model registration               //  uncomment this line for  ASP.NET  dynamic data  Registration  LINQ to SQL  model.             //  to set up  scaffoldalltables  = true, the following conditions must be met,            //  That is, you want all tables in the data model to support scaffolding (that is, templates). To control the             //  scaffolding for individual tables, create a partial class for the table and set the              // [scaffoldtable (True) the]  attribute is applied to partial classes.             //  Note:  Make sure that the " Yourdatacontexttype "Change the      & of the data context class for the applicationnbsp;      //  name.             // model. Registercontext (typeof (Yourdatacontexttype),  new contextconfiguration ()  {  scaffoldalltables = false });

After the code snippet is unpacked, replace Yourdatacontexttype with the context you created, and set Scaffoldalltables to true, and I'm using the data part of LINQ to SQL. It's like this after the change.

Defaultmodel.registercontext (typeof (Bmscontextdatacontext), new Contextconfiguration () {scaffoldalltables = true});

After you modify it, don't forget to republish it again.

Issue four, unable to open database, logon failed

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/40/09/wKiom1POFFvS3BfVABFLAhUKktA768.jpg "title=" Qq20140722133934.jpg "alt=" Wkiom1poffvs3bfvabflahukkta768.jpg "/>

Solution: This problem just came out when a little confused, thought it was IIS Setup problem, later carefully, vaguely feel familiar with, by looking at the database connection, found that there is a connection database on the problem, and IIS settings are irrelevant. And the solution of this problem in a previous article in detail, encountered this problem, are so resolved, we can see the following link: http://zhouhongyu1989.blog.51cto.com/2931598/1390501

After solving the above problems, once again log on to the post-publishing site, will be able to access the normal, and then in the same LAN on the other machine to verify, there is no problem.

This article is from the "Give Me a Gener cigarette" blog, please be sure to keep this source http://zhouhongyu1989.blog.51cto.com/2931598/1441389

An explanation of ASP. NET Visual Studio2010 Publishing Web site

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.