Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection

Hi

i installed msde with follwoing attributes for a project DotnetNUke..
C:\sql2ksp3\MSDE\>Setup.exe SAPWD="password "INSTANCENAME="DNNV3" SECURITYMODE=SQL

in my web.config file here is what i am using==>
<appSettings>
    <add key="SiteSqlServer" value="Server=(local);Database=DNNV3;uid=;pwd=password;" />
   
but i am getting below error...can anyone PLEASE help me on this.

thanks a lot


Installing DotNetNuke
Upgrade Error: ERROR: Could not connect to database specified in connectionString for SqlDataProvider

 


--------------------------------------------------------------------------------

Server Error in '/dotnetnuke' Application.
--------------------------------------------------------------------------------

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more

0
samir25
7/20/2005 4:09:55 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

13 Replies
958 Views

Similar Articles

[PageSpeed] 56

Set the uid parameter to be "sa", or some other valid login on your database.  
0
Xanderno
7/20/2005 6:41:48 AM
i had been struggling on this for last 6 hrs :-(

cna u pls help m e..as to hwo i can set uid =sa using msde???
pls do respond!
0
samir25
7/20/2005 6:48:16 AM
While I agree with Xander that you need to supply a UID and password,
do NOT use the sa account for accessing the database from your web (or
any) application!!  This is very insecure - the sa account has
uber privileges that you don't want to toss to any application.

As far as I understand DNN (from posts like this and this), you need to create a new login account in your database, give permission to this login to access your database, and give this login ownership rights to your database.  Since you have MSDE, which does not come with a GUI to perform these tasks, you need to either acquire a GUI tool (such as SQL Web Data Administrator), or administer MSDE through the osql commandline utility.

Using osql, from the command prompt, this will connect you to your instance of MSDE and put you into an interactive mode with osql:
osql -S (local) -U sa -P yoursapassword

Now you can enter the commands in the interactive mode:
1>EXEC sp_addlogin 'yourDesiredDNNloginName', 'yourDesiredPassword'
2>GO
1>USE yourDNNdatabaseName
2>GO
1>EXEC sp_grantdbaccess 'yourDesiredDNNloginName'
2>GO

1>EXEC sp_addrolemember db_owner, 'yourDesiredDNNloginName'
2>GO

1>EXIT


Terri Morton
Engagement Manager, Neudesic

How to ask a question

0
tmorton
7/20/2005 9:48:52 AM
ok ..i tried this
osql -S (local) -U sa -P *secret*
it says sql server does not exist or access denied.

can pls guide me what to do.

thanks a lot
0
samir25
7/20/2005 11:55:14 AM
OK, I had assumed (incorrectly) that your local SQL Server
name/instance was (local).  So we need to find the name of the SQL
server; do this to find that information:
osql -L

This will show you the SQL server name/instance.  Replace the (local) with this SQL Server name/instance.


Terri Morton
Engagement Manager, Neudesic

How to ask a question

0
tmorton
7/20/2005 12:22:14 PM
i reinstalled msde and created an instance dnn..
here is what i do to use osql...as u guided

osql -S (local) -U sa -P **DO NOT POST PASSWORDS!**
 1>EXEC sp_addlogin 'mylogin', 'mypass'
2>GO
1>USE DNN
2>GO

using the "USE DNN" i get the below error...what doens it mean? so i need TO USE dnn In some other way??
can someone pls suggest to me.

msg 911,level 16, state 1, server COMPABC, line 1
could not locate entry in sysdatabase for database dnn.no entry found with that name.make sure that the name is entered correctly.


also when i do osql -L
i get this:
servers:
--NONE--
what does this mean.

also when i post on this forum...is it for all hte users or only for me that my post is first approved and then i see the resposne ...why is this so

thanks a lot
0
samir25
7/20/2005 1:06:26 PM
 samir25 wrote:

i reinstalled msde and created an instance dnn..

OK. Note sure why you did that, it is just going to complicate things.  But we can work through it.


 samir25 wrote:
using the "USE DNN" i get the below error...what doens it mean? so i need TO USE dnn In some other way??
can someone pls suggest to me.

msg 911,level 16, state 1, server COMPABC, line 1
could not locate entry in sysdatabase for database dnn.no entry found with that name.make sure that the name is entered correctly.

This means that there is no database named DNN in your default instance of SQL Server, called (local).  The name following USE should be your database name.  If you are not sure what the name of the database is, you can use this statement for a list of databases on your default server:

osql -S (local) -U sa -P **secret** -Q "SELECT CATALOG_NAME FROM INFORMATION_SCHEMA.SCHEMATA"

And you should use COMPUTERNAME\INSTANCENAME instead of (local) if your desired DNN tables are in the newly installed instance.

 samir25 wrote:

also when i do osql -L
i get this:
servers:
--NONE--
what does this mean.

This usually means that SQL Server is not running.  Check in your systray to make sure the SQL Server Service Manager is showing a green arrow and says Running.  Since you apparently now have more than once instance of SQL Server installed, it is important that you know exactly which  instance contains the tables for DNN.

 samir25 wrote:

also when i post on this forum...is it for all hte users or only for me that my post is first approved and then i see the resposne ...why is this so

This is a moderated forum.  This is why there is a delay.  After you've been here for a while and the moderators get to know you an know that you follow the Forums rules the moderation requirement will be lifted.

Terri Morton
Engagement Manager, Neudesic

How to ask a question

0
tmorton
7/20/2005 2:35:33 PM

ur above post really makes a lot of sense...here are my inputs.
i did this
osql -S (local) -U sa -P **secret** -Q "SELECT CATALOG_NAME FROM INFORMATION_SCHEMA.SCHEMATA"
to which i got as below
master
tempdb
model
msdb

i am creating instance DNN...so this is not the Db then ..its an instance?? i created this as
c:\sql2ksp3\msde\setup.exe sapwd="passtest" instancename="DNN" securitymode=SQL

so this is an instance...i need to create a Database then???
i tried to do this...osql -S .\DNN -E
 get htis error
[DBNETLIB] SQL Server does not exist or access denied
[DBNETLIB] Connection open (Connect())

what mistake i am doing.

thank so so so much for ur guidance.
i do hope moderators remove me from that delay.

also i opened the sql server manager...its green...actually i noticed this only when u said. i was normally startign and stopping these instances using controlpanel->....->...-> serivices...
in services i have the below things started
MSSQL$DNN
MSSQLSERVER
SQLAGENT$DNN
SQLSERVERAGENT

ALSO my sqlservice manager shows below info..there is only one server
SERVER:COMPNAMEABC
SERVICES: SQL SERVER

WHAT change do i need to make then....it means...when i am addressing in my webconfig file as

<appSettings>

<add key="SiteSqlServer" value="Server=(local);Database=DNN;uid=;pwd=**SECRET**;" />

is incorrect....
as i shoudl use computername\instancename...
pls clarify

thanks a lot



0
samir25
7/20/2005 2:57:24 PM
i cant believe it.....................i have actually executed the scripts............. i have spent the whole day doing this....i am so thrilled that 50% of my problem is solved...
i created a databse DNN using >osql -S COMPNAMEABC\DNN -U sa -P passtest
and then i changed my string as
<appSettings>
    <add key="SiteSqlServer" value="Server=COMPNAMEABC\DNN;Database=DNN;uid=sa;pwd=**secret**;" />
   
now i am only left on the asp.net part..i am unable to open the project! i fonly u can help me on that.

thanks a lot and a lot
0
samir25
7/20/2005 3:37:59 PM
Excellent, you've made solid progress.  (I misunderstood at the
beginning and didn't realize that you hadn't been able to even run the
installation scripts, sorry!)  So now we are actually to the point
where I thought you had been...

The sa login should only be used for database adminstrator work, such as running those installation scripts.  Your DNN application should use a much weaker login, and you will need to create that.  So NOW you should be successful running the commands I gave you earlier.

Using osql, from the command prompt, this will connect you to your instance of MSDE and put you into an interactive mode with osql:
osql -S COMPNAMEABC\DNN -U sa -P **yoursapassword**

Now you can enter the commands in the interactive mode:
1>EXEC sp_addlogin 'yourDesiredDNNloginName', 'yourDesiredPassword'
2>GO
1>USE DNN
2>GO
1>EXEC sp_grantdbaccess 'yourDesiredDNNloginName'
2>GO

1>EXEC sp_addrolemember db_owner, 'yourDesiredDNNloginName'
2>GO

1>EXIT
Once that is done, you can update your connection string accordingly:
<appSettings>
    <add key="SiteSqlServer" value="Server=COMPNAMEABC\DNN;Database=DNN;uid=yourDesiredDNNloginName;pwd=yourDesiredPassword;" />

Terri Morton
Engagement Manager, Neudesic

How to ask a question

0
tmorton
7/20/2005 3:52:39 PM

ok..i did as u said...but what does this mean...
i mean i ran the scripts and cud open the page http://localhost/DotNetNuke/Default.aspx 
but what is my next step.... how will the above new id help m e???

i am stil stuck up that i cant open the dotnetnuke proj...i mean i can open but i get this errro

unable to get the project file from the server.unable to open project dotnetnuke.the web dotnetnuke located ont eh srver "http:\\localhost" does not exist.

i have already created a directory on the iis(virtual) ...by the name dotnetnuke..then why do i get this error ..what checks can i make and what should i do to resolve this
i hope u can help m e on this also

0
samir25
7/20/2005 4:14:28 PM
That new ID is the one that DNN will use to access the database and
retrieve data -- DNN uses the information in that SiteSqlServer key
when talking to SQL Server.

The rest of the trouble you are having is not related to SQL Server, so we're not going to be able to help you with that.  It looks like you've got a discussion going in the DNN -- Getting Started forum, and you should be able to get the help you need on that.


Terri Morton
Engagement Manager, Neudesic

How to ask a question

0
tmorton
7/20/2005 4:18:20 PM
yup thanks a lot ..probably i was gettin gtoo greedy.
really apprecite ur help.

thanks a lot
samir
0
samir25
7/20/2005 4:26:12 PM
Reply:

Similar Artilces:

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello All, I'm Getting the following error when calling a dll from my vb.net application. [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The dll was written in vb6 and accesses a sql db using the following connection string. Public Const GLOBAL_DNS As String = "DSN=TransSrvFinal;UID=sa;PWD=admin;" This DLL works fine when called from other Windows Apps. However I'm now trying to call this dll from with in an asp.net application. I'm using vb.net as the codebehind. I'm a...

2008 IIS7 connection to SQL Server 2000 on Web Server 2000: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am setting up a windows 2008 IIS7 web server, and trying to connect to a windows 2000 sql server 2000 database. I have an IIS6 Windows 2000 web server activately connected just fine. I have anonymous and windows authentication enabled. And in my web.config I have identity impersonate="true" My sql server 2000 typically uses the IISUSER anonymous user set up in IIS6 on my original windows 2000 web server. But this new IIS7 is giving me grief. I can't seem to setup the IUSR or IISUSER or anything in it. I can't even use sql server credentials in my connection string altho...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
hi all. This is my first web form,and I am trying to conenct to a table in Ms SQL Server. when I run my program I got the followin error message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. I am using windows 2000 authentication. How can I fix it ? Thanks jsn hello, u need to privde a username and password for the SQL server that you are using !!!Bilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP 1. Open IIS, right-click on the virtual directory for your site and click on Properties. 2. Click the Dire...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
After sucessful installation of portal Starter kit, Portal Database was created and portaluser was the new login created. but when i tried to access the portalVBSDK on my PC this error is displayed. Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. 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: Login failed for user '(null)'. Rea...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Can anyone tell me why I get this error message and how to fix it? Thanks, Scott I would guess that it is because your SQL server is set up for windows authentication rather than mixed mode, and that your ASPNET account doesn't have a corresponding SQL server account. Jeff MartinMCSD C# .NEThttp://www.jeffmartin.com I found this method of changing modes on another site, and it helped me a lot. You can change the authentication to "SQL Server and Windows" by changing this registry setting: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer LoginMode = ...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Came in this morning and im getting the following error in our Provisioning tool. This was working as of yesterday and no changes were made to the web.config file. Ive failed over the cluster on the sql servers and also restarted the provisioning engine. Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The SQL server is setup for mixed mode authentication and ive opened my web.config file with visual studio and can make a connection with the same sql user and pass thats in my web.config to the proper databases.  The provisioning se...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
 Hmmm.... I have been developing a site on my local machine and it all works there. When I push it to the web-server it does not. I have used connection strings in my web.config file that look like this (the names have been changed to protect the innocent.. or me...) <add name="TDemoSiteConnectionString" connectionString="Data Source=192.168.8.37;Initial Catalog=TDemoSite;Persist Security Info=True;User ID=TDemo;Password=fred" providerName="System.Data.SqlClient" /> When I call a table adapter I get the error 'login failed for user null'. W...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
This code is giving me this error using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Text;     namespace WebApplication1 { /// <summary> /// Summary description for WebForm1. /// </summary> public class WebForm1 : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { SqlConnection con; string sql; SqlDataAdapter adExisting; //con = new SqlConnection("Data Source=slon12d11012";User ID=nnichol1;); //con = new SqlConnection("Initial Catalog=DACari;Data Source=slon12d1101...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello, I have installed DotNetNuke on my computer and did everything they said in the Configuration. But when I want to start http://localhost/DotNetNuke I receive an error: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. What is this. There is a Datavbase called DotNetNuke in SQL-Server gr. miles You have to have a user assigned to the database and use those credentials in you connection string (web.config)...~ChrisNet Data Design706Horsman.us This is a sql/msde authentication issue. Your web.config is using windows authent...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection #3
Hi I have am developing on xp machine with iis 5.1 and trying to connect to a seperate windows 2003 machine with mssql 2000 installed.I would like to use a trusted connection and I added an asp account on the sql server with permissions to the database and also edited the security tab on IIS to have this account. I unchecked allow IIS to control this password.  When I look in the event viewer on my local machine I get an error:Process information:     Process ID: 2388     Process name: aspnet_wp.exe     Account name: MACHINENAME\ASPNET &...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. #2
Basic setup IIS 6 with ASP.Net 2.0, Integrated Windows Authentication turned on (anonymous turned off) SQL Server 2000 with Windows Only Authentication on (SQL Server authentication turned off) web.config file contains the following relevant entries:<identity impersonate="true" /><authentication mode=Windows" /> connection string:Data Source=[server name]; Integrated Security=SSPI; Initial Catalog=[database name]; When I run my query on my development server, it runs perfectly. When I run it on the production server (which is just an exact xcopy of the development web site...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection #2
I realize people have had this problem before. Probably on this very board. But I am up against a wall and none of the solutions I have found online work at all. I have a asp.net 1.x application that sits on an IIS server and talks to an SQL 2000 database on a separate server. It was working fine until about a week ago when all of the sudden I started recieving the following error: "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection" In IIS manager the application is set up in a virtual directory, denies anonymous users, and uses only Integrat...

Web resources about - Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection - asp.net.sql-datasource

Resources last updated: 12/3/2015 5:45:44 PM