ASP.net returning error when trying to connect to a SQL w/ SQL Authentication

ASP.net returning error when trying to connect to a SQL w/ SQL Authentication

am 28.10.2005 02:28:21 von ryan.d.rembaum

Hello,

I have read a bunch of topics on this issue but none seems to have
resolved my problem. I have set up a user account in my SQL server
database. e.g. User: TheUser Password: Password and assigned it as a
datareader with the ability to issue SELECT statements on one table.

On a separate IIS server I am running a page that makes a connection to
this database. I have tried a bunch of connection strings and though I
can connect using the SQLDataConnection wizard in .net 2003 Interdev,
Windows ODBC, etc. When I actually browse to test the page using the
same connection string I get the message that:

SQL Server does not exist or access denied.

I do not want to Impersonate and existing account. I have enabled
Anonymous access in IIS. I do not want Windows Integrated Security.
An example of a connection string I that works within .net studio
(development) but now actuall when the ASP page is accessed via
localhost is:

"workstation id=myworkstation;packet size=4096;user id=TheUser;data
source=myserver;persist security info=True;initial
catalog=MyDB;password=password"

SQL Server is set to Mixed Mode Security on the SQL server server box.

What am I doing wrong?

Thanks,
Ryan

Re: ASP.net returning error when trying to connect to a SQL w/ SQL Authentication

am 28.10.2005 05:09:39 von reb01501

ryan.d.rembaum@kp.org wrote:
> Hello,
>
> I have read a bunch of topics on this issue but none seems to have
> resolved my problem. I have set up a user account in my SQL server
> database. e.g. User: TheUser Password: Password and assigned it as a
> datareader with the ability to issue SELECT statements on one table.
>
> On a separate IIS server I am running a page that makes a connection
> to this database. I have tried a bunch of connection strings and
> though I can connect using the SQLDataConnection wizard in .net 2003
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: ASP.net returning error when trying to connect to a SQL w/ SQL Authentication

am 28.10.2005 18:46:32 von Ryan

LOL I actually posted this there in exactly that location and someone
criticized me and told me it belonged here! Hopefully someone will
respond in that group!

Re: ASP.net returning error when trying to connect to a SQL w/ SQL Authentication

am 28.10.2005 19:32:26 von reb01501

Ryan wrote:
> LOL I actually posted this there in exactly that location and someone
> criticized me and told me it belonged here! Hopefully someone will
> respond in that group!

I just looked at your post in that group. Nowhere in that post did you
mention you were using asp.net!

Wait a minute. Are you using asp.net or classic asp? I responded due to your
subject line, but in your original post, you say :"ASP page ". Hmmm, you
also say "SQLDataConnection " so I think you are using .Net. I suspect your
use of the term "ASP page" confused the person who criticized you (in .Net,
one usually calls them "aspx" pages). I suspect you will start getting
replies, especially if you let them know that you really are using .Net.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: ASP.net returning error when trying to connect to a SQL w/ SQL Authentication

am 28.10.2005 19:39:47 von Ryan

Thanks, and yes, I thought I had put that in there! Iwill do so now! I
cannot tell you how much I look forward to getting replies...This
problem is driving me crazy lol Thanks again!

RE: ASP.net returning error when trying to connect to a SQL w/ SQL Aut

am 01.11.2005 22:36:02 von JohnBeschler

Ryan,

If you are running SQL Server 2000 on Windows Server 2003, make sure you are
at SP3 or above on SQL. There is an issue with running SQL on server 2003,
that is resolved with SP3 and later.

I had a similiar issue.

John


"ryan.d.rembaum@kp.org" wrote:

> Hello,
>
> I have read a bunch of topics on this issue but none seems to have
> resolved my problem. I have set up a user account in my SQL server
> database. e.g. User: TheUser Password: Password and assigned it as a
> datareader with the ability to issue SELECT statements on one table.
>
> On a separate IIS server I am running a page that makes a connection to
> this database. I have tried a bunch of connection strings and though I
> can connect using the SQLDataConnection wizard in .net 2003 Interdev,
> Windows ODBC, etc. When I actually browse to test the page using the
> same connection string I get the message that:
>
> SQL Server does not exist or access denied.
>
> I do not want to Impersonate and existing account. I have enabled
> Anonymous access in IIS. I do not want Windows Integrated Security.
> An example of a connection string I that works within .net studio
> (development) but now actuall when the ASP page is accessed via
> localhost is:
>
> "workstation id=myworkstation;packet size=4096;user id=TheUser;data
> source=myserver;persist security info=True;initial
> catalog=MyDB;password=password"
>
> SQL Server is set to Mixed Mode Security on the SQL server server box.
>
> What am I doing wrong?
>
> Thanks,
> Ryan
>
>

RE: ASP.net returning error when trying to connect to a SQL w/ SQL Aut

am 01.11.2005 22:40:03 von JohnBeschler

Ryan,

Here is the link for the KB article that discusses this issue:
http://support.microsoft.com/default.aspx?scid=kb;en-us;8840 12


"ryan.d.rembaum@kp.org" wrote:

> Hello,
>
> I have read a bunch of topics on this issue but none seems to have
> resolved my problem. I have set up a user account in my SQL server
> database. e.g. User: TheUser Password: Password and assigned it as a
> datareader with the ability to issue SELECT statements on one table.
>
> On a separate IIS server I am running a page that makes a connection to
> this database. I have tried a bunch of connection strings and though I
> can connect using the SQLDataConnection wizard in .net 2003 Interdev,
> Windows ODBC, etc. When I actually browse to test the page using the
> same connection string I get the message that:
>
> SQL Server does not exist or access denied.
>
> I do not want to Impersonate and existing account. I have enabled
> Anonymous access in IIS. I do not want Windows Integrated Security.
> An example of a connection string I that works within .net studio
> (development) but now actuall when the ASP page is accessed via
> localhost is:
>
> "workstation id=myworkstation;packet size=4096;user id=TheUser;data
> source=myserver;persist security info=True;initial
> catalog=MyDB;password=password"
>
> SQL Server is set to Mixed Mode Security on the SQL server server box.
>
> What am I doing wrong?
>
> Thanks,
> Ryan
>
>