MVC4 website release (sorting + partial reprinting + partial problem collection and solution)

Source: Internet
Author: User

Website publishing steps:

This part indicates the source of the reprinted article here. In the past, some articles were not marked, please forgive me, because some of them cannot find the source, or for other reasons.

If you have any offense, please contact me, delete or indicate the source.

Because good articles only wanted to be added to favorites in the past, but connections sometimes failed, so now you can directly turn to yourself.

Source http://blog.sina.com.cn/s/blog_acb983ba0101c5um.html

 

1. Open your VS2012 website project, right-click the project menu to regenerate the website project, and right-click it again to publish:

2. The website publishing settings panel is displayed. Click <new...> to create a new publishing configuration file:

Enter your own configuration file name:

3. Click "Next": Select "File System" in the release method, so that you can publish the file to your specified local file.

Select your own folder: Click the red arrow in the upper-right corner to create a new folder and customize the name (my WebSite will be written ). Click Open to go to the next step.

4. In the configuration, select "Release" -- Release mode (ReleaseCalled a release version, it is often optimized to optimize the code size and running speed, so that users can use it well. DebugIt is usually called a debug version. It contains debugging information and is easy for programmers to debug programs without any optimization)

5. Click Next To Go To The preview page before release.

Click Publish to publish the folder you specified. Here, I am releasing the WebSite folder under drive C.

After the release is successful, open the folder and the. cs files on all pages will disappear. Where can I go? Is it in the bin folder? Let's guess.

Released:

6. Start 'Internet Information Service (IIS) manager' through control panel management tools to enter the IIS interface.

Right-click a website to add a website

7. In the figure below, enter the custom website name in the red box on the left (Please use English as much as possible. Here I will write MyPhotoSite). Click Select (E) at the red arrow on the right )... .

You can click the drop-down list box to select your own website version (generally, do not include a Classic version ). Here, I chose defaappapppool,

8. Select the physical path of the published website folder.

9. Click the drop-down list and select "your current IP Address"

Click "OK". Our website will be released just one step away. Click "MyPhotosSite", and then click the Red Arrow to switch to "content View ".

10. Last step: register the IIS server. Command: aspnet_regiis-I (copy it). First, run Visual Studio Tools in VS2012 in the program menu. Right-click the "VS2012 developer command prompt ". Run as administrator. (If it is not run as an administrator, the error "insufficient Permissions" will be prompted)

After running, right-click and pasteAspnet_regiis-I press Enter. Wait for about 1 minute to prompt that the installation is complete (my host is slow, so it will be provided for your reference for 1 minute. Don't worry about waiting for the installation to complete ).

Finally, right-click your website homepage. IE sometimes does not respond (the address bar is blank), and it will be successful after multiple browsing. Let's take a look at our results:

 

 

You can click the drop-down list box to select your own website version (generally, do not include a Classic version ). Here, I chose defaappapppool,

But we chose ASP. NET v4.0 for MVC4 (because it comes with Classic)

 

 

 

IIS publishing steps:

 

This part indicates the source of the reprinted article here. In the past, some articles were not marked, please forgive me, because some of them cannot find the source, or for other reasons.

If you have any offense, please contact me, delete or indicate the source.

Because good articles only wanted to be added to favorites in the past, but connections sometimes failed, so now you can directly turn to yourself.

Source http://www.soaspx.com/dotnet/asp.net/DPattern/dpattern_20120621_9306.html

 

Website publishing environment: Win7, IIS7.5

Website compiling environment: Win7, VS2010, MVC3

Control Panel -- program -- enable or disable the Windows function -- Internet Information Service. Set [Internet Information Service] According to settings. Now IIS7.5 is ready.

Compile Solution in VS2010, and select Build -- Publish Test (here Test is the Solution name) in the menu bar. The following window is displayed:

The website is stored in C: \ inetpub \ test.

Control Panel (view method: small icon) -- management tools (2) -- Internet Information Service (IIS) Manager (double-click to open, 3) -- application pool (double-click to open ),

Check whether ASP in the green box in Figure 3 exists. NET v4.0, ASP. NET v4.0 Classic. If no, the Framework is not fully installed. In this case, the published website cannot be accessed.

Solution:

Start -- cmd, Enter the following string in the Command manager and press Enter (1 ):
% Windir % \ Microsoft. NET \ Framework \ v4.0.30319 \ aspnet_regiis.exe-I

Figure 1 cmd

Figure 2 management tools

Figure 3 Internet Information Service (IIS) Manager

Internet Information Service (IIS) Manager (double-click to open, 3) -- Right-click website and choose add website from the shortcut menu ......] Figure 4 is displayed.

Figure 4 Add a website

After the above operations, the website will be published successfully.

Double-click the new website test, 5, Select Restart on the right, and Click Browse 192.168.19.19… Under browse website on the right ......], You can view the published website in the browser.

Figure 5

 

 

 

 

Some possible problems:

Error:

User 'iis APPPOOL \ ASP. NET v4.0 'Login Failed.

Note:An unhandled exception occurred during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.

Exception details:System. Data. SqlClient. SqlException: log on to 'iis APPPOOL \ ASP. NET v4.0.

Source error:

An unhandled exception is generated during the execution of the current Web request. You can use the following exception stack trace information to determine the cause and location of the exception.

 

 

 

 

Provider: Shared Memory provider. error: 0-No process on the other end of the MPs queue has successfully established a connection with the server, but an error occurs during logon. (Provider: Shared Memory provider, error: 0-there is no process on the other end of the MPs queue .)

User 'sa 'Login Failed. This user is not associated with a trusted SQL Server connection.
Note: An unhandled exception occurs during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.

Exception details: System. Data. SqlClient. SqlException: User 'sa 'Logon Failed. This user is not associated with a trusted SQL Server connection.

Note: An unhandled exception occurs during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.

The solution is as follows:

First, select the SERVER (right-click)> Properties> Security> SERVER Authentication To "SQL SERVER and WINDOWS Authentication mode"
Next, expand "security"-> login name-> select the SA Login Account (right-click)-> Status-> login to enable

Solution:
1. log on to Management Studio as a Windows user, right-click the Server and select properties, and change the security options to SQL Server and Windows authentication modes.






2. Set attributes of the sa user in security-> logon name. The "Logon" field is displayed in the Status column. By default, this field is disabled and enabled.




3. Open the configuration tool> "SQL Server peripheral application configurator", and then select "service and connected peripheral application configurator ".
Choose remote connection> Local Connection and remote connection> only use TCP/IP and click "application ".
Then select the service to stop the SQLEXPRESS service and restart it.





The above content

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.