This is driving me crazy. I am having a problem when connecting from an ASP page to a DB in MS SQLServer 2005. We just migrated to 2005, restored all dbs successfully. These databases are all accessible by means of an "sa" account, valid as db owner on the whole SQL server.
ALL applications passing the login info (sa+password) via
web.config files are working correctly. Here is an example of such web.config file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="DBUser" value="sa"/> <!-- The user for the database-->
<add key="DBPass" value="**********"/> <!-- The password for the database-->
<add key="DBName" value="numenorUNI"/> <!-- The database name -->
<add key="DBServer" value="."/> <!-- The IP address of the database server machine, and its port number (default is 1433) -->
<add key="DBOwnerPrefix" value="dbo."/> <!-- The database table own, default is "dbo." -->
</appSettings>
[...]
The only two applications accessing the databases from ASP pages using
JS, instead, are returing this error:
Code:
Microsoft OLE DB Provider for SQL Server error '80040e4d'
Invalid authorization specification
/VIRINDOR/login.asp, line 38
Lines 36~38 in login.asp are:
Code:
strSource = "Provider=SQLOLEDB.1; "+Application("mdbPath");
objConnection = Server.CreateObject("ADODB.Connection");
objConnection.Open(strSource);
and they refer to this line in the global.asa file:
Code:
Application("mdbPath") = "Data Source=.; Initial Catalog=MainDB; User ID=sa; Password=*********;";
Can anybody help? There must be something in the connection string which is not good with SQL2005. All these worked on SQL2000...