ASP vs ASP.NET connecting to SQL Server

From: Andy Sutorius (andy_at_sutorius.com)
Date: 03/14/04


Date: Sun, 14 Mar 2004 17:40:29 GMT

When I run a ASP.NET application (ASP.NET Report Starter Kit) against SQL
Server I receive "User cannot login with null"

However when I run an ASP application against the same SQL Server it
works flawlessly

What setting am I missing in ASP.NET?

I have 2 computers, one is the web server the other is the sql server. I
am using SQL Authentication (not Windows Auth.)

For the ASP.NET application I have the connection string in the
web.config file with the user id and pwd in the conn string and trusted
connection set to true

In my ASP I have the following:
<html>
<head>
<title>HTMLPage1</title>
</head>
<body>
<%
cst = "Provider=SQLOLEDB;Data Source=SUTORIUSI;" & _
        "Initial Catalog=Pubs;Network=DBMSSOCN;" & _
        "User Id=sa;Password=sterling"
    set conn = CreateObject("ADODB.Connection")
    conn.open cst
    set rs = conn.execute("Select au_lname from authors" )
    do while not rs.eof
                response.Write(rs(0) & "<br>")
    rs.movenext
    loop
%>
</body>
</html>



Relevant Pages

  • Re: Ecommerce Server Requires Daily Reboot
    ... Sounds like you need a good ASP developer to go through ... SQL data caching schemes, to IIS settings, etc, etc, etc. ... a file cache on the web server. ... In order for customer to access webpage login, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Web and SQL Security
    ... Your connection string needs to be a low privileged account. ... SQL auth is never recommended, ... Therefore web app communicates with the SQL server using ...
    (microsoft.public.sqlserver.security)
  • Re: help with changing some code from mdb to adp
    ... At the end of this post is an example of an ADO connection string to a SQL ... Server database, and '' to the UNC path/name of your instance of SQL ... Windows, you can't create a new UDL file directly, but you can create a new, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: SQL beginner help
    ... statements that are embedded in the code(Sorta like how I can use SQL ... statements to the server)? ... with the Asp code it will decide what how to handle what the user is able ... But I still need some client side execution;/ I think I got a good picture ...
    (microsoft.public.sqlserver)
  • Re: Win2.3k and dotnet. Urgent please
    ... Did you install MSDE as an instance? ... connection string, unless it is the default instance. ... ASP.NET application and MSDE installed on our Win2k dev server. ... Then I installed SQL server client tools only. ...
    (microsoft.public.inetserver.asp.general)

Quantcast