469,277 Members | 2,160 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,277 developers. It's quick & easy.

Problems with ASP.NET accesing a remote SQL database

Hello all!

Scenario:
- web server at one location (domain) with VS 2003
- SQL server at a remote location (domain)
- VPN connection on port 1433 between the two domains

I have no troubles reaching the remote SQL server either from SQL Enterprise
manager or in VS 2003 design-time (using the SQL authentication in both
cases) - all the connections work and I can preview data while building
ASP.NET application.

However, ASP.NET pages at run-time cannot display data from remote database:

"SQL Server does not exist or access denied.
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.SqlClient.SqlException: SQL Server does not
exist or access denied."

What should I do in order to be able to display those data?
Thank you in advance,
Hrvoje
Mar 7 '06 #1
3 2384
Would you let me see you connectionstring

just like ... CSTring=datasource<any>;passwprd=<any>

because the situation you are telling.. there is no clear reason for
connection to be denied..

If you are creating connection from some wizard then ... you need to add
password to connectionstring manualy because wizzard dont add password....

Looking for details..

regards
Munawar
"Hrvoje Vrbanc" <hr*****@recro.hr> wrote in message
news:eb**************@TK2MSFTNGP14.phx.gbl...
Hello all!

Scenario:
- web server at one location (domain) with VS 2003
- SQL server at a remote location (domain)
- VPN connection on port 1433 between the two domains

I have no troubles reaching the remote SQL server either from SQL
Enterprise manager or in VS 2003 design-time (using the SQL authentication
in both cases) - all the connections work and I can preview data while
building ASP.NET application.

However, ASP.NET pages at run-time cannot display data from remote
database:

"SQL Server does not exist or access denied.
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.SqlClient.SqlException: SQL Server does not
exist or access denied."

What should I do in order to be able to display those data?
Thank you in advance,
Hrvoje

Mar 7 '06 #2
Hello!

I prefer to set my connections manually, so the string is set up like this:

dim con as new sql connection("server=server_name; database=database_name;
user id=sa; password=pwd")

I'm most puzzled because I can access data in design-time preview, I also
have full functionality in SQL Enterprise Manager but ASP runtime is having
problems.

Also, telnetting to remote SQL server to port 1433 works fine.


"Munawar Hussain" <mu*******@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Would you let me see you connectionstring

just like ... CSTring=datasource<any>;passwprd=<any>

because the situation you are telling.. there is no clear reason for
connection to be denied..

If you are creating connection from some wizard then ... you need to add
password to connectionstring manualy because wizzard dont add password....

Looking for details..

regards
Munawar
"Hrvoje Vrbanc" <hr*****@recro.hr> wrote in message
news:eb**************@TK2MSFTNGP14.phx.gbl...
Hello all!

Scenario:
- web server at one location (domain) with VS 2003
- SQL server at a remote location (domain)
- VPN connection on port 1433 between the two domains

I have no troubles reaching the remote SQL server either from SQL
Enterprise manager or in VS 2003 design-time (using the SQL
authentication in both cases) - all the connections work and I can
preview data while building ASP.NET application.

However, ASP.NET pages at run-time cannot display data from remote
database:

"SQL Server does not exist or access denied.
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.SqlClient.SqlException: SQL Server does
not exist or access denied."

What should I do in order to be able to display those data?
Thank you in advance,
Hrvoje


Mar 7 '06 #3
DWS
Like Munawar Said,
Check your connection string. I just drag sql table from the visual studio
server explorer onto a page and let visual studio do the rest, create the
string, etc. A little cut and paste and your rolling hopefully it works for
VPN connections I can't test this on my setup so...

Good Luck
DWS
"Hrvoje Vrbanc" wrote:
Hello!

I prefer to set my connections manually, so the string is set up like this:

dim con as new sql connection("server=server_name; database=database_name;
user id=sa; password=pwd")

I'm most puzzled because I can access data in design-time preview, I also
have full functionality in SQL Enterprise Manager but ASP runtime is having
problems.

Also, telnetting to remote SQL server to port 1433 works fine.


"Munawar Hussain" <mu*******@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Would you let me see you connectionstring

just like ... CSTring=datasource<any>;passwprd=<any>

because the situation you are telling.. there is no clear reason for
connection to be denied..

If you are creating connection from some wizard then ... you need to add
password to connectionstring manualy because wizzard dont add password....

Looking for details..

regards
Munawar
"Hrvoje Vrbanc" <hr*****@recro.hr> wrote in message
news:eb**************@TK2MSFTNGP14.phx.gbl...
Hello all!

Scenario:
- web server at one location (domain) with VS 2003
- SQL server at a remote location (domain)
- VPN connection on port 1433 between the two domains

I have no troubles reaching the remote SQL server either from SQL
Enterprise manager or in VS 2003 design-time (using the SQL
authentication in both cases) - all the connections work and I can
preview data while building ASP.NET application.

However, ASP.NET pages at run-time cannot display data from remote
database:

"SQL Server does not exist or access denied.
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.SqlClient.SqlException: SQL Server does
not exist or access denied."

What should I do in order to be able to display those data?
Thank you in advance,
Hrvoje



Mar 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Terje J?sang | last post: by
1 post views Thread by Javier Barrios | last post: by
3 posts views Thread by zek2005 | last post: by
reply views Thread by clemima | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.