[Original] Experience: ASP. NET Oracle deployment issues and workarounds

Source: Internet
Author: User

Streamlined beauty ...

First, the environment
Development environment
Win7 64bit
Vs2010
Oracle 11g R2 64bit
<instantclient-basic-win32-11.2.0.1.0>

Deployment environment
Winserver R2 64bit
Oracle 11g R2 64bit
<instantclient-basic-win32-11.2.0.1.0>
iis7.5

II. Deployment Issues and solutions
Right-click on the VS Project and choose Publish. Publish as file system, specifying the target location. After publishing, locate the destination folder and copy all the files to the directory established in the server IIS. The login page can be opened with http://server IP port access, and "This page cannot be displayed" is displayed after clicking Login.
Baidu "Unable to display this page", the results found countless questions and answers. The questions remain after the selection of top-ranked tests.
Helpless, Response.Write (); Response.End (); the output determines which step to take when the above problem occurs. The result shows that the above problem occurs when executing Response.Redirect (). Response.Write (jump URL), found a "/" in the target path (.../index.aspx). Then find the extension method VirtualRoot (), found on the page. Request.applicationpath does not determine whether it ends with a "/" (whether it is in a deployed environment), and resolves the problem after modifying this method.
public static string VirtualRoot (this page page)
{
var result = page. Request.applicationpath;
result =!result. IsNullOrEmpty () && result. EndsWith ("/")? Result:result + "/";
return result;
}

You can now log in normally. The login sends a sudden jump out of a dialog box. Xmlhttpobject. Check that this is an AJAX go to access WebService when the error printed content. The error code is 404. So debugging Ajax trace Discovery, or path problem.
In the development environment JS function Getrootpath ()/online can be found/can return the virtual path normally. As the function itself notes, it contains a project name, and we deploy it without the project name as the path node, so you can return the virtual path normally after removing the project name. Then log in again and find that the problem remains. Just the error code changed 500. Continue Baidu, after an attempt to find changes in Web. config, added under system.web
<webservices >
<protocols >
<add name= "HttpSoap"/>
<add name= "HttpPost"/>
<add name= "HttpGet"/>
<add name= "Documentation"/>
</protocols>
</webServices>
The webservice can be accessed normally. The reason is that IIS does not allow access to WebService by default (what is the rule?).
Well, the website can finally open all the pages. The mood is joyful. Oh,man.what is going on? Why is there garbled characters? Isn't the database character set wrong? Hurry Plsql Compare the next two databases what's the difference? As a result, shit. The same. Continue Baidu, and wen.lu. After being bombarded by various solutions on the network, the solution was finally found in the ASP. NET Oracle Chinese garbled solution. People say that you don't have to change the character set, you want your Oracle to support Unicode just need to add unicode=true to the connection string. Plus, OK, the Web is annoying?? Finally, No.

This is my first time to have an ASP online deployment experience. Leave traces for inspection.

[Original] Experience: ASP. NET Oracle deployment issues and workarounds

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.