i have created a website which is working perfectly on my local machine. Problem comes when i upload it to my host. i am successfully able to login (i have used .net login control for lgging people in) but when i try to fetch any details which is store in
database i get an error saying: "Login failed for user 'ROSE\crystalimagein_web' at System.Data.SqlClient.SqlInternalConnection". I have never created such user. Is this user created by iis or my host by deafult? my database name is "CrystalImage"
and my website is www.crystalimageindia.com.
I have another website on same host which is facing simmilar error: "Login failed for user 'ROSE\navacaracom_web' at System.Data.SqlClient.SqlInternalConnection". In this case my database name is "Navacara" and website is www.navacara.com
When i contacted my host providers they were saying that something is wrong with my connection string but i have not used this user anywhere in my website.
I have never created such user. Is this user created by iis or my host by deafult?
Yes, this is probably the name of the Application Pool that is used to run your web site.
The error message seems to suggest that somewhere your code tries to access a database with Integrated Security where the request is made in the context of the calling user without explicitly specifying a SQL Server user name or password. Since the connection
string you posted has this turned off, I doubt it's this connection that is causing problems.
Could it be that your code assumes the presence of another connection string? Maybe you're using Membership or other ASP.NET services that rely on the LocalSqlServer connection string? Can you post the code for your web.config file?
There's quite some inconsistency in your connection strings. Are SecurityProjectASPNETConnectionString and SecurityProjectASPNETConnectionString2 used?
If not, I would remove them. First of all, one uses integrated security (which seems to be the problem here) and secondly they target a local server (.). By removing them your config file becomes easier to manage and for now it may tell you which code is
uses a wrong connection string. See www.connectionstrings.com for more examples.
am not able to make out from my stack trace. infact stack trace confuses me as it says that the problem is with the file which i located in the D drive of my loacal machine.
System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'ROSE\crystalimagein_web'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo
serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer
timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open()
at crystalImage.Admin.ExpenseTracker.ExpenseManager.GetExpenseReport(Object sender, EventArgs e)
in D:\CrystalImage\crystalImage\crystalImage\Admin\ExpenseTracker\ExpenseManager.aspx.cs:line 127 ClientConnectionId:f1e67251-6e3d-4af4-a109-b038ed6d86d0
If you deploy the .pdb files to your server (next to the standard .dll assemblies), the stack trace will show the original source location of the exception. So in this case, check out D:\CrystalImage\crystalImage\crystalImage\Admin\ExpenseTracker\ExpenseManager.aspx.cs,
line 127. What does that code do?
su_kolkata
0 Points
5 Posts
Getting a Login Failed error for an unknown user :'(
Jun 30, 2012 07:59 AM|LINK
Hello,
i have created a website which is working perfectly on my local machine. Problem comes when i upload it to my host. i am successfully able to login (i have used .net login control for lgging people in) but when i try to fetch any details which is store in database i get an error saying: "Login failed for user 'ROSE\crystalimagein_web' at System.Data.SqlClient.SqlInternalConnection". I have never created such user. Is this user created by iis or my host by deafult? my database name is "CrystalImage" and my website is www.crystalimageindia.com.
I have another website on same host which is facing simmilar error: "Login failed for user 'ROSE\navacaracom_web' at System.Data.SqlClient.SqlInternalConnection". In this case my database name is "Navacara" and website is www.navacara.com
When i contacted my host providers they were saying that something is wrong with my connection string but i have not used this user anywhere in my website.
My ConnectionString looks like:
connectionString="data source=rose.arvixe.com;Initial Catalog=CrystalImage;user id=CrystalImage;password=**********; Integrated security=false"
My provider doesnt seems to be helping me at all and the ticket raised for same concern is in pending state sinve last 14 days.
Please please please please help me out in this as i have no idea about how to go along with it.







Imar_Spaanja...
Contributor
2784 Points
481 Posts
ASPInsiders
MVP
Re: Getting a Login Failed error for an unknown user :'(
Jun 30, 2012 09:08 AM|LINK
Hi there,
Yes, this is probably the name of the Application Pool that is used to run your web site.
The error message seems to suggest that somewhere your code tries to access a database with Integrated Security where the request is made in the context of the calling user without explicitly specifying a SQL Server user name or password. Since the connection string you posted has this turned off, I doubt it's this connection that is causing problems.
Could it be that your code assumes the presence of another connection string? Maybe you're using Membership or other ASP.NET services that rely on the LocalSqlServer connection string? Can you post the code for your web.config file?
Cheers,
Imar
My Blog - My Company
su_kolkata
0 Points
5 Posts
Re: Getting a Login Failed error for an unknown user :'(
Jun 30, 2012 09:22 AM|LINK
Hi Imar,
1st thanks for replying early.... my web.config file is:
Wainting for your reply....
Imar_Spaanja...
Contributor
2784 Points
481 Posts
ASPInsiders
MVP
Re: Getting a Login Failed error for an unknown user :'(
Jun 30, 2012 11:09 AM|LINK
There's quite some inconsistency in your connection strings. Are SecurityProjectASPNETConnectionString and SecurityProjectASPNETConnectionString2 used?
If not, I would remove them. First of all, one uses integrated security (which seems to be the problem here) and secondly they target a local server (.). By removing them your config file becomes easier to manage and for now it may tell you which code is uses a wrong connection string. See www.connectionstrings.com for more examples.
Cheers,
Imar
My Blog - My Company
su_kolkata
0 Points
5 Posts
Re: Getting a Login Failed error for an unknown user :'(
Jun 30, 2012 11:19 AM|LINK
ji imar,
PFB my web.config file:
<?xml version="1.0" encoding="utf-8"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <appSettings> <add key="StartURL" value="Default.aspx"/> </appSettings> <connectionStrings> <add name="ApplicationServices" connectionString="Data Source=rose.arvixe.com;Initial Catalog=CrystalImage;Integrated Security=false;User ID=CrystalImage;Password=****" /> <add name="CrystalImageConnectionString" connectionString="data source=rose.arvixe.com;Initial Catalog=CrystalImage;user id=CrystalImage;password=****; Integrated security=false" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> </assemblies> </compilation> <authentication mode="Forms"> <forms loginUrl="~/Default.aspx" timeout="2880" slidingExpiration="true" /> </authentication> <membership> <providers> <clear /> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="5" applicationName="/" /> </providers> </membership> <profile> <providers> <clear /> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /> </providers> </profile> <roleManager enabled="true"> <providers> <clear /> <add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" /> <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" /> </providers> </roleManager> <pages> <controls> <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /> </controls> </pages> <customErrors mode="On"/> </system.web> <system.net> <mailSettings> <smtp from="admin@navacara.com"> <network host="mail.navacara.com" password="****" port="25" userName="admin@crystalimageindia.com" /> </smtp> </mailSettings> </system.net> <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> </system.webServer> </configuration>please check for the fault now....
Imar_Spaanja...
Contributor
2784 Points
481 Posts
ASPInsiders
MVP
Re: Getting a Login Failed error for an unknown user :'(
Jun 30, 2012 12:17 PM|LINK
That looks fine to me (you could leave out Integrated security=false" as it's the default but it shoudn't make a difference here).
Could it be your code has other connection strings? Take a look at the Stack Trace for this error message. Does it tell you where it crashes?
Imar
My Blog - My Company
su_kolkata
0 Points
5 Posts
Re: Getting a Login Failed error for an unknown user :'(
Jun 30, 2012 12:27 PM|LINK
hi,
am not able to make out from my stack trace. infact stack trace confuses me as it says that the problem is with the file which i located in the D drive of my loacal machine.
System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'ROSE\crystalimagein_web'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at crystalImage.Admin.ExpenseTracker.ExpenseManager.GetExpenseReport(Object sender, EventArgs e) in D:\CrystalImage\crystalImage\crystalImage\Admin\ExpenseTracker\ExpenseManager.aspx.cs:line 127 ClientConnectionId:f1e67251-6e3d-4af4-a109-b038ed6d86d0
how is that possible. please explain.
Imar_Spaanja...
Contributor
2784 Points
481 Posts
ASPInsiders
MVP
Re: Getting a Login Failed error for an unknown user :'(
Jun 30, 2012 12:35 PM|LINK
If you deploy the .pdb files to your server (next to the standard .dll assemblies), the stack trace will show the original source location of the exception. So in this case, check out D:\CrystalImage\crystalImage\crystalImage\Admin\ExpenseTracker\ExpenseManager.aspx.cs, line 127. What does that code do?
Imar
My Blog - My Company