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.

 

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 ''. The user is not associated with a trusted SQL Server connection.

Source Error:

Line 41: 
Line 42:             'open the connection and execute the stored procedure
Line 43:             mConnection.Open()
Line 44:             mResourceID = mCommand.ExecuteScalar()
Line 45:             mConnection.Close()

Source File: H:\MIS Department\Intranet\SendItNow\App_Code\Dal\ResourceDB.vb    Line: 43

Stack Trace:

[SqlException (0x80131904): Login failed for user ''. The user is not associated with a trusted SQL Server connection.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +172
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +357
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   ResourceDB.SaveResource(String filename, String fromContactEmail, String toContactEmail, String message, Int32 ID) in H:\MIS Department\Intranet\SendItNow\App_Code\Dal\ResourceDB.vb:43
   Resource.SaveResource(String filename, String fromContactEmail, String toContactEmail, String message) in H:\MIS Department\Intranet\SendItNow\App_Code\Bll\Resource.vb:31
   ContentFiles_Default.ImageButton1_Click1(Object sender, ImageClickEventArgs e) in H:\MIS Department\Intranet\SendItNow\ContentFiles\Default.aspx.vb:33
   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +86
   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

0
cluce
2/18/2008 9:53:35 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
720 Views

Similar Articles

[PageSpeed] 25

You have integrated security turned off, but have not specified the login in the connection string?


Mark this post as the "Answer" if it was the answer.
0
sswanner1
2/18/2008 10:28:50 PM

you right I had to set it to true.

0
cluce
2/18/2008 10:30:27 PM
Reply:

Similar Artilces:

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

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

"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.     Hi,tirelessU can Go for these In web.config<system.web> <identi...

[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 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)
please tellme how to resolve this error, i m using server studio management tool. and trying to connect using sql server authentication. my pc is over a domain.   Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)  check whether that sql server is allowing sqlauthentication or not.select that server -> right click it-> select  properties  -> in the window, select security -> check what is the server authentication. it should be  sqlserver and windows authentica...

Login failed for user ''. The user is not associated with a trusted SQL Server connection.
I have a windows 2003 server hosting MS SQL  Server 2005. Another windows 2003 server hosting my App, and clients from the local intranet and outside (web). How do I surpass this problem, when it all works fine locally on my development machine? Use Forms authentication! AlCheersAlMy BlogMapStats.NETPlease click on 'Mark as Answer' if this post answered your question! I am using Forms authentication. <connectionStrings> <add name="memSocConnection" connectionString=" Data Source=WSPASQL01; Initial Catalog=mem_soc;Integrated Security=True" providerName="Syste...

Login failed for user ''. The user is not associated with a trusted SQL Server connection.?
Hello, I just got a copy of a website I was supposed to be working on.  I went to the web.config file changed the machine name to my machine's name and when I try to run the program I get the following error.  Could someone give me some advice on how to fix this ?  Thanks! On your production site, the site passes the web user's credentials (your IUSER account) to your sql server.   Make sure that your local site is set up to pass your credentials along to the sql server.  In your web.config, add identity impersonate=true. --JJPlease mark ...

Login failed for user ''. The user is not associated with a trusted SQL Server connection.
Hello everyone, I have a local IIS (WinXP) and a remote SQL Server 2005 DB.  When I try to run login using the aspnetdb, I get the following error: Login failed for user ''. The user is not associated with a trusted SQL Server connection. When I run the form in debug mode from Visual Web Developer 2005 Express it works fine.  In other words when the VWD launches the web page as http://localhost:1234 it works, but when I run the same page from http://localhost I get the error. I know this is permission issues.  I did a search and found info to add the ASPNET user t...

Login failed for user ''. The user is not associated with a trusted SQL Server connection
 Hi to all......... In my project I am using windows authentication and if I am running through the IIS getting this error. Suppose if I am directly run the project or use server authentication then I wont get this error.My web.config file is <?xml version="1.0"?><configuration>  <configSections>    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">  ...

Login failed for user ''. The user is not associated with a trusted SQL Server connection. #2
I've seen many, many, many, many posts regarding this topic - but none have been able to fully explain nor fix my problem.I've developed a security solution according to Scott Gu's guide and it works great - but only on my local machine running VWD and SQLExp2005. Once I move this application it completely breaks in the productions environment.  Today I managed to get it halfway there. I created a SQL login and changed my web.config to use these credentials - now the web application will come up, but none of my links (that are role based) are displayed - most likely because ...

Login failed for user 'maritos'. The user is not associated with a trusted SQL Server connection.
  How can i solve this issue? Thank youMario Lopes Hi,mariolopes  Where r u getting this message Plz Specify ur  Problem in detail.              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  See if the below KB helps.http://support.microsoft.com/kb/555332 Thanks,Dhimant Trivedi"When the going gets t...

Web resources about - error "Login failed for user ''. The user is not associated with a trusted SQL Server connection. " - asp.net.sql-datasource

Resources last updated: 1/21/2016 12:51:22 AM