C # finish A website how to publish?

Source: Internet
Author: User

A period of time in the local area network published a self-made website, the release process encountered a lot of problems. The following about the release process and issues encountered in the release process and share with you all, I hope you can help us!

Before publishing an ASP. NET Web site to the server, you need to complete the following steps:
1. Create a virtual directory in the server to hold all Web site files;
2. Specify the domain name or IP address to use for the site;
3. Provide the FTP user name and password for the remote user to upload the file.

One, configure IIS on the Web server
The abbreviation for Internet Information Server (IIS) is a world Wide Web server.
Gopher server and FTP server are all contained inside.
IIS means that you can publish Web pages and have ASP (Active Server Pages), JAVA, VBScript-generated pages,
has some extended functionality.
Second, IIS is a file and application server that is provided with Windows NT Server 4.0.
is the basic component of establishing an Internet server on Windows NT Server. It is fully integrated with Windows NT server,
Allows the use of Windows NT Server built-in security and the NTFS file system to build a powerful and flexible internet/intranet site.

1. Prepare an IP address for the site
Any site that can be accessed must have a fixed IP address as a prerequisite for Windows Server 2003 or Windows XP
Allow multiple IP addresses to be set for the same fast NIC, as follows:
Right-click on local Area Connection and execute the Properties command on the popup shortcut menu to open the Local Area Connection Properties dialog box.
After you select Internet protocol (TCP/IP), click the Properties button, click the Advanced button in the dialog box that opens, and then
Click the Add button in the IP address area to enter the IP address and subnet mask you want to add in the dialog box that opens.
(e.g. IP address: 192.168.0.1, subnet mask: 255.255.255.0)

Note: Microsoft has a clear description of the above operation: "If the same network card has more than 9 IP addresses, it does not guarantee the stability of its operation."
An effective solution to this problem is if the number of sites scheduled in the same server is too large, you can use the IIS
Specify a different TCP port number to differentiate between different sites. such as: "http:\\192.168.0.1:8080" and "http:\\192.168.0.1:8081"
Represents access to two different sites that use the same IP address (the port number is "8080" and "8081"), and the default port number for HTTP is "80".
That is, "http:\\192.168.0.1" is equivalent to "http:\\192.168.0.1:80".

2. Create a "home directory" for the site
Each Web site must have a "home directory". This directory is the directory on the server where all the files on the site reside. Requires that the directory
The drive must be an NTFS partition.

3. Configure IIS
Open Administrative Tools in Control Panel, open Internet Information Services (IIS) Manager in the Administrative Tools window
Open the IIS Management window. In the left window of the organizer, select Web site, and then on the Action menu, select site under new
Command. Start the Site Creation Wizard, and then follow the wizard prompts to enter a description of the site and the IP address assigned to the site, and so on. Operation completed
An empty site will be created later. Web sites can be accessed through a browser as long as the completed site is published to the specified directory on the site.
Note: For systems that do not have IIS added, you must first add IIS to it. To add a method: Open Add/Remove Programs in Control Panel
Select "Add/Remove Windows Components" and click "Internet Information Services (IIS)" To insert the system disk into the optical drive and tap "Next"
The installation of IIS. The configuration of the Web site in IIS is only possible if IIS is installed first.
Note: For sites that create good virtual sites, you can also set them further in the IIS Management window. In the IIS Admin window, right-
Click on the created Web site and open its Properties dialog box for further setup:
(1) ASP. NET 2.0 is required because the ASP. VS2005 created
Version is supported, and IIS generally defaults to ASP. NET 1.1 so in the Open Properties window, under the ASP. ASP. NET 2.0
Version drop-down list box, select the ASP. NET 2.0 version.
(2) On the document tab of the Open Properties window, click the "Add" button in the "Enable Default Documents" section to place the name of the site's start page
Added to the text box. This will open the default start page after entering the domain name or IP address of the site in the browser without entering the start page name.
(3) In the Web Site tab of the Open Properties window, you can change the description, IP address, and TCP port information for the site.

The first time you publish a Web site, you will often encounter the following issues:
(1) After entering the address of the website in the browser, the following prompt appears:
"Server application not available
The Web application you are trying to access on this Web server is currently unavailable. Please click on the "Refresh" button in your Web browser to retry your request. ”

When we look at the system event Log discovery:

Error:
Failed to initialize Appdomain:/lm/w3svc/1/root, failed to load file or assembly "System.Web ..."

Error:

The request could not be executed because the application domain could not be created. Error: 0x80070005 denied access.
Warning:
Failed to initialize appdomain:/lm/w3svc/...
Exception:System.IO.FileLoadException
Message: Failed to load file or assembly "system.web, version=2.0.0.0, Culture=neutral,
PUBLICKEYTOKEN=B03F5F7F11D50A3A "or one of its dependencies. Access denied.
and other error messages.

There are generally two reasons for the above problems:
1. asp.net2.0 is not properly registered in IIS
2. Permissions issues

In the first case, you can reregister the ASP:
System Disk \windows\microsoft.net\framework\v2.0.50727 (here is the version number) \aspnet_regiis.exe
-I.
Or, enter directly at the SDK command prompt in the mocrosoft. NET Framework v2.0: Aspnet_regiis.exe
-I.
If this is a permissions issue, you need to make sure that the ASP. NET runs the account (by default, the network in Win2003
Service, which is ASPNET in XP) has the appropriate access to n directories, mainly the system directory
(the list can be easily found on the web), as well as an easy-to-ignore directory: The virtual directory for the Web application


(2) After entering the address of the website in the browser, the following prompt appears:
"Failed to access IIS meta data"

This is due to the first installation of VS 2005, which appears after the installation of IIS.

The solution is as follows:
In the Start menu, open the SDK command prompt in the Microsoft. NET Framework SDK V2.0 directory.
Open the command prompt to run "aspnet_regiis-r" on it.
If you are installing only the. NET Framework, you can run the same command in the following directory:
%systemroot%\microsoft.net\framework\v2.0.50727

Second, create FTP remote management account

After you create a site in IIS that publishes the ASP. NET site, you also need to provide the user with an FTP server account for uploading files remotely.


Of course, if it is only published on the local area network, the last step will be saved.

C # finish A website how to publish?

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.