Insus.net usually how to publish their own development site, today to share to everyone. Maybe you're doing the same thing as insus.net.
This is the first to create a site in VS and then deploy it to IIS.
In general, Insus.net creates a new site that is created with an empty. But this is a demo, so create a site with an instance.
Refer to the following steps to place the site file under the E:\Projects\ directory.
A site with an instance is created, no matter what the site, before the release, we need to build a bit to make sure that there are no errors.
Everything is OK and there are no errors:
The following can be publish Web site:
In the Publish web window, step 1,profile Select Custom:
In the New Custom profile window, the tag 1 input "WS1" is the same as the site name.
In the Publish web window, step 2,connection, Tag 3 selects the file system, which is published as a filesystem method. Target location Select a destination path.
In the Publish web window, step 2,settings,configuration selects debug (default selection), and the three options of file Publish option are selected, and new files are obtained in later Publish.
See the following two lines of file, stating that it has been successfully publish:
The next step is the point. I copy a Web application to a new location, such as the D drive:
Then remove the App_Code directory .
Next, we go to just publish directory, and expand to the Bin directory, only need App_Code.dll file copy down. That is to say, we do a series of publish actions above, we only app_code.dll for this file.
Put it under the D:\WS1\bin directory above.
Eventually D:\WS1 These files can be uploaded to the server for IIS deployment.
Files in this directory are less than the source program files in the App_Code directory. But in the bin directory, there is a App_Code.dll file, this app_code.dll is from the publish results.
The next IIS deployment is similar to the IIS deployment of the simple ASP. Http://www.cnblogs.com/insus/p/4466200.html release.
Keyboard win key +r key run Inetmgr:
In the Internet Information Services (IIS) Manager window, on the left, expand to the default Web site site, right-click Add Application ...
In the ADD application window, refer to the following markup and complete.
Browse to see:
Results:
aspx Web publishing is done.
The point is to delete the App_Code directory and copy the App_Code.dll file to the bin directory. get the deployment file.
Follow up the situation need to explain, after the site has been modified, how to publish and update.
In the first case, only the xxx.aspx file is modified, such as:
At this point we do not need to do any publish action, just upload the about.aspx file to the server directory and replace the file.
Modified Browsing Results:
In the second case, we have modified the xxx.aspx and Xxx.aspx.cs files.
Add a control to the Default.aspx
<ID= "Labelcurrenttime" runat= "Server" Text= "" ></asp:label>
In the Default.aspx.cs Page_Load event, add the code:
this. Labelcurrenttime.text = DateTime.Now.ToString ();
At this time there is no need to do any compilation, directly from the source program, the 2 files Default.aspx and Default.aspx.cs uploaded to the server, and replaced.
Browse to see the results:
The above 2 cases, whether modified xxx.aspx,xxx.aspx.cs,xxx.html,xxx.ascx,xxx. ASCX.cs and so on, all need publish, modified direct copy upload to the server for the net.
The last one is that you have modified the code in App_Code, such as:
Add a Class,test.cs, implement the environment, perhaps you did not add a new class, just modify a class, it is also the case:
Open the page contact.aspx, and modify the add below:
In the Contact.aspx.cs code page, add the following:
At this point, we copy the contact.aspx and Contact.aspx.cs to the server and replace the old file. You also need to publish the source program. The new app_code.dll will be obtained and also uploaded to the server's Bin directory for replacement.
Then browse the modified website:
Finally, there is a hint, that is, when you have a program to refer to the new Xxx.dll, it is also in the publish path of the bin directory, the DLL upload to the server's Xxx.dll directory.
Publishing Site ASP (ASPX)