0

My Visual Basic program is having trouble in connecting to Oracle. In order to fix this problem, I have been searching for answers in internet. I come across one answer in StackOverflow and I believe it can solve my problem. The link address is:

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

The person who kindly answered the question is Rick Schott. His answer is simply a line comment: "Make sure Network Service has access to your TNS directories or change your App Pool to run as you."

My question is: "what is the meaning of Network Service recommended by Rick in his answer?" How do I go about and finding it? Thank you.

Community
  • 1
  • 1
  • Can you go ahead and post some details about the issues you are having? What have you tried to fix the problem? The community will benefit much more knowing what problem you are working on and the possible solution (rather than a simple term definition) – Borophyll Jul 15 '12 at 05:07
  • FYI, http://msdn.microsoft.com/en-us/library/windows/desktop/ms684272%28v=vs.85%29.aspx – Lex Li Jul 15 '12 at 08:37
  • Hi Borophyll, I added some details below. The problem is my ASP.NET web page fails to connect to Oracle; while my console program *can* connect to Oracle in the same machine. – Michael Hammer Jul 15 '12 at 11:56
  • Basically I think I need to find out how IIS connect to Oracle. Oralce client machine is running Windows 7 Professional 64 bit. (Some comments from the past posts suggest that problem is with the 64 bit processor using 32 bit client. It does not make sense to me.) – Michael Hammer Jul 15 '12 at 11:59
  • Hi Lex, thank you for the link. However, the information provided from the link does not really go into details of how it is related to the C: / Oracle Home directory. – Michael Hammer Jul 15 '12 at 12:03

1 Answers1

0

To answer your question, network service is a built in user account in IIS, and you can think of it as the account your application runs 'as'. Your IIS hosted application can run as network service, a custom account created for your application (example: 'IIS APPOOL\yourapplication'), or even an actual user's account.

As per my comment above, I do not know if this is going to help solve your particular problem since I do not have very many details about your issue.

Borophyll
  • 1,099
  • 2
  • 15
  • 24
  • Thank you for taking the time and answer my question. Here is my situation: A web site is written in Visual Basic 2010 using ASP .NET technology has stopped working in development. When I debug the program, I find that it fails in the Open statement with oracle. And it gives this error message: "ORA-12154: TNS:could not resolve service name". When I run a console Visual Basic program in the same machine, I do **NOT** have any problems. If there are any problems in connection, TNSPING will give me error. In this case, it doesn't. – Michael Hammer Jul 15 '12 at 11:49
  • In this case, it doesn't. Therefore I am conclude by saying that the machine has connection to Oracle. Also this web site is currently working fine in production. It means something is not working only in development. The file TNSNAMES.ORA is located in C:\oracle\product\10.2.0\NETWORK\ADMIN. I would say this file is set up correctly; otherwise my console program will fail. When I run the web site ( or the first web page ) in Visual Studio 2010, the program failed at the Oracle Open command. My understanding is that a local copy of IIS is created in my computer when I run it like this. – Michael Hammer Jul 15 '12 at 11:51
  • When I run the production version of VB/ASP in production machine, the IIS embedded in Windows Server will be executed. When it does not work only with ASP .NET web page, I suspect the problem is in IIS itself. Somehow, IIS is unable to find a copy of TNSNAMES.ORA; therefore it fails. Do you know how IIS locate TNSNAMES.ORA? Or may be I am heading to wrong direction? Thanks. Regards, Michael. – Michael Hammer Jul 15 '12 at 11:51
  • Some more details: when I run the same web site with another pc, it works fine. The problem pc is 64 bits. The ok pc is 32 bits. Both have Windows 7 Professional and Visual Studio 2010. Both have oracle client 10g. I tend not to rush out and say the 64 bits is the problem. It is because that machine was working before. – Michael Hammer Jul 15 '12 at 12:06