Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 7th, 2008, 03:50 PM
Registered User
 
Join Date: Mar 2008
Location: Richmond, Va, USA.
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
Reply With Quote
  #2 (permalink)  
Old March 7th, 2008, 10:09 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
Reply With Quote
  #3 (permalink)  
Old March 8th, 2008, 07:59 PM
Registered User
 
Join Date: Mar 2008
Location: Richmond, Va, USA.
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
Reply With Quote
  #4 (permalink)  
Old March 10th, 2008, 09:42 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:43 AM.


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