vs2012+win7 website release detailed steps
Native Environment:
This article is divided into three parts to introduce the general method of publishing Web projects, the big God level can be skipped, mainly for the convenience of some beginners.
Part I: VS2012 publish the project to the file system.
Part Two: IIS configures the published project.
The third part: frequently asked questions processing.
The first part: VS2012
publish the project to the file system.
1, open your VS2012 website project, right click on the project----menu, select "Regenerate" the site project, click the right button again to publish:
2. Pop-up website publish Settings panel, click < New. Create a new Publish profile:
Enter the name of the profile you define
3. Click Next: In the Publish method, select "File System" so that we can publish to the local files that we specify. Of course there are many types of publishing here, you can find each type of publishing online, I used to publish the way "file system", as shown in:
In, we choose to publish the current Web project to the "D:\RDIWeb" directory, of course, you have to set up under D: "Rdiweb" this folder.
4, click Next, in the configuration to select "Release"-Release mode (release: Known as the release version, it is often a variety of optimizations, so that the program in code size and speed is optimal, so that the user is good to use. Debug: Commonly called Debug version, it contains debug information, and does not make any optimizations, easy for programmers to debug the program)
5. Click Next: Enter the pre-Release preview screen.
Click Publish to publish the folder you specified, where I published the "D:\RDIWeb" folder.
After the publication succeeds, open the destination folder for the publication, which is published as follows:
Part Two: IIS
Configure the published project.
VS2012 we want to browse in the browser after we publish the project to the file system, we need to configure IIS.
1. Enter the IIS interface through the Internet Information Services (IIS) Manager, Administrative Tools, Control Panel, as shown in:
2. Double-click Internet Information Services (IIS) Manager, open Internet Information Services (IIS) Manager, right-click the Web site tree node on the left, and select Add Web site, as shown in:
Open the Add Web Site Properties window, as shown in:
Common Setup Item Description:
1), website name: The name of our website, can be arbitrarily named, here we temporarily take as "rditest".
2), physical path: Here the path is the file system path we VS2012 publish, and the path we publish is "D:\RDIWeb".
3), Port: We are set to 8092, as long as there is no conflict with the occupied port.
Click the "OK" button, our IIS settings are basically finished, is not very simple AH.
Now we select the "index.htm" file in the "Content view" and right click "Browse" to open this page in the default browser, as shown in:
Haha, not showing the page we want to see, according to the error above: " parser Error message : Unrecognized property" TargetFramework". Note that property names are case-sensitive. "We can see that the default. NET Framework for our RDI project is. NET Framework4.0, and the default is. NET Framework2.0 when you configure IIS, by selecting Application pools in IIS. Select the application pool named "Rditest" in the list on the right, and right-click on "Basic Settings" as shown in:
Open the Edit Application pool window, as shown in:
After selecting ". NET Framework V4.0.30319" in the ". NET Framwork version (F)" drop-down box, browse to the index.htm page. At this point, the following error appears, as shown in:
Do not lose heart, we continue to deal with, this error if it is 32-bit operating system will not appear, 64-bit operating system will appear this error, processing method at the same time set the name of "Rditest" application pool, right-select "Advanced Settings", as shown in:
Set "Enable 32-bit application" to "True" in the "General" key, as shown in. Browse the "index.htm" page again. At this point, the login interface is successfully opened, as shown in:
Click "Login" to enter the main frame interface as shown:
The third part: frequently asked questions processing.
1 , and the Common failure of ASP. NET to develop deployment in the environment.
Many developers use a specified 64-bit version of the library in an ASP. NET application when using a 64-bit operating system. For example, some specialized database drivers, device drivers, but the following error message is still present:
Failed to load file or assembly "..." or one of its dependencies, attempting to load an improperly formatted program.
This failure is caused by the fact that most of the ASP. NET compilers and containers are not set to 64-bit by default, but instead run in 32-bit compatibility mode. At this point, if the library is replaced with 32-bit, the system is functioning normally. If you intend to persist in using a 64-bit assembly, you can set it according to the methods described below.
2 , Visual Studio comes with the iisexpress settings.
In a 64-bit operating system, Visual Studio comes with a 32-bit IIS Express. If you need Visual Studio to debug an ASP. NET app using 64-bit assemblies using IIS Express, you should use the 64-bit version of IIS Express. The Setup method is as follows:
(1) Close the running instance of IIS Express;
(2) Click the Tools-Options command on the main menu to open the Options dialog box;
(3) In the Options dialog tree "projects and Solutions"-"Web Projects" tab, tick the "64-bit version of IIS Express for sites and projects" entry.
3 IIS settings on Windows Server .
IIS can set whether to run in a 64-bit environment for specific ASP. NET application settings, as follows:
(1) After you deploy the Web site, open Internet Information Services (IIS) Manager;
(2) Select the application pool in the directory, select the application configuration of the target site, and open the advanced settings via the right-click menu;
(3) Set the Enable 32-bit application option to false and the app will run in a 64-bit environment.
4 , whether the compiler needs to set the x64 platform in the solution configuration .
I looked at some of the documents and experimented on this issue. Personal views are as follows:
(1) Normal ASP. NET projects do not require platform settings, the platform settings for x86 and x64 do not affect the compilation and release of the project, so use the default any CPU platform.
(2) For projects that use an environment-restricted assembly, such as system-driven, database-driven, it is best to configure the corresponding platform. At the time of publishing the environment is abnormal, you can get more valid information and save debugging time.
Part IV: Common references.
1. ASP. NET WEB Application project Deployment FAQ.
2. IIS deploys the ASP. NET Project FAQ.
3, rdiframework.net-based. NET rapid Information System development Framework-Series catalogue
rdiframework.net Framework by the professional team for a long time to build, has been updated, has been upgrading, please rest assured that use!
Welcome to Rdiframework.net Framework Official public (No.: rdiframework-net), keep abreast of the latest developments.
Scan QR code for immediate attention
VS2012+WIN7 Website Release detailed steps