Thanks Craig. i think you are right.the connectString is not set properly.
if i down the ip address, how do i set it?
string connectionStrin g = "Provider=MSDAO RA.1;Data source=server;U ser
ID=username;Pas sword=password" ;
this is my current setting. i try to replace server with ip+port, it didn't
work either. how do i set it? thanks.
"Craig Deelsnyder" <cdeelsny@NO_SP AM_4_MEyahoo.co m> wrote in message
news:eU******** *****@TK2MSFTNG P09.phx.gbl... wei wrote:
ORA-12154: TNS:could not resolve service name Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Ole Db.OleDbExcepti on: ORA-12154:
TNS:could not resolve service name
looks like something in your connectString is not correct. It should not have to be different for web vs win. I'd check to make sure your web app is setup correctly for database access. Also check the tns settings for your oracle connection on that box.
Actually, maybe it's because of permissions, you can't read the file where the tns values are stored. If this is a dev box, try temporarily changing your user setup in machine.config to SYSTEM instead of machine (it's in the processModel node/section). Then re-run this. See if it works. (and then of course, as a good developer, change machine.config back :-) )
If it fails (which I would hope), then you know it's something with permissions for the aspnet account accessing some Oracle settings/files. Maybe have to give the aspnet user access to that directory. I haven't worked with Oracle in awhile, so I'm drawing from vague
memories... -- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET 2 1791
You do not have a TNS name for the server. With Oracle, you have to have the
Oracle client blah blah on your web machine to connect to Oracle. One of the
items is TNSNames.ora (? - may have spelling wrong). For the server in
question, you have to have a TNS name to use the oracleClient objects.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************** *************** *************** *************** ***
Think outside the box!
*************** *************** *************** *************** ***
"wei" <wa*****@yahoo. com> wrote in message
news:Os******** *****@tk2msftng p13.phx.gbl... Thanks Craig. i think you are right.the connectString is not set properly. if i down the ip address, how do i set it? string connectionStrin g = "Provider=MSDAO RA.1;Data source=server;U ser ID=username;Pas sword=password" ;
this is my current setting. i try to replace server with ip+port, it
didn't work either. how do i set it? thanks. "Craig Deelsnyder" <cdeelsny@NO_SP AM_4_MEyahoo.co m> wrote in message news:eU******** *****@TK2MSFTNG P09.phx.gbl... wei wrote:
ORA-12154: TNS:could not resolve service name Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.Ole Db.OleDbExcepti on: ORA-12154: TNS:could not resolve service name
looks like something in your connectString is not correct. It should not have to be different for web vs win. I'd check to make sure your web app is setup correctly for database access. Also check the tns settings for your oracle connection on that box.
Actually, maybe it's because of permissions, you can't read the file where the tns values are stored. If this is a dev box, try temporarily changing your user setup in machine.config to SYSTEM instead of machine (it's in the processModel node/section). Then re-run this. See if it works. (and then of course, as a good developer, change machine.config back :-) )
If it fails (which I would hope), then you know it's something with permissions for the aspnet account accessing some Oracle settings/files. Maybe have to give the aspnet user access to that directory. I haven't worked with Oracle in awhile, so I'm drawing from vague memories... -- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
You do not have a TNS name for the server. With Oracle, you have to have the
Oracle client blah blah on your web machine to connect to Oracle. One of the
items is TNSNames.ora (? - may have spelling wrong). For the server in
question, you have to have a TNS name to use the oracleClient objects.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************** *************** *************** *************** ***
Think outside the box!
*************** *************** *************** *************** ***
"wei" <wa*****@yahoo. com> wrote in message
news:Os******** *****@tk2msftng p13.phx.gbl... Thanks Craig. i think you are right.the connectString is not set properly. if i down the ip address, how do i set it? string connectionStrin g = "Provider=MSDAO RA.1;Data source=server;U ser ID=username;Pas sword=password" ;
this is my current setting. i try to replace server with ip+port, it
didn't work either. how do i set it? thanks. "Craig Deelsnyder" <cdeelsny@NO_SP AM_4_MEyahoo.co m> wrote in message news:eU******** *****@TK2MSFTNG P09.phx.gbl... wei wrote:
ORA-12154: TNS:could not resolve service name Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.Ole Db.OleDbExcepti on: ORA-12154: TNS:could not resolve service name
looks like something in your connectString is not correct. It should not have to be different for web vs win. I'd check to make sure your web app is setup correctly for database access. Also check the tns settings for your oracle connection on that box.
Actually, maybe it's because of permissions, you can't read the file where the tns values are stored. If this is a dev box, try temporarily changing your user setup in machine.config to SYSTEM instead of machine (it's in the processModel node/section). Then re-run this. See if it works. (and then of course, as a good developer, change machine.config back :-) )
If it fails (which I would hope), then you know it's something with permissions for the aspnet account accessing some Oracle settings/files. Maybe have to give the aspnet user access to that directory. I haven't worked with Oracle in awhile, so I'm drawing from vague memories... -- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mudge |
last post by:
Hi,
My hosting provider only allows me to use 50 connections to my MySQL
database that my Web site will use.
I don't know what this 50 connections means exactly. Does this mean that
only 50 visitors to my Web site can access my database through my Web site
at one time?
Or does this mean that in my code I can only use 50 connections? and like
|
by: pradeep_TP |
last post by:
Hi all,
I have a few questions that I have been wanting to ask for long. These are
all related to ADO.net and specifically to conenction to database.
1) If I have opened a connection to a database through Connection.open()
method, and I do not use Connection.close() method, will garbage collector
collect the connection object just because i am not using it any more.
2) I am using a dataset, in which i make some modifications to the...
|
by: R Reyes |
last post by:
Hi, I'm trying to modularize my database connections a little better and get
more out of my project with less code.
First check out this common dbOpen() function inside class clsDatabase. I
removed the try/catch part as it is not important for my question:
// This function opens a connection to the database.
public static SqlConnection dbOpen()
{
// Create a SqlConnection object and pass in our connection string
|
by: Nick Gilbert |
last post by:
Hi,
I have an asp.net application which runs from a CD-ROM using Cassini. As
such, it is single user only.
The application connects to an Access database when it is loaded, and
keeps the same connection open all the time (as it's single user, this
shouldn't be a problem).
There is logic in the code to ensure that the connection is
|
by: Lau Lei Cheong |
last post by:
Hello,
Actually I think I should have had asked it long before, but somehow
I haven't.
Here's the scenerio: Say we have a few pages in an ASP.NET project,
each of them needs to connect to the database(Does not really matter but,
in case you need to know, either MSSQL or ODBC ones) a few times when it
loads to do the CURD things. How there's 3 ways proposed to do so:
| |
by: Martin B |
last post by:
Hallo!
I'm working with C# .NET 2.0, implementing Client/Server Applications which
are connecting via Network to SQL-Server or Oracle Databases.
To stay independent from the underlaying Database I use
System.Data.Common.DBConnection and .DBCommand.
How can I keep aware from connection losses (network not availeable,
db-server not available...)?
Are there any strategies to detect this broken connections, and how can I
|
by: Terry Jolly |
last post by:
Web Solution
Goal: Have a global database connection
Why: (There will be 30+ tables, represented by 30+ classes) I only want to
reference the database connection once.
I put the connection string in the web.config.
I created a class with a static database connection and the class opens and
closes the database.
|
by: Arsalan Ahmad |
last post by:
Hi all,
I am creating a website in which in an Item detail page there are a number
of web controls (7 or 8) and what is happening that inside each of control's
Page_Load() function I am creating a database object to query data from
database (using MySQL database). So it means that for each page request I am
using 7 or 8 database connection which is something quite bad as far as
performance is concerned. So please tell me how can change...
|
by: Frinavale |
last post by:
How To Use A Database In Your Program
Many .NET solutions are database driven and so many of us often wonder how to access the database. To help you understand the answer to this question I've provided the following as a quick example of how to retrieve data from a database.
In order to connect to a SQL Server Database using .NET you will need to import the System.Data.SqlClient package into your program.
If you are not connecting to a...
|
by: Curtis Rutland |
last post by:
How To Use A Database In Your Program Part II
This article is intended to extend Frinny’s excellent article: How to Use a Database in Your Program. Frinny’s article defines the basic concepts of using databases very well and is prerequisite reading for this article.
Frinny’s article explains how to use a SQL Server in your program, but there are other databases as well. Some of them provide .NET connectors, but for those that don’t,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |