Oracle ORA-12154 error on local IIS, but not with Visual Studio Development Server

前端 未结 8 1714
忘掉有多难
忘掉有多难 2020-12-18 11:13

I\'ve got an ASP.NET application that can connect to Oracle when it\'s started by Visual Studio Development Server, but when I deploy it to my local IIS, it does not connect

8条回答
  •  一个人的身影
    2020-12-18 11:36

    In my case, I use Windows 7, IIS 7, Visual Studio 2010. For some reason I have installed 2 Oracle clients, 10.2 and 11.2 (I have 2 TNSNAMES.ORA in two differents path). When I use F5, Visual Studio use one TNSNAME and when I use IIS, It use the other TNSNAME!

    If I use CMD and write:

    tnsping ORCL
    

    It give me the Oracle vertion I use is: 10.2 and not 11.2. I try turn off the Windows Firewall and not work. I try login in IIS->AppPool with my Windows Account and either not work.

    Finally to fix (after 2 days reading a lot of solutions in stackoverflow and others):

    • I give read access to both path C:\oracle\product and C:\app\user\product to Everyone account user, because I not found Network Service account.

    • In IIS -> AppPool, I set ApplicationPoolIdentity to my Pool.

    • In IIS I recycle the AppPool and Restart my WebSite.

    and It Works!

提交回复
热议问题