Intranet, Windows Authentication, Sql Server Login Failed For User '(null)'

Mar 31, 2006

Hi--

I am building an intRAnet website using windows authentication for website access and SQL Server access ( Trusted_Connection = true ).

In IIS I have these settings:

Allow Anonymous = unchecked (false)
Windows Authentication = Checked (true)
Digest windows = checked (true)

In my Web.Config file:

authentication="windows"
impersonate="true"
allowusers="*"

When I pull up the page these are my credentials:

Security.Principal.Windows:                  mydomainmyuserid (this is correct what it shows on my page)

Me.User.Identity:                                  mydomainmyuserid (this is correct what it shows on my page)

Threading.currentThread.currentUser    mydomainmyuserid (this is correct what it shows on my page)

 

So the ASP.NET page recognizes it is me and my domain.  However, when i click a button to pull some data from a database I get the error message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

My data access on SQL Server works fine.  The weird thing is when I debug on my machine it pulls data fine.  but when I copy the files to the windows 2003 server it doesn't work. 

Do i have to do something with delegation?

View 1 Replies


ADVERTISEMENT

Login Failed For User '(null)' Error When Trying To Use Windows Authentication

Feb 6, 2006

I'm working on an ASP.NET project, and we're attempting to switch from SQL Server authentication to Windows authentication to connect to the database.
It works fine locally when I debug in Visual Studio, but when it hits the web server, I get the error: "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."
IIS has anonymous access disabled, and Integrated Windows Authentication is checked. The web.config file has:
<authentication mode="Windows"/><identity impersonate="true"/>
The database I'm attempting to access is on a different machine than IIS, and the connection string doesn't contain a username or password, and has "Trusted_Connection=Yes", and "Integrated Security=SSPI".
From what I've been able to find online, I'm guessing the problem is due to IIS and SQL Server residing on different machines, but I'm not sure how to fix it.
Any ideas?
 

View 3 Replies View Related

Windows Authentication - Cannot Generate SSPI Context - Login Failed For User ''. The User Is Not Associated With A Trusted SQL

May 29, 2007


We are looking at developing an SQL Server 2005 Database and I would like to use Windows Authentication rather than SQL Server Authentication to connect our client app.

In our development environment, we have two Servers, one being used as a file server and the other as an SQL Server. We have now set up a domain using the file server as the domain controller. (We had previously been set up to use a workgroup).

I have set up an active directory group called SqlDevelopers and added an active directory user called Jonathan to it.

On the SQL Sever, in management studio, I have set up a new server login which uses windows authentication called DomainSqlDevelopers. I used the GUI to verify I could see the domain and the group.

The default database is set to a test database on the server. A user in the test database is mapped to the DomainSqlDevelopers and given the Roles dbo, db_datareader, db_datawriter.

To test the log in, on the server, I logged out as administrator and in as Jonathan. I could successfully access the server through management studio using windows authentication.

However, if I log in as Jonathan on my client PC and try to access the SQL Server using management studio and windows authentication, I have problems.

The first time I try I will get a timeout error. If I try again will get either:

Login failed for user ''. The user is not associated with a trusted SQL Server connection

Or

Cannot generate SSPI context

I can€™t determine any pattern to which of the above errors I get.

However, if I log in as administrator on my client PC, I can connect to the server using management studio and windows authentication.

Sounds like Active Directory/Domain or other Network issue (Not really my area). I would be grateful for any help.

Thanks,

Jon

View 9 Replies View Related

SQL Server 2014 :: Can Get User Windows Login When Using Server Login Authentication

Apr 26, 2015

Oracle and Teradata are able to capture the windows/client login that connects to their database with a functionnal ID.I've searched around and I don't think MS SQL can do this...I administer SQL 2014 server and also SAS Enterprise guide product. I've created sql server logins for several teams so everyone shares the same sql server login which is used to bind the SAS library to my SQL server database.

However, when looking at activity monitor, I can't drill down to which user is executing a particular query. I only see the SQL login which is share amongs 200 other folks.On the other hand, when they connect from SAS to Oracle or Teradata, I can see the shared login + additionally their windows NT login used to connect to SAS which is awesome....they can't fool me by using a shared/funcionnal ID....i still see who's using that ID...

View 2 Replies View Related

I Am Also Getting: Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Nov 25, 2006

Hi, am having the error above in my Subject Line.  I seem to have the problem on my host web service, they have IIS 6.0 on a 2003 Server, and SQL 2000 and SQL 2005 on another server that I connect to seperately.  I am using asp.net 2.0 and SQL 2000 Desktop version.  I am in the very basic beginning of this website development, all I am trying to accomplish here is to enter in a login and password and be redirected to another webpage.  This works on my local laptop with XP Pro, but when I try it on the server that I host my website on, I am getting this error.  Im not sure on what is going wrong here so I am at the mercy of asp gods of this site , below is some more info. 
 
web.config
<?xml version="1.0"?><!--     Note: As an alternative to hand editing this file you can use the     web admin tool to configure settings for your application. Use    the Website->Asp.Net Configuration option in Visual Studio.    A full list of settings and comments can be found in     machine.config.comments usually located in     WindowsMicrosoft.NetFrameworkv2.xConfig --><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings><add key="ConnectionString2" value="sqlXXX.XXXXXXXXXXX.com;uid=My_ID;pwd=My_Password;database=azwduser" />       </appSettings> <connectionStrings><remove name="LocalSqlServer"/>  <add name="LocalSqlServer" connectionString="Data Source=sqlXXX.XXXXXXXXXXX.com;Initial Catalog=AZWDUSER;Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings> <system.web>  <!--             Set compilation debug="true" to insert debugging             symbols into the compiled page. Because this             affects performance, set this value to true only             during development.
            Visual Basic options:            Set strict="true" to disallow all data type conversions             where data loss can occur.             Set explicit="true" to force declaration of all variables.        -->  <authorization>   <allow roles="Admin"/>  </authorization>  <roleManager enabled="true"/>  <compilation debug="true" strict="false" explicit="true"/>  <pages>   <namespaces>    <clear/>    <add namespace="System"/>    <add namespace="System.Collections"/>    <add namespace="System.Collections.Specialized"/>    <add namespace="System.Configuration"/>    <add namespace="System.Text"/>    <add namespace="System.Text.RegularExpressions"/>    <add namespace="System.Web"/>    <add namespace="System.Web.Caching"/>    <add namespace="System.Web.SessionState"/>    <add namespace="System.Web.Security"/>    <add namespace="System.Web.Profile"/>    <add namespace="System.Web.UI"/>    <add namespace="System.Web.UI.WebControls"/>    <add namespace="System.Web.UI.WebControls.WebParts"/>    <add namespace="System.Web.UI.HtmlControls"/>   </namespaces>  </pages>  <!--            The <authentication> section enables configuration             of the security authentication mode used by             ASP.NET to identify an incoming user.         -->  <authentication mode="Forms">   <forms loginUrl="login.aspx" defaultUrl="rdp.aspx"/>  </authentication>  <membership>   <providers>    <remove name="AspNetSqlMembershipProvider"/>    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>   </providers>  </membership>  <!--            The <customErrors> section enables configuration             of what to do if/when an unhandled error occurs             during the execution of a request. Specifically,             it enables developers to configure html error pages             to be displayed in place of a error stack trace.-->        <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">            <error statusCode="403" redirect="NoAccess.htm" />            <error statusCode="404" redirect="FileNotFound.htm" />        </customErrors>         </system.web></configuration>
 
Am I missing somthing here?
 Chrissrbytes@yahoo.com

View 7 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection

Jan 18, 2007

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: MACHINENAMEASPNET  Exception information:     Exception type: SqlException     Exception message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.    Any Ideas as to how I can fix this? 

View 7 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Mar 26, 2007

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), I get the "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection" error. I have verified that the settings I listed above are the same on both sites. What else should I check for?
I placed some test code on the page that outputs the current logged on user and the current asp.net user, and everything seems fine (both usernames are the same - the expected domainusername of the impersonated user who logged in to the site), so I don't know why the database would say the user was null. My test code for outputting the user is below:
string authUserName = User.Identity.Name;string aspUserName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;Response.Write("You are: " + authUserName + "<br/>");Response.Write("This page runs as: " + aspUserName);

View 3 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection

Mar 23, 2008

I dont believe that no one can help me in this damn error,Please, I'm gonne lose my job offer If I didnt fix this. I have spent 7 days searching with no use !!
I use ASP.NET 2.0 with C# to develop an intranet site, it was working perfectly when i was on Visual Studio, when i tried to publish the site it gave me that error.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
the web application on IIS server, windows 2003 - the database on a different server windows 2003, sql server 2000.
Regaeding that we have proxy server, one firewall.
I tried to do the following steps with no use :(
1. Create a Domain Account with priveleges similar NETWORKSERVICE (windows server 2003).2. Grant this Domain Account (DomainName/NETWORKSERVICE ) access in the SQL Server Database for the necessary databases (created a new login for this user and gave it the privillage creator, read, write)3. <identity impersonate="true" userName="DomainNameUserName" password="password" />The second method is to simply set identity impersonate to true and assign the username and password in the IIS.1. Type inetmgr from your command prompt and give enter.2. This would open the IIS Control Panel.3. Expand the appropriate nodes and select the Virtual Directory of your application.4. Right Click and select Properties.5. Switch to the Directory Security Tab.6. Under Anonymous access and authentication control click Edit7. Check the Enable Anonymous access in case you want people to access the application without logging in with Windows Logon Screen.8. Uncheck the Allow IIS to control password and enter the DomainName/UserName and Password in the respective boxes. Usually IIS uses IUSER_MACHINENAME credentials for Anonymous access.9. Uncheck if any other authentication mode is checkedI did the previous step exactly like that. and the error still come.I remind you again we have a proxy server with one firwallI dont running under https X
My connection string is:    <add name="LocalSqlServer" connectionString="Data Source=database server IP; Initial Catalog=database name; Integrated Security=True"; UID="sa" ; pwd="password";      providerName="System.Data.SqlClient" />Please find me a solution

View 4 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Apr 3, 2008

hi, 

there are two win2003 servers in the same workgroup. one has mssql 2000 server and other one has asp.net 2.0 web application connecting that mssql server. mssql server Authentication is SQL Server and Windows but when i try to connect using sql authentication with uid and pwd, i get the error;
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

searched a lot about it but couldnt find any solutions. the win2003 server which hosts mssql server has active directory. is this could be the problem? thanks in advance.

 ametedit :here is my connection string;"data source=192.168.16.1;initial catalog=SOLAR4;Trusted_Connection=yes;UID=Sql_user;PWD=123;"sql_user is dbowner of Solar4 database.

View 1 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection

Jul 20, 2005

Hi i installed msde with follwoing attributes for a project DotnetNUke..C:sql2ksp3MSDE>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
 
--------------------------------------------------------------------------------
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

View 13 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Aug 26, 2005

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=slon12d11012;User ID=nnichol1;Password=xxxxx");
//con = new SqlConnection("Data Source=slon12d11012;Initial Catalog=DACari;Integrated Security=SSPI;");
//con = new SqlConnection("Server=slon12d11012;Database=DACari;Trusted_Connection=yes;");

con = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DACari;Data Source=slon12d11012;Packet Size=4096;Workstation ID=WLON110355965;");



sql = "select 'RCRF' as DacType, R.Id, R.AmendmentInstructions as Comments, 'Comment' as TypeOfComment, D.ExternalID as RiskId,D.AmendedByUserId as UserId, D.AmendedDateTime";
sql+="from dbo.ITRR_RCRFDetailComments R, RCRFDetail D";
sql+="where R.Id *= D.Id";
sql+="and R.AmendmentInstructions *=D.AmendmentInstructions";
sql+="union";
sql+="select 'RCRF' as DacType, R.Id, R.ApproverComments as Comments,'RejectedComment' as TypeOfComment,D.ExternalID as RiskId, D.AmendedByUserId as UserId, D.AmendedDateTime";
sql+="from ITRR_RCRFApproverComments R, RCRFDetail D";
sql+="where R.Id *= D.Id";
sql+="and R.ApproverComments *=D.ApproverComments";
sql+="union";

sql+="select 'DAC' as DacType, R.Id, R.Comments, 'Comment' as TypeOfComment,D.RiskId, D.AmendedByUserId as UserId, D.AmendedDateTime from ITRR_DacDetailComments R, DacDetail D";
sql+="where R.Id *= D.Id";
sql+="and R.Comments *=D.Comments";
sql+="union";
sql+="select 'DAC' as DacType, R.Id, R.RejectedComments as Comments,'RejectedComment' as TypeOfComment,D.RiskId, D.AmendedByUserId as UserId, D.AmendedDateTime";
sql+="from ITRR_DacDetailRejectedComments R, DacDetail D";
sql+="where R.Id *= D.Id";
sql+="and R.RejectedComments *=D.RejectedComments";

sql+="union";

sql+="select 'CAP' as DacType, R.CapId, R.Comments, 'Comment' as TypeOfComment, D.CurrentRiskId,D.AmendedByUserId as UserId, D.AmendedDateTime from dbo.ITRR_CAPDetailComments R, CapDetail D";
sql+="where R.CapId *= D.CapId";
sql+="and R.Comments *=D.Comments";
sql+="union";
sql+="select 'CAP' as DacType, R.CapId, R.RejectedComments as Comments,'RejectedComment' as TypeOfComment,D.CurrentRiskId, D.AmendedByUserId as UserId, D.AmendedDateTime";
sql+="from ITRR_CapDetailRejectedComments R, CapDetail D";
sql+="where R.CapId *= D.CapId";
sql+="and R.RejectedComments *=D.RejectedComments";

sql+="union";

sql+="select 'MODAC' as DacType, R.Id, R.MiddleOfficeComments as Comments, 'MiddleOfficeComment' as TypeOfComment, D.RiskId,D.AmendedByUserId as UserId, D.AmendedDateTime";
sql+="from ITRR_MODacDetailComments R, MODacDetail D";
sql+="where R.Id *= D.Id";
sql+="and R.MiddleOfficeComments *=D.MiddleOfficeComments";
sql+="union";
sql+="select 'MODAC' as DacType, R.Id, R.RequestorComments as Comments,'RequestorComment' as TypeOfComment,D.RiskId, D.AmendedByUserId as UserId, D.AmendedDateTime";
sql+="from ITRR_RequestorComments R, MODacDetail D";
sql+="where R.Id *= D.Id";
sql+="and R.RequestorComments *= D.RequestorComments";

adExisting = new SqlDataAdapter(sql,con);
con.Open();
DataSet ds = new DataSet();
try
{
adExisting.Fill(ds,"Existing");
}
catch
{
throw;
}
finally
{
con.Close();
}




/**
System.Data.SqlClient.SqlConnection conn =
new System.Data.SqlClient.SqlConnection ();
// TODO: Modify the connection string and include any
// additional required properties for your database.
conn.ConnectionString =
"integrated security=SSPI;data source=slon12d11012;" +
"persist security info=False;initial catalog=DACari";
try
{
conn.Open();
// Insert code to process data.
}
catch (Exception ex)
{
Response.Write("Failed to connect to data source"+ex.ToString());
}
finally
{
conn.Close();
}
**/
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}

Server Error in '/WebApplication1' 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 information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.Source Error:



Line 75:
Line 76: adExisting = new SqlCommand(sql,con);
Line 77: con.Open();
Line 78: DataSet ds = new DataSet();
Line 79: trySource File: c:inetpubwwwrootwebapplication1webform1.aspx.cs    Line: 77 Stack Trace:



[SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
WebApplication1.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootwebapplication1webform1.aspx.cs:77
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731



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

View 1 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Conn

May 7, 2004

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

Newbie here, so thanks in advance for any help. SQL Server 2000 on Windows 2000, Mixed Mode authentication IS enabled.

System DSN set on 8 workstations, a mix of 2000 - 98 and XP Pro

App uses DSN connection, specifies sa user and password. DSN's all set up the same, Client config is TCP/IP, SQL Server also set to only accept TCP/IP.

Trying to authenticate using SQL Server Authentication. XP Pro machines generate the above error. 98 and 2000 machines connect flawlessly.

I am stumped. Have read the MS knowledgebase articles, read threads here. Nothing seems to apply. It's an Internet app, so using Windows Authentication is not desired. I just don't understand why XP pukes while the other MS platforms connect just fine.

If anyone has any thoughts, I'd appreciate suggestions!

Thanks

View 6 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Jul 20, 2005

Anyone,I have a user "john" whose machine is part of the "job" domain. He istrying to establish an odbc connection to an MS SQL 2000 server on the"school" domain. He uses Windows authentication to establish the odbcconnection however it gives the error "Login failed for user '(null)'.Reason: Not associated with a trusted SQL Server connection."I am guessing that the odbc connection is trying to pass thecredentials of jobjohn to the sql server. And since the sql serveris on the school domain it expects the credentials of schooljohn. Isthere anyway to specify the username and password so that this willwork even though the servers are on different domains without havingto trust the domains? Thanks in advance forany help on this!!Tony

View 2 Replies View Related

Err Msg: Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Mar 28, 2008

Hi, I have been working on this for a few days now. Read enough searchs on line. Still not working.

I have a web IIS 6.0 server and sql server 2005 both on the same Windows 2003 server. I have an ASP.net 2.0 application try to access the database, getting the error message as describer above.

By the way, the app is an internet application, so can not using window integrated security.

The config for the ASP .net application is like this:
Enable anonymous access using the IWAM_machine local account.

None of the authentication method is checked.
The app pool is also set to use the identity of the IWAM_machine account.

In sql server, using the mixed mode acess.
Added the IWAM_machine account, granted the account access to the databases needed

The app web config is set as:

<identity impersonate="true"/>

<authentication mode="Forms">

<forms name="ApplicationAB.ASPXAUTH" loginUrl="/ApplicationAB/login.aspx" />

</authentication>


<appSettings>

<add key="conString" value="Data Source=XXX.XX.XX.XXX;Initial Catalog=MyDB;Integrated Security=SSPI"/>

</appSettings>



Could you please help?!! I am really frustrated with this.

Thanks a million.

View 3 Replies View Related

SQL Security :: Login Failed For User Null / Not Associated With Trusted Server Connection

Jun 19, 2015

Any way to find out who's causing "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error in SQL Server error logs?

View 7 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Dec 11, 2007



My company is using classic asp pages for clients to sign in. A COM object is used in the page to do members and lists management job. The database server(SQL 2000) and web server(Windows server 2000) are on different machine.

Now I am laungching a project which wrap the COM into class so that we can upgrade our existing webforms to .net based. The folder which runs the .net website is set as anonymous access, and the username is set to a domian user as "POOHCORNERUM52API". I ran an asp page which is ok.

However if I runs an .aspx page even with very simply sentences It runs into error page like:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I googled on the internet, some pages suggest that .net pages are running under aspnet account, we need to impersonate to run that page with €œPOOHCORNERUM52API€? account, but the problem still exists even we do that impersonating like this:


<identity userName="poohcornerUM52API" impersonate="true" password="xxxxxxx" />

And on the SQL server I can see the user poohcornerUM52API is existed in the logins:

POOHCORNERUM52API Windoes User Permit master English

I ran the SQL profile to filter those with fail logins, and the event is captured however the field NTUserName and LoginName fields are empty.

Since I have done the impersonating, the page is running with the user "POOHCORNERUM52API", why those two fields are empty? I guess that is why the error come from.

If any one can help me out of this problem will be greatly appreciated.

View 3 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Oct 24, 2006

I am receiving the following message when connecting via query analzyer to SQL server using windows authentication.(error 18452). I have a login created with the sys admin server role on the server. When I connect using SQL authentication it works.

I added myself to the local admin group on the server, this allows it to work. The same situation is seen with another user.

I am using windows 2000 sp4 server and SQL 2000 SP3, connecting from NT4. I get the same issue if I use TCP or named pipes. We have been using SQL security but are moving to windows authentication - but this issue is stopping us.

I have checked and upgraded my version of MDAC to match the server version 2.7 (sp1)


Any help would be much appreciated.


Thanks

Ian

View 21 Replies View Related

Err Msg: Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Mar 26, 2007

I have a single user receiving this error msg on a web page of our Intranet web app after they change their password.  The user can access the web app just fine until they interact with this particular page.  This page accesses the database while data is entered via an ADO connection.  (Classis ASP)

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

The user has recently received a new desktop and the problem persists.  The database login account created for the user has been deleted and recreated with no change.

We are running SQL Server 2000 with SQL Server and Windows Authentication enabled.

Connection string: Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ProductionDatabase Data Source=ProductionServer

Our solution has been to change the user's password back to their old password.

Any ideas?

Thanks.

Edit:  I am not entirely sure this is a SQL Server issue but I am starting here.

View 6 Replies View Related

Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection

Oct 23, 2007

HI,

Im have deployed a report to my RS2005 server and when i run it I get the error

An error has occurred during report processing.

Cannot create a connection to data source 'test'.

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


My datasources ''test'' is as follows ="Data Source=" & Parameters!ServerName.Value & ";Initial Catalog=master"






It is not a shared datasource


For complete source code and explanation of the problem, I am trying to replicate this excercise posted on this hyperlink

http://www.sqlservercentral.com/articles/Reporting+Services/61339/#

I have modified the DBA_REP.RDS datasource to point to a server on my network and set up the , I have got the report rendering within Visual Studio but when i deploy I get the above error...can someone please advise?

to get the example working..make sure you
1. change the default server under the servername parameter
2. change dataset2 to be a storedprocedure and not text command
3. create the sql_server table

View 2 Replies View Related

Error : Cannot Open User Default Database. Login Failed. Login Failed For User 'server/user'

Nov 22, 2007



i'm using the Enterpirse library logger to write logs into a database.
When choosing connection string i choose the database i want in the "connection properties" dialog box and
push 'Test connection' button.
everything goes well.

then i open the SQL Server Management studio express and connect to the databse to check some things,
from that point on , when i push the 'Test Connection' button in the Enterprise library i get the error:


"cannot open user default database. Login failed. login failed for user My'server/MyuserName'"


even when i close the sql server manager , it is still stuck - the connection test doesn't work anymore....
it only work when i restart the computer.

why ?

View 3 Replies View Related

Perplexed: Login Failed For User '(null)'. Reason: Not Associated With A Trusted SQL Server Connection.

Jul 21, 2005

I am having problems with my app.  I am developing an app on my local PC.   I am using IIS locally to test it in Visual Studio.My application is hitting a SQL Server on a remote machine.I have a drop-down list that works find when testing from my local PC.  But when I have remote users test this application I get the following error when it tries to run the code that gets the contents of the drop-down list from the SQL Server:System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.Here is my connection string from web.config: </code>
<add key="dbconnect" value="Server=SQLSERVERWEB;Database=WebDB;Trusted_Connection=True" /></code>And my info about impersonation:<code>
<identity impersonate="true" />
<authentication mode="Windows" /> </code>And the VB code from my Application:
</code>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Label1.Text = User.Identity.Name
ddlDepartments.DataSource = Dep()
ddlDepartments.DataTextField = "DepartmentName"
ddlDepartments.DataValueField = "DepartmentID"
ddlDepartments.DataBind()
End If
End SubPublic Function Dep() As SqlDataReader
Dim dbConnection As New SqlConnection(ConfigurationSettings.AppSettings("dbconnect"))
Dim dbCommand As New SqlCommand("sp_retrieve", dbConnection)
dbCommand.CommandType = CommandType.StoredProcedure
Try
dbConnection.Open()
Dim Results As SqlDataReader = dbCommand.ExecuteReader(CommandBehavior.CloseConnection)
Return Results
Catch ex As Exception
Label1.Text = ex.ToString()
End Try
End Function</code>I have IIS running under an account that is on both the SQL Server and on the IIS server and have granted dbo, read, write rights to the account. I have tried disabling anonymous access, and the other authentication routines and it still does not seem to work.   Why will this work fine on mylocal PC remote PCs can't retrieve data from the SQL Server?

View 3 Replies View Related

Getting Error:Login Failed For User'(null)' .Reason: Not Associated With A Trusted SQL Server Connection.

Aug 11, 2005

can any one help

View 3 Replies View Related

Cannot Open Database Intranet Requested By The Login. The Login Failed.

Mar 27, 2008

 Error!!! 1>Cannot open database "intranet" requested by the login. The login
failed.Login failed for user 'RAGHAVEN-71AF9BASPNET'. Error!!! 2>
An error has occurred while establishing a connection to the server.
 When connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL
Server) These both errors r coming simultaneously when start to debug only when i tried to retrive data from database ,
from past two days not able to work on database,plz
help me in solving this ,i tried everything what i know and even on
experts advice from recommended websites, forums and on google search..

View 4 Replies View Related

Failed DTS Package Locks User Out Of SQL2005 (Windows Authentication) ... For Good!

Feb 13, 2006

Would be interested in any advice or comment on the issue we are experiencing with SQL 2005.

In order to test some DTS package migrations, we simply created a DTS package on SQL 2000 (using Export) to copy all database objects from one database to another.

Then we restored the source database on SQL 2005 server, migrated the DTS package, and tried to execute it.

The package migrated 'fine', ran part way, and then failed.  Since then we have been unable to connect to the server (Database Engine, or Integration Services) using Windows Authentication.  (Error 18456, Sev 16, State 11).

We can connect to the Database Engine using SQL Authentication (but not to Integration Services which only allows Windows Authentication).

We have been able to replicate this consistently - every annoying time we've tried it!

(Reinstalling SQL Server does 'fix' the issue ... until you try a similar package again).

View 2 Replies View Related

Error String: [Microsoft][ODBC SQL Server Driver][SQL Server]Login Failed For User '(null)'. Reason: Not Associated With A Trus

May 14, 2008



Hi all

This Job ran yester day fine,to day It got failed with this error

any suggestion to troubleshoot problem is appreciated.


DTSRun OnError: DTSStep_DTSTransferObjectsTask_1, Error = -2147203052 (80044814)

Error string: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Error source: Microsoft SQL-DMO (ODBC SQLState: 28000)

Help file: SQLDMO80.hlp

Help context: 1131



Error Detail Records:



Error: 0 (0); Provider Error: 0 (0)

Error string: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Error source: Microsoft SQL-DMO (ODBC SQLState: 28000)

Help file: SQLDMO80.hlp

Help context: 1131



DTSRun OnFinish: DTSStep_DTSTransferObjectsTask_1

DTSRun: Package execution complete.

View 3 Replies View Related

Login Failed For User '(null)'.

Aug 1, 2007

 I have an issue dealing with connectivity between the client and Sql Server Services or Sql Authentication. I keep receiving this type of error message:Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am sure my connection string is correct within my web config file, I have something like this:Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
The reason why I think the connection string is correct is because I have a server where my asp.net application is stored and used, this server is called server1. Server1 is connected to MS-SQL server that is installed and used on server2. When I run my application from server1 everything is perfect, nothing goes wrong, but when I run the application from my client or local machine I get the error message saying not associated with a trusted site.
Now I have the web config set to <identity impersonate="true"> that will allow windows Authentication, and I set the permissions within the database to use NT AUTHORITY NETWORK SERVICE as a user, plus my own network credentials are set within user on the database,  just so I could troubleshoot the problem. But I still get the error message not associated with a trusted site.
Just to recap my problem, I can see the data when I run the application in Server1, but I can't see the data when I run the application from my local machine. http://server1/MyApplication.aspx <-- this is an example of the url that I enter on my local machine to acces the application. Plus I have full acces to server1, and other application are running just fine from this server.
I am using visual studio 2005, but using sql 2000, with the latest service pack for windows XP pro.
 
thanks,
xyz789
 
 

View 4 Replies View Related

Login Failed For User '(null)'

Jan 5, 2004

I am creating a Data Web Form using the Data Form Wizard.
After configuring a valid connection to a SQL Server on my network, I receive the following error when trying to run the page: "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."
Any ideas?

Thanks,
Mark

View 9 Replies View Related

Login Failed For User '(null)'

Mar 31, 2006

Any users out there  resolve this one.  Thanks in advance!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.OleDb.OleDbException: Login failed for user '(null)'. Reason:
Not associated with a trusted SQL Server connection.Source Error:




An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:



[OleDbException (0x80004005): Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.] System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +1054593 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +53 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.OleDb.OleDbConnection.Open() +37 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

View 1 Replies View Related

Login Failed For User Null

May 17, 1999

SQL7 server is configured to use both SQL and NT authentication. Periodically, NT authenticated users get the error "Login failed for user '(null'. Reason: Not associated with a trusted SQL Server connection."
Repeating the login will eventually end in success.
Microsoft article Q216848 indicates this has something to do with the version of MDAC.

We have not changed the version of MDAC on the server, but checked it and the versions are as the article states (MDAC 2.1 & SQL Driver 3.70.623).

We had a newer version on the client, but went back to the version above that came on the SQL7 CD with no luck.

Any ideas, suggestions, or similar problem experienced?

Thanks in advance.

View 1 Replies View Related

...Login Failed For User (null)...

Sep 8, 2003

When I try to open up a table in EM I get the msg of ...Login failed for user (null)...which is me

it looks like my sid has become null...Im the system admin...do I use the procedure 'sp_change_users_login'
I tried reading up on this procedure, but BOL was not very clear.

How would I go about getting my sid back ?

thanks

View 3 Replies View Related

Login Failed For User '(null)'

Apr 20, 2006

Need help for this error ---- [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

while accessing vb6 datareport through citrix client which is accessing sql2000 I got the above error msg.

vb6 datareport use the oledb provider for odbc driver with dsn for connection.It is working fine if run it locally and problem occured only through citrix client.

Thanks in advance for help.

View 6 Replies View Related

Null User Login Failed

Dec 21, 2006

I'm new to Crystal Reports and ASP and I'm sure i'm missing something simple here.

I've got a SQL server database, A Crystal Report, a VB application and an ASP Application

In the VB app i call the crystal report and log on to the database with the intergrated security

However in the ASP app i try the same and it has me log on as a null user.

what have i forgotten to do that will let the intergrated security work between SQL Server and ASP

View 2 Replies View Related

Login Failed For User '(null)'.

Mar 6, 2007

I recieved this error in my logs:

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

It appeared nearly 20 times, then about 30 minutes after the first occurence, I noticed in my Event Viewer this error:

The registration of DNS name XXX.XXX.XXX.XX.in-addr.arpa. for network name resource 'SQL Network Name(SQLServer)' failed for the following reason:

DNS operation refused.

After that I began recieving hundreds of errors like this one:

Login failed for user 'SQL user'. Only administrators may connect at this time.

I was unable to connect to the server to see what was going on so I had to failover the server. That's why my troubleshooting is limited to error logs. After the failover, everything came up fine with no more errors. Has anyone ever encountered this before?

BTW, This is a SQL 2000 Cluster on Windows 2000.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved