RidwanA.com

asp.net connecting database in different server PDF Print E-mail
  
Friday, 28 March 2008 18:21
have you ever curius why you always have error of unauthorise user connection when connecting with mssql server in different location when the mssql server using windows authentification method?
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
i just found out today that you need to have the same username that is known by both the server, the web and the database server.
so the error generated because one server doesn't recognise the user name.

the trick is to add user credential in your web.config file under <system.web></system.web>
you just add this sytax:
<identity impersonate="true" userName="domain user name" password="domain user name password" />

and voila you can connect to the mssql server on other machine.
 

Add your comment

Your name:
Your email:
Subject:
Comment:
  The word for verification. Lowercase letters only with no spaces.
Word verification:

Polls

where are you come from?
 

Events Calendar

January 2009
M T W T F S S
29 30 31 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1

Advertisement

Featured Links:
Joomla!
Joomla! The most popular and widely used Open Source CMS Project in the world.
JoomlaCode
JoomlaCode, development and distribution made easy.
Joomla! Extensions
Joomla! Components, Modules, Plugins and Languages by the bucket load.
Joomla! Shop
For all your Joomla! merchandise.
Banner
Copyright © 2009 RidwanA.com. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.

Google Analytics Tracking Module

Proudly Hosted By
web hosting indonesia