asp.net connecting to oracle db IIS problem RRS feed

  • Question

  • User-977512208 posted

    Hi guys,

    im develping a website that is connected to oracle database and read data every 5 secnds (by using timer)

    the project is working correctly and everything is good in Visual Studio environment

    (this is inside visual  studio )


    but when i run on IIS server as local host it is not connecting to the oracle database and gives page error..

    (this one from IIS server)


    Sunday, September 25, 2011 4:42 AM

All replies

  • User-1618234021 posted


    If you double click on the Error title in the lower left corner of the status bar, it will give more detailed error cause. Please share that with us.

    Sunday, September 25, 2011 5:23 AM
  • User-977512208 posted

    This is the details i hv got:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1)
    Timestamp: Sun, 25 Sep 2011 10:27:04 UTC

    Message: Sys.WebForms.PageRequestManagerServerErrorException: Unable to connect to the remote server
    Line: 4723
    Char: 21
    Code: 0
    URI: http://localhost/SMS/ScriptResource.axd?d=uEgWSOSttwa4MH_mGy_AEb_17_FRlyg2RKH-m_9nyvrfG7OF2s-Zm7-PGWw3WO3Ggc0I7LU1mtiOS-dxzY7CAytnRcQ0kpktKI2gjkebe1Xh7W1LlBcXi8UqmuKuiM-_6E0bSJ74cRvmUAZJVi4tl33aRJrlyxjXLftjIiggntHfRTvJ0&t=1a565a9c

    Sunday, September 25, 2011 6:28 AM
  • User-977512208 posted

    This is the connection string that im using

    (NOTE: The oracle database is in current compter not from other compter i.e im not connecting from other machine for the database)

    string connectionString="provider=msdaora;data source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = = 1521)))(CONNECT_DATA =(SERVICE_NAME =WEBDB))) ;user id=xxxxxxr;password=xxxxx";

    Sunday, September 25, 2011 6:37 AM
  • User269602965 posted

    Common problem.. works in Vis Studio but not IIS.  IIS config and firewall usual culprits.

    For same computer installation, Oracle Windows Installation guide strongly recommends that Oracle be installed on a virtual STATIC IP using Microsoft Loopback Adapter Virtual LAN, and not the machine IP.  If Oracle is on a DHCP issued IP at the wired LAN card, issuing a new IP is possible, and Oracle will fail.

    Check you IIS application pool is configured for the correct version of ASP.NET framework, and application bit (32 or 64).

    Check you have a software firewall (windows OS and/or security program like Norton Internet Security) rule to allow Port 1521 as it is blocked by default.

    Check the IIS server is BOUND to the correct IP and Port for your web site.

    Make sure IIS does not have other conflicting web sites enabled, like the DEFAULT web site.

    And if you are running a 64-bit OS, and installed Oracle as 64-bit database, but your application is explicitly compiled as 32-bit, you must have the 32-bit ODP.NET Oracle Client installed in another Oracle Home directory.

    Since you have a TNSNAMES.ORA installed in the database network config,

    try alternate connection string like:

        <add name="OraConnStr" connectionString="Data Source={DBNAME};User Id=SCHEMANAME;Password=YourPASSWORD" providerName="Oracle.DataAccess.Client"></add>


    Sunday, September 25, 2011 6:01 PM
  • User-977512208 posted

    Lannie: Thanks for replying

    I ll come back to you, im cheking informations that u gave me. Wink

    Monday, September 26, 2011 1:12 AM
  • User-977512208 posted

    i forget to mention that im using a webservice in my project.. may that cause this problem? if so, how to solve it?

    thanks :)

    Monday, September 26, 2011 1:40 AM
  • User269602965 posted

    Think IIS settting, security etc. are more common explanations.


    but if you want to post some more code to help forum users help you, that might help too

    once you are sure IIS, firewalls, etc. are not getting in the way

    Monday, September 26, 2011 1:22 PM
  • User-977512208 posted

    thanks Lannie;

    but i don't think there is error in the code because it works perfectly in visual studio

    the problem is from IIS ....  (im not expert in IIS Frown )

    but if u want the code i ll provide it.. :)

    Tuesday, September 27, 2011 1:31 AM
  • User269602965 posted

    All my comments above oriented to the IIS problems.  Good book on IIS 7.

    Quick read, short to point.



    Tuesday, September 27, 2011 7:33 PM