Dreamweaver Build Blog (12): Upload blog to remote space

Source: Internet
Author: User
Tags config domain name dreamweaver root directory
Dreamweaver| upload in order to make doking ' s blog program uploaded to the remote space after the normal operation, the following introduction several installation points.

1. This tutorial provides the doking ' s blog program is based on the site root directory, because to use the Web.config configuration file, Bin directory and Aspnet_client script library, these three files and directories must be placed in the root directory of the site to the dataset, The form validator works correctly.

2. The source and Web.config configuration files, bin directories, and Aspnet_client script libraries in this tutorial are all in the same directory, and the three file locations are not moving, and if you want to place the Doking ' blog page in a level two directory under the root directory, for example:

http://localhost/dkblog/

In the above address, the Dkblog directory is to place the doking ' s blog page file, all other files can be copied to the Dkblog directory except Web.config configuration file, Bin directory and aspnet_client script Library upload to the root directory.

3. Since Dreamweaver MX holds the strings attached to the database in the Web.config configuration file and opens the Web.config configuration file, you can see that the physical path of the database is local as shown in the red circle in Figure 12-1.

Figure 12-1 web.config configuration file section content

Because it is uploaded to the remote space, its physical path generally does not have the same physical path as the local. You cannot use a server variable such as Server.MapPath in a Web.config configuration file to obtain a database physical path to a remote space.

You can obtain the real directory physical path of the database on the remote host by using the following methods. Assume that the address of the domain name in the upload remote space is as follows:

Http://www.pconline.com.cn/dkblog

Access to the two level directory Dkblog of the remote virtual host through the above virtual address, the database file is saved in the DAT folder, so the actual virtual address is:http://www.pconline.com.cn/dkblog/dat

Create a new blank asp.net vb dynamic page in dreamweaver, switch to Code view, and enter the following code:

<%=server. MapPath ("")%>

Save as Dkurl.aspx and browse in IE, the results are shown in Figure 12-2.

Figure 12-2 Testing the physical path

You can see the physical path where dkurl.aspx is: d\dkblog\, the physical path of the database is naturally: D:\dkblog\dat\dkblog.mdb.

After you get the physical path to the remote host, open the Web.config configuration file and modify the physical path to the database.

Reminder: To this doking ' s blog program development has been completed. The program is very simple, but it is helpful for beginners to develop databases. The actual application of the blog program is actually very complex, many skills to be readers to ponder and research.



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.