Step - 1 : Writing the code behind
public DataSet getOrderDetails(string OrderNumber)
OracleConnection con = null;
OracleCommand cmd = null;
query = "Select * from table_name where CUSTOMER_PO = '" +
OrderNumber + "' ORDER BY REQUEST_DATE ASC ";
con = new
cmd = new OracleCommand(query, con);
DataSet orderDataSet =
OracleDataAdapter adapter = new OracleDataAdapter(cmd);
catch (Exception e)
query = e.Message;
Step -2: Deploying
1. Publish the webservice.
2. Create a virtual directory in IIS
3. Bind the published webservice path to the virtual directory created.
4. In IIS 7, individual app pool is created for every virtual directory.
5. Browse the application link(find in the right side) to view your application.
1. If we are not able to view the webmethods writen, Possibly the directory browsing is not enabled. We can enable it. It is quite simple.
3. TNS entry error- This is a very often error which can be solved by just having an entry for the datasource, in the TNS file which can be found somewhere similar to C:\Orawin\network\admin
It happened to me like, my code was working perfect with all the servers except with the development environment.
Later we found that the dev server was 64 bit which caused the problem. So we made changes like building the code in X64 configuration/ enabling or disabling 32 bit in IIS. We replaced Oledb with Oracle connection and replaced the conn string with the actual TNS entry.
Finally having the reference "using Oracle.DataAccess.Client;" and modifying the connection object like
"con = new OracleConnection("Actual TNS entry");" and it worked.