Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi friends
after I upload my website ,create database;set user id,password for it in dotnetpanel
I got this error,and I want to say that I can connect with may database via sql server management studio.

Server Error in '/' Application.
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

Stack Trace:
VB
[SqlException (0x80131904): Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5064474
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +183
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
   System.Data.SqlClient.SqlConnection.Open() +125
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +123
   System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +166
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +115
   DalBll.dtsCtnTableAdapters.uspCnt_ShowTableAdapter.GetData() in D:\Hoby\Projects\DalBll\dtsCtn.Designer.cs:1973
   Eidepardazan_Default.Page_Load(Object sender, EventArgs e) +79
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207




please tell me what can I do.
good luck;
Posted
Comments
Sergey Alexandrovich Kryukov 20-Dec-11 2:14am    
Is it HTTPS or not?
--SA

This is probably to do with how you connect to SQL server. When you were running in development, you probably connected using Windows Authentication, rather than a specific user and password, and this works fine.
Now, you are running on a remote, production SQL server instance, and it looks at your Windows log in and sees that it is not on it's domain, and indeed is from the internet and thus in an untrusted zone. So it rejects it, with the above error message.

Check your connection using SQL Server Management Studio: establish the connection, then duplicate it in the Server Explorer pane of VS. When you have a VS connection to the remote server working, highlight the database name in the Server Explorer pane, and look at the Properties pane. The connection string should be the first item. Use that in your production code instead of the development string and your problems should go away.

There is a Tip on how to maintain separate config information for production and release here: Supporting Development and Release web.config in ASP.NET[^]
 
Share this answer
 
thanks a lot my friends for your answers,the problem was about connection string.
my website include a class library project,so I had to set app.config in addition web.config.and that error indicated to the windows authentication because I did not change "Integrated security=true" to "Integrated security=false".you know that if you set user id and password in connection string ,you should set "Integrated security".

The best wishes
 
Share this answer
 
In your connection string you have IntegratedSecurity=True;
Just change this with your credentials
user id=YOURUSERID;password=YOURPASSWORD;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900