Remote User Login Error
Oct 31, 2007Hello guys and girls! I need help for this error. Could anyone be so kind to enlighten me on this? Thanks!
When i attempted to login to my local page, this occurred:
Hello guys and girls! I need help for this error. Could anyone be so kind to enlighten me on this? Thanks!
When i attempted to login to my local page, this occurred:
Hi
i connect to remote Integration Service. i configure server for remote connection( on component services and DCOM config , ... ) .and now i can connect to Integration Service remotely and correctly.
but when i expand Stored Package and then click to expand MSDB this error will hapen:
login failed for user ... .(microsoft sql native client )
please help me
thanks in advance
I am trying to add a linked server from a AMD x64 server (Windows 2003) with SQL Server 2005 64 bit to a Server running SQL 2000. These are not in the same domain.
I can create a linked server using the option "Be made using the login's current security context" but can not when trying to specify the security context, i.e. sa and the sa password. When I try I get the following message:
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'sa' mapped to local user '(null)' from the remote server 'DTS_FSERVER'.
I have several other x64 server that I have no problem creating a linked server and specifying sa and the sa password.
The problem with using "the login's current security context" option is that I get an error when trying to run any Jobs against the linked server. The job fails withe the following error:
Executed as user: NT AUTHORITYSYSTEM. Access to the remote server is denied because no login-mapping exists. [SQLSTATE 42000] (Error 7416). The step failed.
I'm sure the two errors are related. Any ideas what is going on?
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
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 ?
Hi,
I have an ASP.Net web application running in groupnamewebservername. I am trying to connect it to the remote database server groupnamedatabaseservername using the ASPNET user id. The remote database is SQL Server 2005 and the web server has IIS 6.0 installed. My web.config connection entry has username as "groupnamewebservernameaspnet" and I have a database user in remote database server under the login name groupnamewebservername$. When I try to connect, I keep getting the following error:
System.Data.SqlClient.SqlException: Login failed for user 'groupnamewebservernameaspnet'.
Could you please let me know what I am doing wrong here? Thanks.
Regards,
Gayathri.
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 DepartmentIntranetSendItNowApp_CodeDalResourceDB.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 DepartmentIntranetSendItNowApp_CodeDalResourceDB.vb:43
Resource.SaveResource(String filename, String fromContactEmail, String toContactEmail, String message) in H:MIS DepartmentIntranetSendItNowApp_CodeBllResource.vb:31
ContentFiles_Default.ImageButton1_Click1(Object sender, ImageClickEventArgs e) in H:MIS DepartmentIntranetSendItNowContentFilesDefault.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
I received the above error yesterday and haven't been able to trace it to any job or process running. We haven't implemented any changes to the server in the past few months, and it doesn't look to be a user-established connection, since the Client IP Address of the SSPI handshake error is from the server itself.
I logged this set of messages in SQL AgentServer error log:
Date 10.03.2008 6:15:19 PM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)
Message
[298] SQLServer Error: 18452, Login failed for user ''. The user is not associated with a trusted SQL Server connection. [SQLSTATE 28000]
Date 10.03.2008 6:15:19 PM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)
Message
[382] Logon to server '<server>' failed (ConnAttemptCachableOp)
Date 10.03.2008 6:15:19 PM
Log SQL Server (Current - 11.03.2008 2:32:00 PM)
Source Logon
Message
Error: 17806, Severity: 20, State: 2.
Date 10.03.2008 6:15:19 PM
Log SQL Server (Current - 11.03.2008 2:32:00 PM)
Source Logon
Message
SSPI handshake failed with error code 0x80090304 while establishing a connection with integrated security; the connection has been closed. [CLIENT: <IP Address>]
Date 10.03.2008 6:15:19 PM
Log SQL Server (Current - 11.03.2008 2:32:00 PM)
Source Logon
Message
Error: 18452, Severity: 14, State: 1.
Any help in explaining this would be greatly appreciated.
trying to connect to sql server 2005 over the internet. (its a third paty hosting company i'm using)
so i have to connect via tcp/ip using sql server authentication.
my laptop is running vista.
the version of sql server 2005 on my laptopis developer edition with service pack 2.
it worked fine from windows xp and the connection details are valid as it runa fine from .net on the hosting website.
i have added sql serer managemnt studio to the exceptions list in the firewall.
ihave made sure tcpip is enabled in the sql server connection management console.
i have also enabled it in the cliconfg tool
firewall on/off seems to make no difference.
its almost enough to make you turn to oracle and thats saying something considering how long i've been in the microsoft camp...
the error returned is:
Login failed for user 'SQL2005_152092_garethbowen'. (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
------------------------------
Server Name: 'xxxx',1433
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
I have 2 xp machines one has the SQL EXPRESS Server with all the goodies on it and the other I just install the client stuff. I am using VB 6 to program with using the ADO. It works great on the server machine. The software pulls up great. I can't seem to get it to work on the client machine. I get "Login failed for user 'TIGGERLGuest'. I found the places to set the TCPIP setings on the server SQL Express to allow this even turned on the browser but nothing same error. I am using the same login on both machines and am pointed to the same workgroup. I used window authentication when I set them up. Not sure why it insists on using Guest.
This is a copy of the connection string I am using
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;AttachDBFileName="c:mpsdbmpswarehouse.mdf;Database=MPSDB;Data Source=tiggerlsqlexpress;Trusted_Connection=yes;"
Not sure if this is okay for connecting remote. Any help would be greatly appreciated
Rick
I'm using a legacy application built using VB5 and SQL Server 7. After recompiling it, and putting the database in SQL Server 2012. I want to access the current login user using the SQL function SUSER_SNAME().
This is the code.
Set rdoRes = goDatabase.Connection.OpenResultset("select suser_sname()")
But I'm unable to get the current user login in the application. If I write any other SQL statement instead of this, then it runs. But only this statement is not running. Is there any security reasons for this?
Login Failed for user , the user is not associated with a trusted sql server connection. (microsoft SQL Server,Error:18452)
hi ,
i am getting the above error message once in a while maybe two or 3 times a week , and then it goes away in 10 to 15 minutes or 5 minutes ,
our mode is set to mixed and we are able to connect and use both sql and windows , but once in a while , it will give us the above message when we try connecting throught sql server management studio client (using sql 05) using windows login , although it lets us connect using sql login while the windows login is denied, and after a while it lets us connect with both.
occurs randomly on some days , we run our servers on VM ware virtual machines using windows 2003 r2 enterprise 64 bit with sp2 with esx 301 virtual machine.
would appericate any feedback on this thanks
Hi
Last week I was receiving an error when trying to connect to two of our seven sql servers from my laptop via my domain admin account. The only fix was to have my laptop rebuilt and everything re-installed.
Today however another administrator is starting to have the same problem but to only one of the seven servers!
When that administrator uses my laptop with her domain admin account it works!?
What could possibly be going wrong with our laptops? We have not installed or changed anything.
The full error message we see:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsoft Sql Server, Error: 18452)
The error being logged on the server: (two errors are logged each time)
SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 53.35.165.148]
Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: 53.35.165.148]
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 RelatedCan anyone give a quick description of the meaning of this message andwhat needs to be done to get a connection.I'm running DBArtisan with SQLServer 2000 client SP4 installed.I also get the same message with MS Enterprise Manager so this iscoming out of the actual ODBC connection attempt.Thanks in advance!
View 1 Replies View RelatedI 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'.
I am trying to use a linked server and it works as long as I do not specify the sp_addlinkedserver @provstr parameter. If I specify that parameter I always get a 7416 "Access to the remote server is denied because no login-mapping exists" error. I have tried adding the logins various ways but it's very specific to the @provstr parameter, and it doesn't even matter what I put in that parameter. As soon as I put something in there whether it is valid or invalid, I get the error.
Anyone else seen this? There is an amazing lack of any discussion about the error when I search for it.
If I do this it works fine,
EXEC sp_addlinkedserver @server= 'linkedname', @srvproduct='', @provider='SQLNCLI', @datasrc='servername', @catalog='mydatabase'
EXEC sp_addlinkedsrvlogin 'linkedname', 'true', 'AppUser'
But as soon as I add the @provstr parameter, then I get the error if I try to use linkedserver,
EXEC sp_addlinkedserver @server= 'linkedname', @srvproduct='', @provider='SQLNCLI', @datasrc='servername', @catalog='mydatabase', @provstr='Failover Partner=otherservername'
EXEC sp_addlinkedsrvlogin @rmtsrvname='linkedname', @useself='true', @locallogin='AppUser'
It doesn't even make any difference what I put in the @provstr parameter - the sp_addlinkedserver statement always executes without an error, but running a query that uses the linked server generates the error.
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...
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)
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 RelatedI 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.
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
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.
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
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.
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
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,
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
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?
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
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 ...)
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 ?
Hello.
I get this error when I try to connect to my SQL Server with JDBC:
Excepcion en MyPool Pool.getNewConnection() [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot open database "lituania" requested by the login. The login failed.
And in the ERRORLOG I get:
2002-02-22 19:59:46.62 Logon Error: 18456, Severity: 14, State: 16.
2002-02-22 19:59:46.62 Logon Login failed for user 'frontend'. [CLIENT: 10.0.0.75]
I found it is supossed to be a password mismatch:
http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx
but I checked the password is correct.
Any ideas? Thank you in advance.