SqlBulkCopy Login Failed Error
Mar 20, 2007
Hi There,
I'm trying to use a sql bulk copy to transfer data from xml file to a table in one of my page. In this page I'm doing 2 database related. The first is a simple insert that will return a value and the second one is the sql bulk copy data transfer. I'm using the same connection for both of them and the sql bulk copy always give me a "login failed" error while the insert is fine. Do I need to set a specific setting for the sql server account so that it can use sql bulk copy?
Thank you
View 3 Replies
ADVERTISEMENT
Oct 27, 2004
Hi,
Im getting this error when attempting to retrieve data from an sql database.
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: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.
Source Error:
Line 13: objConn = New SqlConnection( "Server=LAB303-066NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()
Source File: C:finalyearproject2sample.aspx Line: 15
Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanks
View 3 Replies
View Related
Mar 18, 2007
hi,
so i have a new box and I'm trying to get my websites and SQL Server 2005 Standard Edition working on it, but the pages give me the following error when I try to load them:
"Cannot Open Database "XXXX" requested by login. The login failed. Login failed for user 'xxx'"
Everything seems exactly the same settings and user-wise from my old box to my new one, but nevertheless everything I've tried gives me the same error.
I've tried creating new users in SQL Server and giving them appropriate permissions to my database. I've even tried just using the built in 'sa' account. Nothing seems to change the error, except when I give it the incorrect password then it just says 'login failed'
This leads me to believe that i'm successfully logging into the SQL Server, but it doesn't want to give me access to the database I'm requesting access too. But "apparently" the account i'm using should have access to the database. If nothing else the 'sa' account should, but that didn't work either.
I'm stumped. Any ideas?
View 6 Replies
View Related
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
May 14, 2008
Cannot open database "QuoteSystem" requested by the login. The login failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Last time I recieved this error I had to add ASPNet, NTAuthority, and myWebSiteUsers USERS under the database properties-->permissions setting for the specific database I am trying to access with the website but this database(QuoteSystem) does not lists any of these objects so I can add them. Does anybody know what I have to do to fix this?
I am using SQL Server 2005.
View 7 Replies
View Related
Aug 10, 2005
Please, can anyone tell me why I am getting the undermentioned error message when I develop my application as an IIS Site in Visual Web Developer 2005 Express ? I have already developed and successfully tested it as a 'FileSystem Web Site' .I am using SQLSErver Express 2005 edition and have which I have installed along with the Northwind database as per the download instructions. My IIS software is version 5.1 which I have checked and it is configured to allow Integrated Windows Authentication. the relevant code is (1) web.config file connection strings
<connectionStrings>
<add name="NorthwindConnectionString"
connectionString="Data Source=.sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>(2) the grid view control and sqldatasource
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="CategoryID" HeaderText="CategoryID" InsertVisible="False"
ReadOnly="True" SortExpression="CategoryID" />
<asp:BoundField DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [CategoryID], [CategoryName], [Description] FROM [Categories]">
</asp:SqlDataSource>This is the full error message and details:
Server Error in '/sqlservertest' Application.
Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'. 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: Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'.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:
[SqlException (0x80131904): Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'JERRY-3C9615BAAASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684883
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1751
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +32
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +601
System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +159
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +346
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +445
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +304
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
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) +1837
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +129
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) +1787
Version Information: Microsoft .NET Framework Version:2.0.50215.312; ASP.NET Version:2.0.50215.312
View 1 Replies
View Related
Sep 9, 2015
Many a times see the below error in SQL Error log.
Login failed for user 'NT AUTHORITYANONYMOUS LOGON'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: ]
Is this something to do here?
Note: If I run the below statement I know that the SQL Error log entry will go off, but wanted to know the real significance of this error?
CREATE LOGIN [NT AUTHORITYANONYMOUS LOGON] FROM WINDOWS
View 1 Replies
View Related
Mar 13, 2007
We have a SQL 2000 Active/Passive cluster running on Windows 2000. On one node, everything logs in fine (second node is powered off). I can use local authentication fine in OSQL (-E) and even see my connection in SQLEM current activity as [DomainUser] for the NT account which I am logged in as. Then I bring the second node online and initiate a failover. SQL Server starts but Cluster Admin cannot connect and starts throwing this Anonymous Logon error. I open a command prompt and try the same OSQL (-E) local login and sure enough it is also giving the Anonymous Logon connection user. I do not understand why the failover to a second node is causing the Trusted Connection Local authentication to switch to Anonymous instead of the [DomainUser] which I am using. Any help is appreciated. John.
View 1 Replies
View Related
Feb 11, 2008
I have inherited a web application. We have just migrated from SQL 2000 to SQL 2005. All pages that connect to a SQL database connect without issue except one. It is a page redirect from a datagrid. Security on the database allows read/write for user ATDB2. In desperation I've added all Database role memberships except db_denydatareader and db_denyatawriter. (I've not posted Stack Trace, but will if requested).
Why would one page cause an error, while all others (using same login) function OK?
This is the error:
Server Error in '/atdb' 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 'ATDB2'.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.
Thanks,
Joekus
View 1 Replies
View Related
Apr 16, 2008
Hi when i try and open a database in sql server management studio i get the error "Cannot open user default database. Login failed. Login failed for user 'DOMAINUser'. (.Net SqlClient Data Provider)", what can i do to rectify this, i have googled around and still havent found no answers.
View 4 Replies
View Related
Jul 27, 2005
Been looking through the forums for a solution to this problem.I already tried granting access through statements such as:exec sp_grantloginaccess N1'machineNameASPNET'But they don't seem to work.. i vaguely remember seeing somewhere a DOS command line statement that grants access to the ASPNET_WP and that fixed my problem before on another computer.. but this is a new computer and i forgot to write down the command.Can anyone help explain and propose a solution to my problem. Many thanxs.
View 9 Replies
View Related
Dec 19, 2003
I am using the MSDE to connect to my ASP.NET application. I get this error after clicking the login button of my login page. Anyone know why this would happen?
Thanks for any help,
Cannot open database requested in login 'DataSQL'. Login fails. Login failed for user 'serverASPNET'.
View 5 Replies
View Related
May 10, 2004
I wrote a code to check and validate the username and password against the database and redirect the user based on the user flag as follows:
Dim MyConnection As SqlConnection
Try
If Page.IsValid Then
Dim strUsername As String = txtUsername.Text
Dim strPassword As String = txtPassword.Text
Dim DS As DataSet
Dim MyCommand As SqlDataAdapter
Dim SelectCommand As String = "select userid, flag from employees where username = @login and password = @password"
MyConnection = New SqlConnection("Data Source=localhost;Integrated Security=SSPI;" & _
"Initial Catalog=rfd;")
MyCommand = New SqlDataAdapter(SelectCommand, MyConnection)
MyCommand.SelectCommand.Parameters.Add(New SqlParameter("@login", SqlDbType.Char, 10))
MyCommand.SelectCommand.Parameters("@login").Value = strUsername
MyCommand.SelectCommand.Parameters.Add(New SqlParameter("@password", SqlDbType.Char, 10))
MyCommand.SelectCommand.Parameters("@password").Value = strPassword
DS = New DataSet
MyCommand.Fill(DS)
'MyConnection.Close()
If DS.Tables(0).Rows.Count = 1 Then
Dim flag As String = DS.Tables(0).Rows(0)("flag")
Dim id As Integer = DS.Tables(0).Rows(0)("userid")
Session.Add("flag", flag)
If flag = "u" Then
Session.Add("userid", id)
Session.Add("Page", "user")
Response.Redirect("user_index.aspx")
ElseIf flag = "pl" Then
Session.Add("userid", id)
Session.Add("Page", "pl_index")
Response.Redirect("PL_index.aspx")
End If
Else
msg1.Style("color") = "red"
msg1.Text = "Username or Password incorrect: Please Try again"
End If
End If
Finally
Session.Timeout = 10
MyConnection.Close()
End Try
End Sub
However, when I run it, it points as the line " MyCommand.Fill(DS)" and said Server Error - Login failed for user/aspnet. Where should look and what should I ckeck? Please help me !
View 4 Replies
View Related
Jun 22, 2004
Level: beginner!
What is wrong?
Login failed for user 'DEBBY-76GXHEASPNET'.
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 'DEBBY-76GXHEASPNET'.
Source Error:
Line 90:
Line 91: If Not Page.IsPostBack Then
Line 92: Da_leerlingen.Fill(Ds_leerlingen1)
Line 93: Dg_leerlingen.DataBind()
Line 94:
Source File: c:inetpubwwwrootWebApplication3WebForm1.aspx.vb Line: 92
Stack Trace:
[SqlException: Login failed for user 'DEBBY-76GXHEASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
WebApplication3.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootWebApplication3WebForm1.aspx.vb:92
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
Thanks
View 4 Replies
View Related
Mar 1, 2000
Hi there,
I'm getting the following error when I try to run replication from Server A to Server B
28000 Login failed.
I have checked ODBC driver, client Configuration, Remote server set up and everything seems to be set up correctly.
I have also checked NT trusted Relationships and it is ok,
I can, however replicate data from Server B to server A
Does anyone have any thoughts on this,
Thanks in advance
Fin
View 1 Replies
View Related
Jun 23, 2004
Hi
I have installed sql server on my standalone PC.
I used "window and sql mix authentication" for the sql server in the enterprise manager set up.
when I try to use the sql server login name for the startup service account, I have this error. "No Mapping between names and security IDs ".
So Even though I use mix authentication, I am still using window login name.
Then I create the DSN file.
But when I run the ASP program, I have this error "login fail for user-("user name that I used for dsn file configuration").
I try to configure the dsn file set up with both authentications, windows and sql login names.
But I got the error again.
I am really lost here.
Please help me. thanks...
View 2 Replies
View Related
Jun 24, 2004
Hi
I have IIS Web server and SQL database server on my PC.
When I run my ASP page, sometimes I got the error....
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'MYPCIUSR_MYNAME'.
What puzzled me is that I don't get this error all the time. For the same program, and same configuration, sometimes it turned out okay but sometimes I got this error.
I used mix authentication for SQL database.
Please help me with this...(I am very new to sql database)
View 6 Replies
View Related
Jun 17, 2007
Hey Microsoft: this affects development that will eventually sell a lot of seats on SharePoint Server 2007. If you guys and gals can't straighten out this mess, you can't expect custom solutions with custom web parts. So pay attention for your own good. Yes, SPS 2007 is what this is all about. I've created simpe web parts and deployed them, same VS 2005, but I need local development and debugging for more complex stuff. I'm really disappointed that you have no solution for this problem.
I've seen other posts on this, but the result seems to be the same: if you fix it, it's by accident, not by design.
1. I created a blank ASP.NET web site
2. I added a web part manager
3. I added a web part zone
I get the error described above. I have no idea why SQL Server settings are so screwed up.
I've tried all the stuff in the other posts - security settings, command line installation, etc. None of those worked.
The default template(s) don't copy anything into App_Data, nor create an empty folder. I don't know why that is. I have other web sites working just fine, but they use remote SQL databases, or local ones I created, and didn't need profile management (no forms authentication, no web parts, no web zones).
I've also started out with a local database, using SQL Authentication, later moving it to a remote server, and never had any problems. The SQL Server developer edition and Express seem to work just fine. I can also debug stored procs when the .mdf is in App_Data. So the problem isn't one of connectivity.
What would cause the default screw-up? This would seem to point from all directions to a problem with Visual Studio (2005)? The installation is defalt - perhaps some extras included (copy local), but nothing unusual. AJAX for ASP.net is installed, but not used in the above "default web site" trial. Likewise Syncfusion's tools, which work fine on other developer workstations at this same location, all of which are from the same image (purchased at the same time & imaged). That web parts work on other boxes, running all the same management tools (anti-virus, remote sys admin/sms etc.) makes none of those suspect.
I think Microsoft needs to have a clean problem solution and publish it. SP1 certainly doesn't fix it. What's worse is the stupid, lame error message. "I can't open the default database". Well, what did you try? What do you think the default is? What settings are you using? Why is there no debugging information other than the usual worthless trace information showing it's all deep within the ProviderBase and SqlClient namespace code? How is that supposed to be helpful?
If anyone has anything solid, not guesses, I'd like to know.
View 1 Replies
View Related
Feb 12, 2001
I get this error when trying to connect. I'm using the sa id and password for all of my odbc connections. It fails when trying to connect to this one but it's ok on a couple of others I've set up with the same id etc.
Where is this "" coming from and how to avoid it in the future?
I've removed and recreated the connection to be sure that I didn't actually type that in as the id....hey it's monday...it could happen.
View 2 Replies
View Related
Aug 11, 2002
Hi,
My application returns the following error when a SQL call is made during a transaction log backup.
Cannot open database requested in login 'login_name'. Login fails.
Has anyone come accross this problem before? or maybe worked around it?
Cheers
Luke
View 1 Replies
View Related
Sep 17, 2007
Hi All,
I have been struggling to make my classic ASP to call mirrored db successfully for the last few days. I am using a ODBC SQL Native Client. The front end application works perfectly untill the database is switched from principal to mirror server. I am getting the following error.
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
[Microsoft][SQL Native Client][SQL Server]Cannot open database "testDb" requested by the login. The login failed.
I will briefly explain what I have done. I hae created a SQL Login testUser and this login has the dbowner rights to testDb. This is being done in Principal server. Till now the application works fine. Once I switch it to failover, the mirror server acts as a principal - this is what I was expecting. On database level it works. But my ASP application doesnot seem to like it. When I closely looked into the security, I found that testUser does exist in the testDb but the real problem is testUser is not associated with testUser Login. It's not possible to change as well.
Any sort of pointer is appreciated.
Many thanks.
Sincerely,
Milan G
View 4 Replies
View Related
Apr 4, 2007
Hi everyone, I need some help.
I am trying to install a clean copy of SQL 2005 onto this server. It goes along fine until installing the "SQL Server Database Services" when I then get:
SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client][SQL Server] Login failed for user 'sa'. Refer to server logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.
There did used to be SQL installed on this server, but we un-installed it. What do I need to do now to install a fresh copy of SQL?
Thanks!
-tim
View 1 Replies
View Related
Jun 5, 2007
Mircrosoft recommends that you change the authenication from Windows Authenication to SQL and Windows Authenication. This will allow users to gain access to the SQL server.
View 1 Replies
View Related
Oct 20, 2007
Hi
I've installed 'SQL Server Express 2005 SP2'.
When I select 'SQL database' from 'Add new item ' (either in Visual C# or Visual Web Developer express) I get the following errror: "Login failed for user'.
My OS is Vista.
I've tried reinstalling SQL Server express, but I still get the same error.
Any ideas on how to fix this?
Thanks
Jon
View 5 Replies
View Related
Mar 18, 2005
i get the login error "Login failed for user MACHINENAMEASPNET"
i have tried several methods but to no avail. what is wrong here actually??
thankss
View 10 Replies
View Related
Oct 7, 2014
When I am trying to connect my database using SQL Server Authentication option, then its showing error: "An attempt to login suing sql authentication failed. Server is configured only for Windows authentication only."
View 8 Replies
View Related
May 7, 2007
Hello,
Until a few weeks ago I was very satisfied with my frontend/backend application Access 2003/SQL Server Express. Then I tried to build a website with Dreamweaver 8.0 and connect it to the Server DBase and everything went wrong. My problems are the following:
In trying out the connection between DW and SQL I tried and changed some things with no result. I suddenly got a problem with the Norton firewall (wurms part) and with the named instance. At this very moment I sometimes have to switch from ".SQLEXPRESS" to "<machinename>SQLEXPRESS under Windows authentication. (provider: TCP provider, error 0 - no connection because of an active refuse of the goalcomputer)(MSQL Server error 10061). How can I solve this problem?
The connection between DW (using ASP) and SQL Server always gives the same error: "ODBC drivers error 80004005 cannot open database x requested by login. The login failed". I tried everything I know (that isn't much by the way) but getting no connection between the two programs. When I test the connection and the recordset in DW everything is OK. Anyone any suggestions?
The third problem is the most important. By doing things like (1) en (2) my frontend/backend database has become very very slow (it takes minutes to get a simple query done) and in fact doesnot function at all. When I look in de SQL part everything seems OK and I can open the tables quickly, but in Access the menus work but the forms and queries don't. This problem is very essential to me and I hope there is a solution?
I hope I'll get some answers to the above questions.
Thanks in advance.
Rob
View 5 Replies
View Related
May 22, 2008
Hi,
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITYLOCAL SERVICE'.
my applicaton working on other machine perfect with the same code but when i upload on web server showing me above error.
Thanks with best regards,
View 7 Replies
View Related
Jan 16, 2005
Hello everyone. I'm very new to asp.net. I've been coding in vb.net for a while now (getting my associates degree in desktop application programming) and my boss wants all of my new applications to be web based now. Well, i decided to take some initiative on this and begin a new project for my department. This is a very small project. So far, everything is coming along alright (i found an eBook that's helped me quite a bit). Everything was cool until yesterday when i tried to connect to our sql server database. I get an error message stating:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Because i'm testing this on my system as well as the remote system which hosts the application, i can see the error message on the remote system. Here is the error it's giving me:
Server Error in '/' 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 57: sConnString = "Server=F11602A2120564OPS;Initial Catalog=OpsMonitor;User ID='public';Password=;Integrated Security=SSPI;"'Connection String
Line 58: sConn = New SqlConnection(sConnString)'Initialize New Connection
Line 59: sConn.Open'Open the connection
Line 60: End Sub
Line 61: </script>
Source File: c:inetpubwwwrootatm_reporting.aspx Line: 59
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() +383
ASP.atm_reporting_aspx.OpenConn() in c:inetpubwwwrootatm_reporting.aspx:59
ASP.atm_reporting_aspx.Page_Load(Object Src, EventArgs E) in c:inetpubwwwrootatm_reporting.aspx:23
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
You can see my SQL Connection string in there as well. Can someone please help me with this? I can post the code to the entire page as well if that would help. I'm developing this with Dreamweaver MX 2004 (i like dreamweaver MUCH better than visual studio, especially for web design/development). Thanks,
Eric
View 1 Replies
View Related
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
Apr 27, 2006
Hi,
I need help with a problem: When trying to process a analysis services project, I receive the following error message -
OLE DB error: OLE DB or ODBC error: Login failed for user 'NT AUTHORITYLOCAL SERVICE'.; 28000; Cannot open database "DocumentDB" requested by the login. The login failed.; 42000.
I am using the service account for impersonation for the datasource. One suggestion I received from the data-access forum was to grant privileges to the local service for the database. I am not clear about the procedure to do that. Can someone please guide me through this? I am posting this question in this forum since this is a authentication/privilege issue.
- Sanchet
View 6 Replies
View Related
Jul 11, 2006
Hi,
I am stuck with that error when running my ASP.NET application on my production server for many weeks now and still don't have a complete solution to that problem.
I formerly posted that thread and read that other thread without success, so as I have made a few progress in delimiting the problem I am posting this new thread with the hope somebody will finally be able to help me.
To summarize:
1) I have developed an ASP.NET application,
- on a Windows XP Pro SP2 computer
- with VS studio 2005 Dev and included SQL 2005 engine
- this application works fine on the dev computer
2) I have deployed the application on a production server which is:
- a Windows 2000 SP 4 computer
- with SQL Express SP1 with Advance services installed
When I launch the prod application I have this error:
Login failed for user xxxxASPNET
I have found that I can bypass this error by doing the following:
1) manually attach my .mdf database with SQL Server Management Studio Express and specifying the field Attached as with myDatabaseName (in place of the default fullPhysicalPath/myDatabaseName.MDF) then detach it
2) change the auto generated connection string in web.config file from
<add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|myDatabaseName.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
To
<add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|myDatabaseName.mdf;User ID=sa;Password=mySAPassword;database=myDatabaseName" providerName="System.Data.SqlClient"/>
That would have been an acceptable substitution solution but unfortunately my
application also uses the new Login and Webparts features of VS 2005 which implies the automatic creation of an ASPNETDB.MDF database by VS.
As I have no mean (or at least don't know how) of modifying the associated Connection String for that database (it does not appear in web.config) I cannot bypass the problem for it and thus the error still appears when the application try to use this database.
Please I really need help on this matter, I can provide any other useful information as needed (logs, sources ...)
View 4 Replies
View Related
Aug 14, 2006
I work with Microsoft visual studio 2005.
i get data from a table by ADO.NET :
SqlConnection sqlConn = new SqlConnection(strConnectionString);
sqlConn.Open();
.....
it works fine.
but when i open the SQL Server 2005 express edition and connect to the server (inside the same computer) to check something and then get back to the VS and run the code again ,the Open() function fails with the exception :
{"Cannot open user default database. Login failed.
Login failed for user 'DOMAIN\asaf_a'."
disconnecting the server doesn't help and even closing the SQL Server 2005 application doesn't help.
Only restarting the computer enables the Open() command to work again.
Why ?
View 3 Replies
View Related