.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Authenticate from a windows app to sql on a non-trusted domain?

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :Sql Server


We have a client application that will run in Domain1 (user logs in as Domain1\User1) and they need to connect to SQL as Domain2/User2.   Domain 1 and 2 don't have a trust relatonship.

Is there a way to pass through the domain2/user2 credentials from the client app to the sql server so sql server will authenticate correctly?



View Complete Post

More Related Resource Links

Which Domain Controller is SQL Server using for trusted windows authentication?


We are migrating from Windows Server 2003 domain controllers to Server 2008 Domain controllers.  I want to be able to know which domain controller a SQL server is using for authentication, so I can verify that the 2008 Domain Controllers are working, before we take down the 2003 domain controllers permanently.

I also read something about possibly setting a preferred DC?

Please advise



How to authenticate local user usin ldap or non domain authentication



I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...

windows authentication issue with different domain

Webservice(frame work 2.0 & VB.NET) connecting to SQL Server 2008 in Windows Authentication mode and WS configured on App pool with domain\user id credentials and granted full access to temp folder still getting the following error. System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS2001: Source file 'C:\WINDOWS\TEMP\ixymjcwh.0.cs' could not be found error CS2008: No inputs specified at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence) at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.H

People Picker gets error when selecting user from a trusted domain(one way forest trust)

  Hello all,   Our current setup is SharePoint 2010 Foundation server in one external forest(Trusting forest), and trying to have users in a separate internal forest(Trusted forest) access the site. The external forest's DC and SharePoint server are in a DMZ separated by a firewall with the internal forest's DC and users. A one way transitive forest trust was successfully created and has been validated. On SharePoint, we're ran the sts commands to set the setapppassword as well as the peoplepicker-searchadforests adding the domain that the SharePoint server is in, as well as the trusted forest. An iisreset was issued after running these commands. In SharePoint, we can then search for users from the trusted domain, and select the users in the Select People page, but when hitting the final Ok, an error is received: An unexpected error has occurred in which a correlation ID is provided. Reviewing the SharePoint logs we find the following: <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520081665 -1073717157 41 0 66047 0;} /* Style Defin

Oulook.exe hangs when Domain User launches application through Interop windows 2003 sp2

Hello,I have a problem using Interop.Outlook on a win2k3 sp2 server. For windows 2003 version prior to sp1 i could use a specific identity for application pool and i had no problems launching outlook.User was authenticated and delegated correclty. With sp2 the Outlook.exe process is launched by the domain user specified as identity (also visible on Task Manager Processes) but no exception or time out is ever thrown.  The only way that i can make this to work is when i set impersonate=true in web config (without setting userName and password as this would have exactly the same affect with the application pool identity).Are there any permissions that i can set to overcome this?Help would be greatly appreciated. Normal 0 false false false EL X-NONE X-NONE Appreciate

SOS: Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But networ

Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But network connection is successful.   But SQL Server Logins contain   BUILTIN \ Administrators, and                                                    BUILTIN \  Administrators contain DOMAIN \ Domain Admins, and                                                    DOMAIN \ Domain Admins contain DOMAIN \ myname.   Creating SQL Server Login with DOMAIN \ myname entail successful local connection.   Removing SQL Server Login with DOMAIN \ myname and creating SQL Server Login with DOMAIN \ Domain Admins do NOT entail successful connection. Cannot connect! System:   Windows Server 2008. Error 18456

Alerts are not relayed to trusted Domain


Dear Experts

I have sharepoint hosted in our office. our branch have trust and some users have access on Sharepoint the domains are in trust. when we set the alerts from our internal domain we get the emails for the CREATE / UPDATE

but my branch office does not get the ALERTS in email

We get following


The user or users have been added successfully, but there was an error in sending the e-mail message. The server may not be set up correctly to send e-mail. To verify that e-mail is configured correctly, contact your server administrator.


Correlation ID: 1c0a1510-7366-4f03-aa14-d9496f1a744d

Date and Time: 21/09/2010 13:10:55

Can you suggest a solution for same


Moving SharePoint Database to non trusted domain SQL server



We have SharePoint and SQL server in a extranet domain. We would like move the SQL server databases for SharePoint to our corporate SQL server (on the corporate domain). 

The Corporate domain does not trust the extranet domain, and thus the web farm account cannnot be specified on the corportare SQL instance. If it possible to migrate the databases to a non tusted domain?

I've seen the script to create a new Config database using SQL authentication

psconfig -cmd configdb -create -server <SQL server name> -database <database name> -dbuser <SQL account> -dbpassword <SQL password> -user <AD user account> -password <AD user password>

Can I edit the config of SharePoint to point to the new SQL server, or do I need to create the entire sharepoint enviromnent again and attach the content databases?

I also have a SSP database that's heavily customised for searcvhing and the BDC. Will this need recreating again or can I move the BDC database  to the new server and attach?


Not able to add all users from other trusted Domain to site collection


The environment consists of a one-way trust relationship, I have no problems adding users from the local domain, however I can only add a few select users from the domain that the trust is setup for. This appears to be the case for only one site collection, as a previous site collection can authenticate to and add users from this other trusted domain. 

I have checked the following article in order to authenticate objects in the other trusted domain, but it appears to have not helped.


What steps should I verify so that I can add users to given stie collections?

Adding a second domain to windows authentication based web site


Hi All

I have an interweb web application that uses Active Directory to authenticate the user.
Im now getting some complaints that users on other domains are unable to access the application.

How can i make it work so that their domain name is also accepted by the application?

After applying SP2 to WSS 3.0 environment, can not add users from a trusted domain


We have a WSS 3.0 environment on our DMZ We have a one way trust between our internal domain TT and external domain clients. So we were always able to add internal domain users to our SharePoint sites using TT\loginName

Yesteday we applied SP2 for WSS3 and this functionality stopped working. When we try to add any new TT users to the site collection, I get an error "No Exact Match was found." But the current TT users are able to get in to the site and work fine.

I searched on internet and found that I need to run stsadm coomands for the peoplepicker to work with trusted domains.

So we rebuilt the trust between domains. Then I ran following commands on the SharePoint frontend server:

stsadm.exe -o setapppassword –password somekey

stsadm.exe –o setproperty –pn peoplepicker-searchadforests –pv domain:tt.local,ADUser,passwordforADuser




SQL Server 2008 R2 Reporting Services - Can't Authenticate with local windows account


No matter What I do, I can't seem to authenticate to SSRS using a local windows account unless that account is a member of administrators. Is there some sort of special role that local users need to be a member of to authenticate properly?

When I attempt to access reporting services, am prompted with a login window asking for login as password. If is use a local admin account it works fine, if I use a local user account, it prompts me again two times and then just shows a blank page. 


  • I've tried adding the local non-admin user account to all of the SQLServer groups but no luck.
  • I've tried deleting and creating a new local user account with the same group membership as above, but no luck.
  • To find windows domain name and username in sql server


    Hi experts,

     Any one pls tel  me the query to find the current working domain name with username in sql server.



Sql 2008 on Windows 2008 domain error: windows nt user or group not found

I am running sql 2008 R2 and win 2008 R2 and simply trying to add a new domain user into sql, but I get the error above. What's weird is that when I do a check names from the add user or group window it finds the account I want to use. I've tried adding a different account, but I get the same issue--so its not the account. I've also tried running the create login t-sql command but it gives the same error. I've also tried disabling, via the gpedit.msc tool, the digitally encrypt or sign secure channel keys. But that did not work either.

How Do I authenticate users from different domain of IIS?


I have the IIS webserver on Domain A.  I have many users on Domain B, C, D, E. 

I've set the NTFS security permission for each user and his/her domain to the webserver's security ntfs permission folder.  But it is still not authenticating.  So what do  I need to do to enable this feature?  I am using windows 2003 webserver.


how to authenticate windows user login in my windows application?


i am using .net 3.5 and c#.

i need to implement a login screen on my windows application (not asp.net). the user can be any windows user on the network. i don't need to get password from the domain/system but just need to verify true or false.

please let me know where i should start and what to look into.



1 + 1 = 3

Windows Authentication - Different Domain



I am trying to figure out if there is a way to connect via SQL Server Management Studio to a server sitting on a separate domain. So here is the situation. there is Server B which sits in a domain called DomainB. If I am in DomainA, I could typically remote into that server utilizing an IP address in DomainB, and even transfer files to that server. But how do I connect via SQL Server Management Studio(basically login as a different domain user) to Server B in DomainB from DomainA. Basically when I choose Windows Authentication from the dropdown list in SQL Server Management Studio, it grays out the username field, which is where I could type something like this domainB\usernameondomainB, similar to how you would connect to a share on that server. Please let me know if there is a possibly solution to this. Also, our customer doesnot allow SQL Server Auth/Logins, so that is not an option. Thanks.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend