Windows server2008 Building ASP Interface Access connection Oracle database whole process record

Source: Internet
Author: User
Tags dsn

Really is too difficult, before the time in Window Server 2003 above a set of Asp+oracle interface system, it cost a great effort, in fact, that will be fascinated gaze stare also do not know how to fix, also lazy tube. OK, from yesterday to today plan to deploy the interface from the test environment to the public network environment when there are a variety of problems, this time must be recorded.

Let's take a look at the overall scenario for this interface system:

The use of ASP is because it belongs to the lightweight interface system, only need to modify the copy and paste the interface immediately effective, and do not need to like the Java System interface program to use tomcat package, upload, deploy such. So this system is now enabled on Windows Server, then the Web page service is established, then the database is connected via ODBC, and the Oracle database is accessed and connected in the Web page.

Here's how to implement this process in step-by-step steps.

1. Startup of the IIS service.

Reference Link: Http://www.ip-tcp.com/?tag=windows-server-2008-iis-%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%AE%89%E8%A3%85%E4%B8%8E %e9%85%8d%e7%bd%ae

Because we are the deployment of ASP, so remember to put these two related to the hook, the feeling does not check the ASP.


After the installation is complete, IIS Manager can be found in the administrative tools.


Here I am in fact because IIS has been started, but the estimate is not correct to be started, I looked for a long time did not find IIS Manager, and later rage the IIS service shut down and then restarted, hook ASP, OK. Most of the time, if you feel you have a problem with your operation, or if someone else has already done it for you but don't know why there is a problem, delete it and get it back.

Then we right-click on the website and choose Add site



Pop out the following interface:



This is the name of the site can be easily written, the physical path to choose your own set up a folder; Type and IP address do not change, keep HTTP and All Unassigned , the port may be filled with a random, because we have a Web site on this server has 80 ports, So I'm actually using 8080; hostname can not be written, then click OK

Note here that the IIS default page will take up 80 ports, just a colleague came to me to say that their web page opened into a IIS7 page, I see sure is the port to occupy.

Here our site is actually established, you can write a simple test page under the directory of your own website, this is the site directory I just finished, a simple index.html page


.

In the browser of the local input 127.0.0.1:8080 can be seen on the page shows 123456, indicating that our page has been built. If your server can access the public network, directly enter your public network IP address plus the port number, you can also see the newly created page.

In fact, the site has been built up, but there are two additional steps to do it here together.

The first is to be able to display the error code of the page , if not open, ASP what error prompts we can not see

Open our previous step to build a good website

Double-click ASP


Click on the Debug property, then the " send error to browser " option is false, we change it to True


The next step is to change the application pool to enable 32-bit applications , and why do we tell you later.



2. Installing and configuring the database

I installed here is the oracle10g client, basically is the default installation down, as if only
Installation Type , select Administrator and Oracle Net configuration Assistant: Tick " perform typical configuration " after the installation completes the database


In the Start menu, select Open Net Configuration Assistant


Select Local NET service name configuration


Select Add


Here's the service name to fill it out.


Selecting the default TCP is OK


One thing to note here: Ask your database administrator for the intranet IP address and port number of the database; I'm not sure if we can fill out the address of the network, because our system has done a more complex security authentication, I write the address is not OK, and then the port number should be asked clearly.


You can also choose to test directly, but it should fail because the user name and password used are incorrect,


Click on the changes below to login, change your username and password, and then re-test, you should be able to connect successfully


Next



The net CA is configured here.

3. Configure ODBC


Here's what happens if you use ODBC directly from your system:


You will find that there is only one SQL Server in the System DSN addition, this is the reason we mentioned earlier, 32-bit and 64-bit, but there are solutions on the Internet:


Find C:/windows/syswow64


Double hit Open Odbcad32.exe,

Select the System DSN, select Add, you can find oracle10g this we need to use the driver.


Click Finish


In the popup dialog box, the Data Source name is the name we created in the 2nd step, and the TNS service name is selected from the drop-down box in the previous step to build the good one, and the image is the name I created. Click OK, this step is complete.


4. Debug your ASP Web page

A typical test of whether your ASP can successfully connect to a database page is as follows:


Server fills in the first two steps we have the name, then the UID is your Oracle username, PWD is the password

remember our 1th step in the program pool that changed the Web to support 32-bit? If you do not have that step, your page should have 1 rows of 1,111111, which is what we output, and then a 80004005 error will be prompted .


The reason for the error is that the data source name is not found and the default driver is not specified

Using the method in this page http://blog.snsgou.com/post-619.html, which is what we have dealt with earlier, the program pool is changed to enable 32-bit program is OK.


If you think it is OK to be here, then you are wrong again, after the change, your ASP page will pop up another error:


Still a 80004005 error, but the reason for the error is sqlallochandle on sql_handle_env failure, continue to Google how to resolve, found this page:

Http://bbs.bccn.net/thread-192876-1-1.html

I also remember that before in Windows Server 2003 also appeared on the same problem, at that time also made a lot of and then restart on the OK, just hold the method to try, the same steps to operate again, and then restart, must restart, OK


Here, our entire ASP page link database all succeeded!!


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Windows server2008 Building ASP Interface Access connection Oracle database whole process record

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.