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

Hi all,

newbie here so please bear with me.

I'm on a shared hosting account and I have set up a database but when I try to login I keep getting this error:

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

I've looked about for a solution but it all seems to be about altering IIS settings or creating a domain account, as I'm on shared hosting I can't do either of these.

What should I be doing?

Thanks for any help. 

 


 

0
tireless
2/18/2009 4:53:17 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

6 Replies
605 Views

Similar Articles

[PageSpeed] 9

 Hi,tireless

U can Go for these

 In web.config

<system.web>
<identity impersonate="true" />
</system.web> 

 

or 

 

<identity impersonate ="true" userName ="Windows UserName" password =" Windows Password"/>

or 

 

<system.web>
<identity impersonate="true" userName="WindowsDomain\YourUserName" password="YourPassword" />
</system.web> 

 

 

 

 



RAGHAV

MVP ASP/ASP.Net Read My Blog


MARK THE POST AS ANSWER IF IT HELPS U.


"Success doesn't come to you…you go to it."--Marva Collins




"Success does not come to those who wait . . . and it does not wait for anyone to come to it." Anonymous


0
raghav_khunger
2/18/2009 5:01:48 PM

 Thanks for that, I'll give those a go. Should I put a password explicitly in web.config like that?

0
tireless
2/18/2009 5:04:08 PM

refer here for complete solution explained setp by step.

http://geekswithblogs.net/ranganh/archive/2005/05/25/40503.aspx


MAKMark as Answer if this reply helps you
MVP ASP/ASP.Net
MVP ASP/ASP.Net
ASP.Net Hosting : Host DepotMy Site : ASPSnippets
0
mudassarkhan
2/18/2009 5:16:47 PM

 Hi,

seems like you have problem in your connection string

 Try changing Integrated Security value to False.

<add name="conString" connectionString="Data Source=Server IP,Port No;Initial Catalog=DatabaseName;Integrated Security=False" providerName="System.Data.SqlClient"/>

 Regards,

Sunil


Read My Blogs
0
sunilyadav165
2/18/2009 5:21:31 PM

I've seen that article mudassarkhan but unfortunately I'm on shared hosting so I can't create a domain account or access IIS.

0
tireless
2/18/2009 5:26:10 PM

You should create a user in SQL Server and add the username and password of the user in ur connection string set integrated security = false

or try simply adding the following line in web.config

<identity impersonate="true"/>

MAKMark as Answer if this reply helps you
MVP ASP/ASP.Net
MVP ASP/ASP.Net
ASP.Net Hosting : Host DepotMy Site : ASPSnippets
0
mudassarkhan
2/18/2009 5:31:55 PM
Reply:

Similar Artilces:

How to Handle Error Message: "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."
I'm running WinXP and using "Visual Studio 2005". To make a long story short, my "Default.aspx" page is using a GridView to display data which is being read from a Windows 2000 DB server. When I run the app under the IDE all works fine. I copied the 1 file and put it into my folder as, "C:\Inetpub\wwwroot\default.aspx". When it loads I receive the error message, "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." I'm frustrated with Studio Express 05 and will not bother with it again until Microsoft fixes this deployment issue. Can any one ...

You may receive the error "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection"
Hi,Choosing integrated authentication for ASP.NET applications is a good choice because no credentials are ever stored within your connection string for your application. However, you may receive the error "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection" while trying to use Integrated Windows Authentication and your application needs to access the SQL Server Database using Trusted Connection.I have explained the resolution in the following articlehttp://harishmvp.blogspot.com/2005/05/you-may-receive-error-login-failed-for.htmlThanks.regards,Harish...

You may receive the error "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection"
This article is in continuation with Part I where I explained the scenarios where this error occurs when the Webserver and SQL Server are running on the same machine.It explains the scenario where you have your Webserver and SQL Server running on different machines.  http://harishmvp.blogspot.com/2005/05/you-may-receive-error-login-failed-for_25.htmlThanks.regards,Harishhttp://geekswithblogs.net/ranganh...

[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...

Getting error "Login failed for user ''. The user is not associated with a trusted SQL Server connection" on trying to authenticate a user
Hi, I created aspnetdb on Sql Server 2005 and modified my web.config LocalSqlServer connection string to connect to the Sql Server instead of mdf file on Sql Server. When i click Log In button on my login control i am getting the error "Login failed for user ''. The user is not associated with a trusted SQL Server connection" But when i bind a radio button list or any control to select from aspnet_users or roles table data is displayed fine without any login errors (i am using aspnetdbConnectionString given below for binding data). Why is it happening only when i authenticate but...

error "Login failed for user ''. The user is not associated with a trusted SQL Server connection. "
All the research I found dealing with this problem is that the solution is to set SQLserver to mix mode.  I have SQL server already set to mix mode. I am not sure what else to do. Has anybody run into this problem? my connection string: <connectionStrings> <add name="ConnectionString" connectionString="Data Source= server name ; Initial Catalog=FILESHAREDB.MDF; Integrated Security=false;"providerName="System.Data.SqlClient"/> </connectionStrings>   Server Error in '/SendItNow' Application.  ...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Dear All,I am trying to establish a connection to my SQL Server which is on the Remote machine. My ASP.Net application is on the local machine. Below is my connection string: <appSettings><add key="NorthConn" value="server=ABC;integrated security=sspi;database=Northwind"/></appSettings>The North wind Database has the following user accounts:1) ABC\ASPNET2)ABC\IUSR_ABCboth of these accounts have permissions granted to them.My SQL Server has both Windows and SQL Server authentication checked. I checked the properties of my  web project in IIS  and it has both Anony...

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
Hi i installed msde with follwoing attributes for a project DotnetNUke..C:\sql2ksp3\MSDE\>Setup.exe SAPWD="password "INSTANCENAME="DNNV3" SECURITYMODE=SQLin 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 lotInstalling DotNetNukeUpgrade Error: ERROR: Could not connect to database specified in connectionString for SqlDataProvider   ---------------------------------------------...

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.
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.
 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.
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...

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

Resources last updated: 1/14/2016 10:33:54 AM