Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2008, 03:50 PM
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default C#, COM. .NET and Web services

Greetings,

I have built a .NET DLL (C#) that acceses Oracle thru ADO "classic". It accesses an Oracle DB thru ODBC using a COM dll that wraps ADO functionlity.

It is executed from a VBS as called by a web service written by a company named Datacap. All of this operates under IIS on Server 2003.

My DLL preforms when I execute locally, but when the web service invokes it, It throws the message

System.Runtime.InteropServices.COMException (0x80040E4D): [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified

Seems like a permissions issue, because I have several other COM dlls that can do this. I'm not sure where to start with this one.

Any ideas??
Thanks

RedEye
 
Old March 7th, 2008, 10:09 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

It's been a while since I've dealt with Oracle but I don't recall any problems when connecting to oracle from IIS based apps. Can you confirm that the tnsnames files has the connection you need?

It sounds likely that IIS permissions might be a problem. You might start by looking at the file permissions for the IIS user to see if it has the rights to read the TNS names file.

-Peter
peterlanoie.blog
 
Old March 8th, 2008, 07:59 PM
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The way Oracle is configured on this computer, Oracle gets TNSNames info from the TNS_NAMES environment variable, which points to a network drive. It may be an issue with ORACLE executing for an IIS process not being able to see a network drive.

My next guess is the the process can't see the ODBC connection

I had to copy a file called ADODB to a directory under \Assemblies\ on this sever. May be an issue of IIS getting to that.

Just thinking out loud.

Thanks


RedEye
 
Old March 10th, 2008, 09:42 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Ah, this could definitely be a problem.

A) Is the environmental variable a system variable or user variable?

B) How is the network drive configured? Is it mapped by the user account? This will definitely not work with IIS. Can you change the path to use an UNC address instead of a mapped drive? What kind of permissions issues will arise with accessing the network drive from IIS? The IIS account is typically a local system account, not a domain account, so although you may be able to easily access the UNC path without additional credentials, you'll find that IIS will have all sorts of trouble.

-Peter
peterlanoie.blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
Asp.Net 2.0 Web Services shraddhabhatt ASP.NET 1.0 and 1.1 Basics 1 November 8th, 2007 05:41 AM
.NET Component and Web Services mahesh272079 ASP.NET 1.0 and 1.1 Basics 1 February 5th, 2006 11:58 PM
.NET Component and Web Services mahesh272079 ASP.NET 1.0 and 1.1 Basics 0 February 3rd, 2006 04:16 AM
Beginning .NET Web Services using C# xjzr All Other Wrox Books 2 October 15th, 2004 05:56 AM
Beginning .NET Web Services elsaaa All Other Wrox Books 2 August 26th, 2003 09:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.