.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

Domain shifting!

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application

Here is the scenario.

I have 2 domains - DOMAIN1 and DOMAIN 2, whose usernames are : USERNAME1, USERNAME2.

My webservice is on DOMAIN2 and since DOMAIN1 and DOMAIN2 dont share a trust relationship, I am unable to access the webservice.

What I want to do is, set aside the DOMAIN1 credentials, utilize the DOMAIN2 credentials from the user, and connect to the webservice while still at DOMAIN1's computer.

Is that possible?

I know when using an IIS, i get users window credentials on a domain, give him access, then when acessing the database server, I revoke the current credentials and use the app pool credentials for authentication - is something like this possible when dealing with cross domains?

I get this general idea of being possible, because even if I am on DOMAIN1, I can utilize a remote desktop connection and connect to a computer on DOMAIN2.

I dont understand the domains concept much, but can someone help me with the above problem?


View Complete Post

More Related Resource Links

AutoGenerateSelectButton="False" ignored when using Domain Service


Crosspost from RIA Services forum: http://forums.silverlight.net/forums/t/196466.aspx

I'm creating a Dynamic Data application in VS2010 and have recently switched to using a Domain Service to give greater control over the data presented to the client. I've noticed that the AutoGenerate<Action>Button attributes on my GridView are being ignored. The presence of the Edit and Delete buttons appear to be contingent on the existence of Update and Delete methods on the partial classes autogenerated in the Domain Service, but i'm not seeing how to control the generation of the Select button. Is there a way to control this from within the Domain Service class?

Dynamic Data, Domain datasource, Poco and lookups


Mr. Edward,

Excuse my question but: it is necessary to involve in our projects something more than just Dynamic Data or should we make use of all other features available in VS2010 (which will make assume taht they had been left out of the Dynamic Data framework) like: wef, poco, azure, wcf, cloud, mvc, silverllight, ajax, odata, agile, workflow, etc.?

Sorry my ignorance, I'm just transcribing names as they come to my mind and of which I don't know anything about


Carlos Porras (El Salvador)

Pass ASP.NET membership identity object across domain?


I am trying to figure a way to SSO with ASP.NET membership and role model.

I can implement custom membership provider which consume web services hosting on a server.

With encryption of data. No problem.

But my question is, If I sign on a website with my provider, got my identity object on that application,

could I pass it to another website on another domain which use the same provider and by doing so, do not need to login again?

If this is possible, I am going to implement this solution. Please tell me what's your take on this.

How do I preserve __viewstate between cross domain posts or how do I get a __viewstate of a Remote S


Here is what I want to do:
I have a local site in which I want to display data from a remote site
Lets say: I want to display data of http://www.abc.com/Default.aspx on my localhost

Now Default.aspx requires some post-data which it sends to itself. Thus the __viewstate and __eventvalidation are posted back to it by itself. I want to directly post the data to Default.aspx from localhost without opening Default.aspx and display the Default.aspx's response on my localhost.

The WebApp on http://www.abc.com is configured for __eventvalidation i.e. I cannot post-data to it from my localhost without getting a __viewstate from it. I also have to post the current __viewstate of http://www.abc.com/Default.aspx to itself

How can I accomplish it?

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...

Patterns in Practice: Internal Domain Specific Languages


Jeremy Miller explains how internal Domain Specific Languages can help you craft code that is easier to read and write. His bag of tricks to improve your programming includes extension methods, fluent interfaces, object extensions and use of the semantic model.

Jeremy Miller

MSDN Magazine January 2010

Domain Models: Employing the Domain Model Pattern


In this article, we'll go through the reasons to (and not to) employ the domain model pattern, the benefits it brings, as well as provide some practical tips on keeping the overall solution as simple as possible.

Udi Dahan

MSDN Magazine August 2009

Best Practice: An Introduction To Domain-Driven Design


We give you a gentle introduction to designing and evolving rich domain models as part of integrating Domain-Driven Design (DDD) into your coding efforts.

David Laribee

MSDN Magazine February 2009

ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript

The article ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript was added by Aamir Hasan on Thursday, August 19, 2010.

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn't allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull content

WSS 3.0 using new domain



I have currently a WSS 3.0 server  (internal DB/Single Farm) running for our intranet and I use http://intranet/ to access it. Everything works fine, authentication, permissions etc.


However, I've forwarded our external domain http://beta.somedomain.com/ to IP address of our Intranet. The intranet loads fine but its just that sometimes the authentication box would pop up asking me to authenticate, sometimes it is successful and sometimes its not, even when using correct credentials.

I am assuming it has something to do with new domain and the way it tries to authenticate with AD as it uses beta.somedomain.com\username instead of ActiveDirectoryName\username


So whats the best way to add an external domain to work without any problems? I have set up "Alternate Access Mapping" and my configuration is such:

Internal URL                                      Zone                               

Moving SharePoint 2007 from Domain to a Workgroup


For development purposes, we have SharePoint 2007 installed on a virtual server (Wind 2003) on a company desktop (Vista Business ed.).  The SharePoint is using Active Directory and company domain. For learning purposes, we want to copy the virtual machine on another Vista machine that is outside the domain and is not using AD:

Question 1 : How can we move the SharePoint from a domain to a Workgroup
Question 2: Is it possible to still be able to use emails (through local installation of Outlook) on the same computer that is not on the domain? If, yes, what are the possibilities (any articles on it? Etc.)?


Domain & Active Directory


Scenario 1:

Site user visits http://intranet/ , authenticates using intranet\username as username using proper password. Everything works fine.

Scenario 2:

Site user visits http://somedomain.com (that is forwarded to IP address of "intranet") , sharepoint opens, authenticates sometimes but sometimes it wont. Even if it authenticates user , some actions (edit an item) pops up authentication dialog box and fails to authenticate further even with correct credentials.


Do I need to add somedomain.com to Domain Controller of "Intranet"?  It is running 2k3 windows, IIS, Domain controller, sharepoint WSS 3.0 server (Internal).



Please advice,


Create COM object from ProgID in a separate domain

Hi, How should I create COM object from ProgID in a separate app. domain? After I created corresponding Type object by means of Type.GetTypeFromProgID, I cannot use neither Activator.CreateInstance nor <MySeparateAppDomain>.CreateInstance because both require assembly name as one of the arguments... but as I said before I have no RCW assembly - just a ProgID. Those Activator.CreateInstance overloads which have argument of AppDomain type do not accept argument of Type type, only argument "assembly name" (of String type). And neither of <MySeparateAppDomain>.CreateInstance overloads accept argument of Type type (all require assembly name and type name). Any ideas?!

How to set Host's Domain Manager in a created AppDomain

I am not sure if this is possible but I would want something similar to loading the Host's domain manager to my new AppDomain. There is no Domain Manager for a newly created AppDomain. Owing to this many of my subsequent call fails. For example if I make a call to "Assembly.GetEntryAssembly" it returns null in the new AppDomain. To workaround this I will have to call "AppDomain.ExecuteAssembly("entryassembly")" in my created AppDomain. I actually do not have a need to do this in my application. Similarly there are other calls such as "ScriptEngine.GetSearchPaths". This again does not return the expected search paths in my new AppDomain. Again if I perform "AppDomain.ExecuteAssembly("entryassembly")" then the expected search path is returned. So in short a domain manager is created in my new AppDomain only when i execute the entry assembly in my new AppDomain; which internally provides me a domain manager similar to the Host's domain Manager (as i execute the same entry assembly). Is there a way to load the Host's domain manager without executing any assembly in my new AppDomain. I am using VS 2008, .Net Framework 2.0.

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

Error in Impersonation - different domain account.

Hi I am trying to stop a windows service in a server(on different domain) from my C#.NET windows application using ServiceController I am getting following error Inner Exception: {"Access is denied"} Exception Message: "Cannot open Service Control Manager on computer 'x.y.z.a'. This operation might require other privileges." Enviroment:       Windows application running on Windows 7, C#.NET, 3.5 on “ABC” DOMAIN       Target service running on Windows 2003 server. on “XYZ” DOMAIN       Port 445,135 opened between two systems Code:       ServiceController lo_WinSC = new ServiceController();       lo_WinSC.MachineName = "SYSTEMIPAddress";       lo_WinSC.ServiceName = "ServiceToBeStopped"; Some forum suggesting to impersonate account of target domain but failed to Impersonate. Error: “The security database on the server does not have a computer account for this workstation trust relationship”   Question 1: Is it possibile to impersonate account of different domain. i.e My application running on “XYZ” domain, I would like to impersonate an account “ABC” domain. Note: Port LDAP port 389 is opened between two systems. Is possb

Can I backup to a UNC destination not part of domain using Proxies?

Hi, I am trying to backup my databases to a UNC destination that is not part of domain (stand alone machine) Can I use proxy accounts, so the database backup engine uses the UNC path using a stand alone machine’s account? If not, how can I handle this situation? Thank you, Max
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