p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > .NET > Other .NET > General .NET
I forgot my password Register Now
Register | FAQ | Members List | Calendar | 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

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
__________________
RedEye
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old March 7th, 2008, 10:09 PM
planoie's Avatar
Friend of Wrox
Points: 16,368, Level: 55
Points: 16,368, Level: 55 Points: 16,368, Level: 55 Points: 16,368, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old March 10th, 2008, 10:42 AM
planoie's Avatar
Friend of Wrox
Points: 16,368, Level: 55
Points: 16,368, Level: 55 Points: 16,368, Level: 55 Points: 16,368, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 06:56 AM
Beginning .NET Web Services elsaaa All Other Wrox Books 2 August 26th, 2003 10:31 AM



All times are GMT -4. The time now is 07:12 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc