Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Sunday, February 19, 2012

Can't connect to SQL server 2005 Express through Visual C# app

I've installed SQL server 2005 Express and set up a database called StockData. I'm running the following code in a visual C# windows app to test the connection:

System.Data.Sql.SqlDataSourceEnumerator instance = System.Data.Sql.SqlDataSourceEnumerator.Instance;

DataTable tblSource = instance.GetDataSources();

string strSource = tblSource.Rows[0][0].ToString() + "/" + tblSource.Rows[0][1].ToString();

SqlConnection sqlConn = new SqlConnection();

sqlConn.ConnectionString = "Data Source=(local);Initial Catalog=StockData;Integrated Security=true";

sqlConn.Open();

I have verified that the SQLEXPRESS service is up and running. The strSource variable shows the machine and SQLEXPRESS instance name when I step through, so I know that the application is recognizing the service. But when I get to the "sqlConn.Open()" line, I get the following error message:

Message="An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060

Can anyone tell me what I'm doing wrong here? This is driving me nuts. Thanks.


Your connection string is specifying Data Source=(local) which is for a Default Instance of SQL Server, not a named instance, as is the case for SQL Express. You should be specifying Data Source=(local)\SQLEXPRESS.

You're pulling the server information into strSource and you mention that you've confirmed it's correct, so I'm not sure why you're not using strSource to set Data Source. Possibly you mistyped your connection string? I'm guessing you meant:

sqlConn.ConnectionString = "Data Source=" + strSource + ";Initial Catalog=StockData;Integrated Security=True"

Hope this helps.

Regards,

Mike Wachal
SQL Express team

Mark the best posts as Answers!

Thursday, February 16, 2012

Can''t connect to SQL Express or SQL 2005 from C# web app and IIS

Hi all,

I'm new to this forum and haven't worked with SQL Server for a couple of years. Now it seems I'm getting back into it. I have SQL Express and SQL 2005 installed on an XP sp2 machine with IIS 5.1. I have a C#/ASP.NET web app in Visual Studio 2005 that keeps getting an error on attempting to connect (SqlConnection object). It's a generic error saying a probable cause is SQL Express default setup not allowing remote connections. Remote connections are turned on for both TCP and UDP. I can connect from within a small C# windows application using the same uid and pwd, so I suspect it's something related to IIS talking to SQLExpress. I would appreciate any help on other things to check. I am also fairly new to using IIS in the development environment.

Thanks

It could be because you didn't specify the instance name when you tried to connect from the C# app? It could also be that SQLBrowser isn't running.

Hope that helps,

John

|||

This is because SQL Server 2005 Express Edition does not accepts remote connections by default:

How to: Enable Network Access During Installation of SQL Server 2005 Express Edition

|||

Thanks John,

Yes, I specified the instance name and verified SQLBrowser is running. COnnection string = "Server=BUTTERFLY\SQLExpress; Initial Catalog=catalog; uid=username; pwd=password;

|||

Ronald,

Thanks for pointing me to this information. It didn't actually solve my dilemma, but it did get the juices flowing. This is related to a project I inherited and upgraded from .NET 1.1 to 2.0. The sql connection string referenced a property for "server=", changing this to "data source=" allowed the connection to open properly. I am reading the links you pointed and they are very helpful. Thanks

Can''t connect to SQL Express or SQL 2005 from C# web app and IIS

Hi all,

I'm new to this forum and haven't worked with SQL Server for a couple of years. Now it seems I'm getting back into it. I have SQL Express and SQL 2005 installed on an XP sp2 machine with IIS 5.1. I have a C#/ASP.NET web app in Visual Studio 2005 that keeps getting an error on attempting to connect (SqlConnection object). It's a generic error saying a probable cause is SQL Express default setup not allowing remote connections. Remote connections are turned on for both TCP and UDP. I can connect from within a small C# windows application using the same uid and pwd, so I suspect it's something related to IIS talking to SQLExpress. I would appreciate any help on other things to check. I am also fairly new to using IIS in the development environment.

Thanks

It could be because you didn't specify the instance name when you tried to connect from the C# app? It could also be that SQLBrowser isn't running.

Hope that helps,

John

|||

This is because SQL Server 2005 Express Edition does not accepts remote connections by default:

How to: Enable Network Access During Installation of SQL Server 2005 Express Edition

|||

Thanks John,

Yes, I specified the instance name and verified SQLBrowser is running. COnnection string = "Server=BUTTERFLY\SQLExpress; Initial Catalog=catalog; uid=username; pwd=password;

|||

Ronald,

Thanks for pointing me to this information. It didn't actually solve my dilemma, but it did get the juices flowing. This is related to a project I inherited and upgraded from .NET 1.1 to 2.0. The sql connection string referenced a property for "server=", changing this to "data source=" allowed the connection to open properly. I am reading the links you pointed and they are very helpful. Thanks

Can''t connect to SQL Express or SQL 2005 from C# web app and IIS

Hi all,

I'm new to this forum and haven't worked with SQL Server for a couple of years. Now it seems I'm getting back into it. I have SQL Express and SQL 2005 installed on an XP sp2 machine with IIS 5.1. I have a C#/ASP.NET web app in Visual Studio 2005 that keeps getting an error on attempting to connect (SqlConnection object). It's a generic error saying a probable cause is SQL Express default setup not allowing remote connections. Remote connections are turned on for both TCP and UDP. I can connect from within a small C# windows application using the same uid and pwd, so I suspect it's something related to IIS talking to SQLExpress. I would appreciate any help on other things to check. I am also fairly new to using IIS in the development environment.

Thanks

It could be because you didn't specify the instance name when you tried to connect from the C# app? It could also be that SQLBrowser isn't running.

Hope that helps,

John

|||

This is because SQL Server 2005 Express Edition does not accepts remote connections by default:

How to: Enable Network Access During Installation of SQL Server 2005 Express Edition

|||

Thanks John,

Yes, I specified the instance name and verified SQLBrowser is running. COnnection string = "Server=BUTTERFLY\SQLExpress; Initial Catalog=catalog; uid=username; pwd=password;

|||

Ronald,

Thanks for pointing me to this information. It didn't actually solve my dilemma, but it did get the juices flowing. This is related to a project I inherited and upgraded from .NET 1.1 to 2.0. The sql connection string referenced a property for "server=", changing this to "data source=" allowed the connection to open properly. I am reading the links you pointed and they are very helpful. Thanks

Can''t connect to SQL Express or SQL 2005 from C# web app and IIS

Hi all,

I'm new to this forum and haven't worked with SQL Server for a couple of years. Now it seems I'm getting back into it. I have SQL Express and SQL 2005 installed on an XP sp2 machine with IIS 5.1. I have a C#/ASP.NET web app in Visual Studio 2005 that keeps getting an error on attempting to connect (SqlConnection object). It's a generic error saying a probable cause is SQL Express default setup not allowing remote connections. Remote connections are turned on for both TCP and UDP. I can connect from within a small C# windows application using the same uid and pwd, so I suspect it's something related to IIS talking to SQLExpress. I would appreciate any help on other things to check. I am also fairly new to using IIS in the development environment.

Thanks

It could be because you didn't specify the instance name when you tried to connect from the C# app? It could also be that SQLBrowser isn't running.

Hope that helps,

John

|||

This is because SQL Server 2005 Express Edition does not accepts remote connections by default:

How to: Enable Network Access During Installation of SQL Server 2005 Express Edition

|||

Thanks John,

Yes, I specified the instance name and verified SQLBrowser is running. COnnection string = "Server=BUTTERFLY\SQLExpress; Initial Catalog=catalog; uid=username; pwd=password;

|||

Ronald,

Thanks for pointing me to this information. It didn't actually solve my dilemma, but it did get the juices flowing. This is related to a project I inherited and upgraded from .NET 1.1 to 2.0. The sql connection string referenced a property for "server=", changing this to "data source=" allowed the connection to open properly. I am reading the links you pointed and they are very helpful. Thanks

Can't connect to SQL Express 2005

I have a web app running on a laptop (for demo purposes) with the following connect string:

"datasource=<machine name>\SQLExpress;initial catalog=BlueTarp;User ID=sa;Password=xxx"

I can connect to this instance using both oSQL or sqlcmd and can select from the tables within BlueTarp, but my web app won't connect, and I can't figure out why!!

When I installed SQL Express, I used a named instance, called "SQLExpress".

I'm using mixed mode authentication.

One strange thing is that I can connect to either SQLExpress or MSSQLSERVER instances, but they appear to be the same instance -- I can use bluetarp in both.

when I use SQLExpress for instance name in web.config I get "SQL Server does not exist or access denied"

when I use MSSQLServer for instance name in web.config I get "Invalid connection"

And in fiddling with the web.config, I somehow did something to get a machine.config error, something like "machine.config couldn't be loaded because of an unloaded appdomain".

It's driving me nuts because I've spent a good 40 hours on this stupid problem, throwing the whole margin down the toilet.

Does anyone have any ideas?

Thank you,

Aarron

First, SQL Server has support for multiple protocols for remote connections (shared memory, named pipes, tcp/ip, and via) and if the client is trying a protocol the server has disabled then it will fail to connect.

To see what protocols are enabled, goto Computer Management -> SQL Server Configuration Manager -> SQL Server 2005 Network Configuration -> Protocols for <Instance Name>. If you change the protocols the server supports, you will need to restart the server.

Try using a protocol such as named pipes instead of shared memory. Try np:<machine name>.

http://msdn2.microsoft.com/en-US/library/system.data.sqlclient.sqlconnection.connectionstring(VS.80).aspx

For general troubleshooting of .NET connectivity issues, see this blog entry: http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx

For the ASP.NET issue, try restarting IIS/ASP.NET, and make sure machine.config is valid xml with the XML editor in Visual Studio.

|||

Mark,

Thanks so much for your help. I've been all over the web trying to find info about this problem -- people have pointed me to Mcaffe, to the .NET frameworks possibly having issues, to my web.config being poorly formatted.... and it turns out that I wasn't using a supported protocol. I enabled named pipes and it works like a charm.

You da man!

Aarron

Tuesday, February 14, 2012

Cant Connect to remote server, my app works in local only??

Hello,
i've developed a website using VB.NET, and SQL SERVER 2K, in my dev environment works properly (SQL Server and WEB SERVER are in the same machine).
When i put everything in the target machine, where the webserver is but not the sql, i get the following error:
Sql SErver does not exist or access denied

I've tried so many ways to do this, ODBC, ADO.NET, OLEDB....and everything ends in the same error.
Also if i try to connect with ODBC (from odbc manager) it seems to work (test connection succesfull), but in asp.net nothing works.
I've tried to access the server with:
INSTANCE_NAME
\SERVER_NAME\INSTANCE_NAME
IP,PORT

I think (they are checking this), that the auth mode is set to MIXED MODE.

Any idea to save my life?? ;)

Thanks pplYour reference to the server in your ADO connection string should be:

ipaddressofserver\instancename (i.e., 206.152.125.6\instance1 )

If you are using SQL Authenticiation, which you should, then you need to reference the {uid} and {password} properties.
I would be willing to bet that your SQL Installation is set the Mixed Mode.

HTH

Sunday, February 12, 2012

Cant connect to membership provider db

I've started developing an ASP.net 2.0 app with VWD Express.

The default membership provider db of SQL Server 5005 Express is not installed on my host servers. So my workaround has been to use a Full blown SQL Server 2005 DB as a custom membership provider declared in web.config.

This works fine on the production server. However, when i try to login from my development app I get Exception # 40 can't connect to SQL server membership provider.. Moreover, my app configuration confirms there is problems connecting to this server in my development environment.


How can I solve this and bring my development app up & running again?

many thanks

If you have access to your Production SQL Server from your development environment, the problem is probably due to your connection string.


For my development, I use SQL Express on my local development box and SQL Server for production. There are two things that you have to do. Keeps separate scripts for changes to the database (from development to production). In addition, a separate web.config for production and development to hold your connection strings.

Cant connect to db after web setup

I have an asp 2.0 app that connects to a database in another city.

When I test this app through VS2005 is connects and works great. After I created a web setup project it goes bad.

I ran the setup on 2 different computers, including the dev machine, both start ok and bring up the applications main menu, but when I choose a menu item that is supposed to bring up a datagrid from the sql server I get an error saying it's not a trusted connection.

Any advice on where I should start looking? It's got me beat.

Thanks.

Hi,

How are you connecting to the remote SQL server DB? Can you paste the connection string from the config file (with changes password, IPs ofcourse)?

Vivek

|||

I've tried these 2 strings and get the same results with each:

connectionString="Data Source=xx.xxx.xx.xxx;Initial Catalog=xxxxxx;Integrated Security=True; provider Name=System.Data.SqlClient"

and:

connectionString="Data Source=xx.xxx.xx.xxx;Network Library=DBMSSOCN;Initial Catalog=xxxxxx;Trusted_Connection=yes;"

providerName="System.Data.SqlClient"

|||

It seems you are trying to connect to a remote DB. You need to check what authentication type is applicable: Sql Server or Windows Integrated. Refer this article on details:

http://builder.com.com/5100-6371_14-6084879.html

HTH,

Vivek

|||Thank you, I will read that tonight and see what I can come up with.

Friday, February 10, 2012

Can't connect from ASP.Net 2.0 to SQL2000 after installing SQL2005

Hey guys,
I have a web application in ASP.Net 2.0 that needs to connect to a local
SQL2000 DB. After I installed SQL2005 this web app stopped working. I get
the following inner exception:
{"An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: SQL Network Interfaces, error: 26 - Error Locating
Server/Instance Specified)"}
So after unsuccessfully googling I'm at least pretty sure about the
following: My web app thinks it's talking to a SQL2005 server. That one by
default uses shared memory when local. I think SQL2000 uses TCP/IP.
Who can tell me what I have to do so that my ASP.Net 2.0 web app properly
connects to SQL2000? Among the ideas on Google there were cliconfg.exe,
using <clear /> in the <connectionStrings> area in web.config and a couple
more. But none of them worked.
Thanks a lot, ChristophI'm having a very similar error, only mine connects locally but not remotely.
I was able to change the error slightly by putting the referencing the
database by domain and db, myMachine/myDB.
If it helps I looked at my log and it gave an error of 17187 which seems to
be a file in use, full disk, or low memory. Still researching. If I find it
I'll let you know. If you find the answer would you please post it so I can
try it too?
--
---
Magic is not in the hands of the magician but in the mind of the audience.
Animadverto est verus
"Christoph Wienands" wrote:
> Hey guys,
> I have a web application in ASP.Net 2.0 that needs to connect to a local
> SQL2000 DB. After I installed SQL2005 this web app stopped working. I get
> the following inner exception:
> {"An error has occurred while establishing a connection to the server. When
> connecting to SQL Server 2005, this failure may be caused by the fact that
> under the default settings SQL Server does not allow remote connections.
> (provider: SQL Network Interfaces, error: 26 - Error Locating
> Server/Instance Specified)"}
> So after unsuccessfully googling I'm at least pretty sure about the
> following: My web app thinks it's talking to a SQL2005 server. That one by
> default uses shared memory when local. I think SQL2000 uses TCP/IP.
> Who can tell me what I have to do so that my ASP.Net 2.0 web app properly
> connects to SQL2000? Among the ideas on Google there were cliconfg.exe,
> using <clear /> in the <connectionStrings> area in web.config and a couple
> more. But none of them worked.
> Thanks a lot, Christoph
>
>

Can't connect from ASP app

Hello,
I am experiencing wierd problem:
My SQL server is on one PC, and the (Classic) ASP web application is on
another PC (let's call it AppPC). The code in ASP is trying to connect to
the MSSQL server, using standard OLEDB connection string:

> Provider=SQLOLEDB;Data Source=servername;User
> ID=myuser;password=XXX;Database=TestDB
The ASP code that creates the connection is the following (dead simple):

> var db = Server.CreateObject("ADODB.Connection");
> db.Open(connStr);
The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Serve
r does
not exist or access denied.
The server is set to accept both win authentication and SQL logins. I have
no problem to connect to the SQL server from the AppPC using Enterprise
manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
executed simple dotNET program that uses the very same connection string to
access the DB and retrieve some data. But, from within the ASP app, this
connection string is just not working.
I have tried to connect to another server (hosted on the internet), and I
have no problem with that - so it makes me think there is no problem in my
ASP code. However, the fact that I can connect to the server from the same
PC, using another tech, ie dotNET exe, makes me suspicious that something is
wrong at the client side.
The IIS virtual folder has anonymous access user identification. However, I
don't think this fact has anything to do with the problem - I am not using
win authetification, but crude login/pwd in the connection string.
Now I have no idea where to search next for problem solution. Maybe someone
has any idea?
Thanks,
PavilsUnfortunately, that's one of those errors that can be a lot
of different things. You can start troubleshooting by
referring to the following article:
INF: Potential Causes of the "SQL Server Does Not Exist or
Access Denied" Error Message
http://support.microsoft.com/?id=328306
Don't forget to run through all the routine troubleshooting
as well - try to ping the server from the ASP box, try to
telnet to the listening port on the server from the ASP box,
try creating a TCP IP alias for the SQL Server instance
using the SQL Server client network utility on the ASP box,
try forcing a protocol to use on the client end (in the
connection string you can specify the network library to
use). Also with the connection string, you may also want to
try specifying the IP address (vs server name), Listening
port number.
You can find some of the connection string examples at:
http://www.carlprothman.net/Default...derForSQLServer
-Sue
On Tue, 27 Dec 2005 19:07:02 +0200, "Pavils Jurjans"
<pavils@.mailbox.riga.lv> wrote:

>Hello,
>I am experiencing wierd problem:
>My SQL server is on one PC, and the (Classic) ASP web application is on
>another PC (let's call it AppPC). The code in ASP is trying to connect to
>the MSSQL server, using standard OLEDB connection string:
>
>The ASP code that creates the connection is the following (dead simple):
>
>The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Serv
er does
>not exist or access denied.
>The server is set to accept both win authentication and SQL logins. I have
>no problem to connect to the SQL server from the AppPC using Enterprise
>manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
>executed simple dotNET program that uses the very same connection string to
>access the DB and retrieve some data. But, from within the ASP app, this
>connection string is just not working.
>I have tried to connect to another server (hosted on the internet), and I
>have no problem with that - so it makes me think there is no problem in my
>ASP code. However, the fact that I can connect to the server from the same
>PC, using another tech, ie dotNET exe, makes me suspicious that something i
s
>wrong at the client side.
>The IIS virtual folder has anonymous access user identification. However, I
>don't think this fact has anything to do with the problem - I am not using
>win authetification, but crude login/pwd in the connection string.
>Now I have no idea where to search next for problem solution. Maybe someone
>has any idea?
>Thanks,
>Pavils
>|||Pavlis,
IIS must assign a Windows user account to every request. When you allow
anonymous access to an IIS folder, by default IIS impersonates a
low-privileged account that is created by the IIS installer. Most likely
that account has no network access. You can change the impersonation to any
other Windows account that has network access, e.g. the account that you use
to test with Enterprise Manager and Query Analyzer. You can even create a
Windows account specifically for that purpose, and grant it only the needed
permissions.
Zlatko
"Pavils Jurjans" <pavils@.mailbox.riga.lv> wrote in message
news:OJ5hUewCGHA.2908@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I am experiencing wierd problem:
> My SQL server is on one PC, and the (Classic) ASP web application is on
> another PC (let's call it AppPC). The code in ASP is trying to connect to
> the MSSQL server, using standard OLEDB connection string:
>
> The ASP code that creates the connection is the following (dead simple):
>
> The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Ser
ver does
> not exist or access denied.
> The server is set to accept both win authentication and SQL logins. I have
> no problem to connect to the SQL server from the AppPC using Enterprise
> manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
> executed simple dotNET program that uses the very same connection string
> to access the DB and retrieve some data. But, from within the ASP app,
> this connection string is just not working.
> I have tried to connect to another server (hosted on the internet), and I
> have no problem with that - so it makes me think there is no problem in my
> ASP code. However, the fact that I can connect to the server from the same
> PC, using another tech, ie dotNET exe, makes me suspicious that something
> is wrong at the client side.
> The IIS virtual folder has anonymous access user identification. However,
> I don't think this fact has anything to do with the problem - I am not
> using win authetification, but crude login/pwd in the connection string.
> Now I have no idea where to search next for problem solution. Maybe
> someone has any idea?
> Thanks,
> Pavils
>

Can't connect from ASP app

Hello,
I am experiencing wierd problem:
My SQL server is on one PC, and the (Classic) ASP web application is on
another PC (let's call it AppPC). The code in ASP is trying to connect to
the MSSQL server, using standard OLEDB connection string:

> Provider=SQLOLEDB;Data Source=servername;User
> ID=myuser;password=XXX;Database=TestDB
The ASP code that creates the connection is the following (dead simple):

> var db = Server.CreateObject("ADODB.Connection");
> db.Open(connStr);
The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does
not exist or access denied.
The server is set to accept both win authentication and SQL logins. I have
no problem to connect to the SQL server from the AppPC using Enterprise
manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
executed simple dotNET program that uses the very same connection string to
access the DB and retrieve some data. But, from within the ASP app, this
connection string is just not working.
I have tried to connect to another server (hosted on the internet), and I
have no problem with that - so it makes me think there is no problem in my
ASP code. However, the fact that I can connect to the server from the same
PC, using another tech, ie dotNET exe, makes me suspicious that something is
wrong at the client side.
The IIS virtual folder has anonymous access user identification. However, I
don't think this fact has anything to do with the problem - I am not using
win authetification, but crude login/pwd in the connection string.
Now I have no idea where to search next for problem solution. Maybe someone
has any idea?
Thanks,
Pavils
Unfortunately, that's one of those errors that can be a lot
of different things. You can start troubleshooting by
referring to the following article:
INF: Potential Causes of the "SQL Server Does Not Exist or
Access Denied" Error Message
http://support.microsoft.com/?id=328306
Don't forget to run through all the routine troubleshooting
as well - try to ping the server from the ASP box, try to
telnet to the listening port on the server from the ASP box,
try creating a TCP IP alias for the SQL Server instance
using the SQL Server client network utility on the ASP box,
try forcing a protocol to use on the client end (in the
connection string you can specify the network library to
use). Also with the connection string, you may also want to
try specifying the IP address (vs server name), Listening
port number.
You can find some of the connection string examples at:
http://www.carlprothman.net/Default...erForSQLServer
-Sue
On Tue, 27 Dec 2005 19:07:02 +0200, "Pavils Jurjans"
<pavils@.mailbox.riga.lv> wrote:

>Hello,
>I am experiencing wierd problem:
>My SQL server is on one PC, and the (Classic) ASP web application is on
>another PC (let's call it AppPC). The code in ASP is trying to connect to
>the MSSQL server, using standard OLEDB connection string:
>
>The ASP code that creates the connection is the following (dead simple):
>
>The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does
>not exist or access denied.
>The server is set to accept both win authentication and SQL logins. I have
>no problem to connect to the SQL server from the AppPC using Enterprise
>manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
>executed simple dotNET program that uses the very same connection string to
>access the DB and retrieve some data. But, from within the ASP app, this
>connection string is just not working.
>I have tried to connect to another server (hosted on the internet), and I
>have no problem with that - so it makes me think there is no problem in my
>ASP code. However, the fact that I can connect to the server from the same
>PC, using another tech, ie dotNET exe, makes me suspicious that something is
>wrong at the client side.
>The IIS virtual folder has anonymous access user identification. However, I
>don't think this fact has anything to do with the problem - I am not using
>win authetification, but crude login/pwd in the connection string.
>Now I have no idea where to search next for problem solution. Maybe someone
>has any idea?
>Thanks,
>Pavils
>
|||Pavlis,
IIS must assign a Windows user account to every request. When you allow
anonymous access to an IIS folder, by default IIS impersonates a
low-privileged account that is created by the IIS installer. Most likely
that account has no network access. You can change the impersonation to any
other Windows account that has network access, e.g. the account that you use
to test with Enterprise Manager and Query Analyzer. You can even create a
Windows account specifically for that purpose, and grant it only the needed
permissions.
Zlatko
"Pavils Jurjans" <pavils@.mailbox.riga.lv> wrote in message
news:OJ5hUewCGHA.2908@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I am experiencing wierd problem:
> My SQL server is on one PC, and the (Classic) ASP web application is on
> another PC (let's call it AppPC). The code in ASP is trying to connect to
> the MSSQL server, using standard OLEDB connection string:
>
> The ASP code that creates the connection is the following (dead simple):
>
> The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does
> not exist or access denied.
> The server is set to accept both win authentication and SQL logins. I have
> no problem to connect to the SQL server from the AppPC using Enterprise
> manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
> executed simple dotNET program that uses the very same connection string
> to access the DB and retrieve some data. But, from within the ASP app,
> this connection string is just not working.
> I have tried to connect to another server (hosted on the internet), and I
> have no problem with that - so it makes me think there is no problem in my
> ASP code. However, the fact that I can connect to the server from the same
> PC, using another tech, ie dotNET exe, makes me suspicious that something
> is wrong at the client side.
> The IIS virtual folder has anonymous access user identification. However,
> I don't think this fact has anything to do with the problem - I am not
> using win authetification, but crude login/pwd in the connection string.
> Now I have no idea where to search next for problem solution. Maybe
> someone has any idea?
> Thanks,
> Pavils
>