Analysis of ASP. NET website publishing process on VM

Source: Internet
Author: User

I recently published an ASP. NET Website. After several days of hard work, I finally succeeded in the release today. Now I want to write down the Problems and Solutions encountered during the release process and hope they will be helpful to everyone.

I. Buy a domain name

A domain name is a website identifier. A good domain name can give you more access traffic. Before purchasing a domain name, check whether the domain name already exists. Domain names can be purchased abroad or in China. Major domestic providers include hichina, xinnet, Huaxia mingwang, and 59. Domain names outside China are relatively cheap and do not apply for ICP filing, but the premise is that you have to understand the English. As a patriot, although domestic domain names are more expensive and still need to be filed for record, I chose to buy a domain name at Huaxia mingwang. The newly purchased domain name must be filed for use, but you can use a foreign CDN image to resolve the domain name, so that the domain name that has not been filed can be used temporarily. The supplier's website describes the domain name resolution process.

Ii. VM

You need to select a suitable host based on your website's purpose, estimated traffic, and quota. I chose a personal host, with a total of two hundred MB space + 2 GB database, more than yuan a year. When you select a host, you need to test the host speed. The shorter the progress bar, the faster the speed.

3. Upload a website

By using the FTP tool, you can easily connect to the host by entering the Host IP address. After the connection is complete, you can upload the website on your local hard disk to your space. At first, I chose to upload the entire folder. As a result, a file with a Chinese name indicates that the Upload Failed, after a reminder from the technical staff, I first packed the website files into a compressed package, uploaded them to the space, and decompressed them. This can avoid many errors. I don't know what the host requirements of other vendors are. The host of Huaxia mingwang requires that the website files be placed in the WWW folder under the root directory.

IV,Subdirectory binding/domain name binding

In this step, bind your domain name to the website directory of your space. For example, "/" indicates the root directory of WWW, for example,/BBS indicates/www/BBS.

First, create a sub-site. For example, I have a website folder named mybbs, which contains the entire website file, a bin folder containing DLL, and a homepage index. aspx. In step 3, I put this mybbs folder into the WWW folder, and then my sub-site can set it like this:/mybbs.

Then add the primary domain name, for example, my domain name is yuananyun.com. Then I can add a primary domain name yuananyun.com with a prefix of @ indicating null or other characters. Here I set it to "www ", bind the directory path to the sub-site name we previously set:/mybbs. In this way, your domain name has been settled with your website directory, and I will use http://www.yuananyun.com/index.aspx#my website later.

Note: You 'd better put the homepage of your website directly in the mybbs folder instead of its sub-Folder. Otherwise, you have to modify the sub-site settings. In this case, your url is too long.

V,Website file deployment

This step is very important and I have been working on it for a long time.

First, put the bin folder under the root directory, that is, the WWW folder. Otherwise, your website may prompt that the link library cannot be found.

Second, make sure that the mybbs folder contains a correct web. config file. Modify the database connection string!

Finally, you need to provide the database backup file XXX. Bak so that the technical staff can help you open the database.

After the configuration in the above steps, your website should be accessible. Next I will post an error and propose a possible solution:

 

First

"/" Indicates a server error in the application. Runtime error
Note: An application error occurs on the server. The current custom error settings of this application Disable remote viewing of detailed information about application errors (for security reasons ). However, you can view it in a browser running on the local server computer.

Details: to enable others to view details of this specific error message on a remote computer, go to the "Web. create a <mermerrors> tag in the config file. Set the "Mode" attribute marked by <customerrors> to "off ".

<! -- Web. config configuration file -->

<Configuration>
<System. Web>
<Customerrors mode = "off"/>
</System. Web>
</Configuration>

Note: Modify the defaultredirect attribute of the <customerrors> Configuration tag of the application to point to the URL of the custom error page, you can use a custom error page to replace the current error page.

<! -- Web. config configuration file -->

<Configuration>
<System. Web>
<Customerrors mode = "remoteonly" defaultredirect = "mycustompage.htm"/>
</System. Web>
</Configuration>

It is very likely that your configuration file is not wrong. Do not rush to modify the configuration file. It may be that the sub-site directory you configured does not have web. config file to add a correct web. config file. It may also be because your sub-site settings are wrong. You may have set a folder in mybbs as a sub-site, and your entire website has been split by someone else, if the file cannot be found, an error is returned.

 

 

Second

The HTM page is accessible, and the ASPX page is unavailable. It may be because your sub-site settings are wrong. You may have set a folder in mybbs as a sub-site, and your entire website has been split by someone else, if you cannot find the file, an error is returned. You only need to set mybbs in the direct folder on your website.

 

 

 

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.