Please help me to find the solution for following problem.
I have my web server (with .NET 2.0 Framework) in one Domain(DMS01) where i have deployed my application (developed in ASP.NET 2.0). I have to access the database (SQL Server 2000) that belongs to another Domain(DMS02). How could i connect to the database that belongs to domain DMS02 from Web Application belonging to domain DMS01.
Thanks in advanced for help.
To start with, you need to check on how you connect to the database. If you are on different domains then it will be hard for you to use integrated security, unless you use impersonation. So easiest thing is to go for sql authentication. This means that you need to define a user in DMS02 SQL server that has access to the database/tables that you need. Then make sure this SQL server accepts remote connections. You will also need the ip address of this SQL server.
You can test your connection in SQL Management Studio Express, where you can connect to the DMS02 SQL server with the specified credentials. Once it work, you should put this information in your connection string. Good luck!
Let your DB server expose to the other doamin (DMS01) [So from your database server can access to either DMS01 or DMS02 domain]
Now, go to your application web.config file and make sure you typed the correct UserID with the right domain
Example: UserID = DMS02\MyUser
Good luck
|||
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
i am getting this error when i use following connection string(My database server is SQL Server 2000)
<add name="MyConnectionString"
connectionString="Data Source=DMS02\MSSQLSERVER;Initial Catalog=DatabseName;user id='sa';password='sa123'"
providerName="System.Data.SqlClient"/>
|||
bikashdangol:
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
i am getting this error when i use following connection string(My database server is SQL Server 2000)
<add name="MyConnectionString"
connectionString="Data Source=DMS02\MSSQLSERVER;Initial Catalog=DatabseName;user id='sa';password='sa123'"
providerName="System.Data.SqlClient"/>
Check out this link:http://www.aquesthosting.com/HowTo/Sql2005/SQLError26.aspx
Good luck.
|||Hi bikashdangol,
According to the error message you are getting now, It seems when you connecting to the data server, sql server client cannot locate the server machine. Can you verify if you can access machines in DMS02 from your domain?( these two domains need to build a trusted relationship before you can access machines accross domains). Another possibility is the sql server service is truned off OR allow remote connection is disabled. You can contact the server DBA for clarification.
Hope my suggestion helps
No comments:
Post a Comment