Click here to Skip to main content
15,907,687 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: application form size for different OS Pin
sailesh_gupta5-Jun-08 2:05
sailesh_gupta5-Jun-08 2:05 
AnswerRe: application form size for different OS Pin
Alan N5-Jun-08 2:27
Alan N5-Jun-08 2:27 
AnswerRe: application form size for different OS Pin
darkelv5-Jun-08 4:46
darkelv5-Jun-08 4:46 
Questiondelegates and effect in c++ com server Pin
dtranter4-Jun-08 3:50
dtranter4-Jun-08 3:50 
QuestionHow can I get the user session ID/Token? Pin
MeNot4-Jun-08 2:39
MeNot4-Jun-08 2:39 
AnswerRe: How can I get the user session ID/Token? Pin
Member 765555715-Feb-11 13:54
Member 765555715-Feb-11 13:54 
GeneralRe: How can I get the user session ID/Token? Pin
Prasanta_Prince14-Apr-11 0:25
Prasanta_Prince14-Apr-11 0:25 
QuestionTrying to access Oracle DB from web service... errors after erros - pls help Pin
dsfdsfsdf3-Jun-08 21:46
dsfdsfsdf3-Jun-08 21:46 
hi there,

I'm trying to connect to oracle DB from .net web service (c#), but can't connect. Please help if someone has any insight.

Here's what I'm doing:

Web service.WebMethod code:
---start
[WebMethod]
public string RunInterface1(string ConnectionString, string strQuery)
{
try
{



string connectionString = ConnectionString.ToString();
using (OracleConnection connection = new OracleConnection())
{
connection.ConnectionString = connectionString;

connection.Open();

OracleCommand command = connection.CreateCommand();
string sql = strQuery.ToString();
command.CommandText = sql;

OracleDataReader reader = command.ExecuteReader();
return "Success";
}


}
catch (Exception ex)
{
return ex.ToString();
}
}


--- end
Note: connection string and strQuery is passed as input parameters


Problem:
When I run it, I get following error:
Cannot access NLS data files or invalid environment specified

Thread:
System.Data.OracleClient.OracleException: ORA-12705: Cannot access NLS data files or invalid environment specified at System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OracleClient.OracleConnection.Open() at Service.RunInterface1(String ConnectionString, String strQuery) in c:\Apps\test\testws\App_Code\Service.cs:line


What I have tried so far:

- Remove/rename registry entry for NLS_LANG - No luck, no matter what I do with it. Tried different value setup also.
- Tried with 3 versions of Oracle client: 8, 92 and 10. (current ver is 10)
- Cleanup registry - No issues

- I'm able to connect to same oracle instance from PL/SQL adn SQL plus
- I have created a windows form application - same code as you see above, and it works flawlessly there. Only web service fails. God knows why!!!

And yes, I have TNSnames.ora copied all over in the system: bin folder, wwwroot folder, app folder, oracle\...\network\admin folder... didn't leave any place.

for God sake, please help !!!

Confused | :confused: Confused | :confused: Confused | :confused: Confused | :confused: Confused | :confused: Confused | :confused: Confused | :confused:
AnswerRe: Trying to access Oracle DB from web service... errors after erros - pls help Pin
dsfdsfsdf4-Jun-08 7:17
dsfdsfsdf4-Jun-08 7:17 
Question.net remoting security problem Pin
Tokes Erno3-Jun-08 20:38
Tokes Erno3-Jun-08 20:38 
AnswerRe: .net remoting security problem Pin
leppie4-Jun-08 2:15
leppie4-Jun-08 2:15 
GeneralRe: .net remoting security problem Pin
Tokes Erno4-Jun-08 2:37
Tokes Erno4-Jun-08 2:37 
GeneralRe: .net remoting security problem Pin
leppie4-Jun-08 4:36
leppie4-Jun-08 4:36 
QuestionCould we have VS.NET 2005 and 2008 onthe same machine (pc or notebook) ? [modified] Pin
bug_aonz3-Jun-08 18:36
bug_aonz3-Jun-08 18:36 
AnswerRe: Could we have VS.NET 2005 and 2008 onthe same machine (pc or notebook) ? Pin
John Ad3-Jun-08 18:57
John Ad3-Jun-08 18:57 
AnswerRe: Could we have VS.NET 2005 and 2008 onthe same machine (pc or notebook) ? Pin
Tariq A Karim9-Jun-08 16:49
Tariq A Karim9-Jun-08 16:49 
QuestionMultiple instances of NTService process [modified] Pin
malharone3-Jun-08 10:36
malharone3-Jun-08 10:36 
AnswerRe: Multiple instances of NTService process Pin
Mike Dimmick3-Jun-08 13:59
Mike Dimmick3-Jun-08 13:59 
GeneralRe: Multiple instances of NTService process Pin
malharone3-Jun-08 21:37
malharone3-Jun-08 21:37 
QuestionRegistering an windows Application to a URL Protocol Pin
asma_panjabi3-Jun-08 3:27
asma_panjabi3-Jun-08 3:27 
QuestionC# Console Program Issue Pin
Verghese2-Jun-08 4:27
Verghese2-Jun-08 4:27 
AnswerRe: C# Console Program Issue Pin
Ray Cassick2-Jun-08 4:49
Ray Cassick2-Jun-08 4:49 
GeneralRe: C# Console Program Issue Pin
Verghese2-Jun-08 5:57
Verghese2-Jun-08 5:57 
GeneralRe: C# Console Program Issue Pin
tasumisra3-Jun-08 19:58
tasumisra3-Jun-08 19:58 
AnswerRe: C# Console Program Issue Pin
Prasanta_Prince14-Apr-11 0:27
Prasanta_Prince14-Apr-11 0:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.