Obtaining Server Name once connected via C# .Net 1.1 or .Net 2

Obtaining Server Name once connected via C# .Net 1.1 or .Net 2

Post by bWlraWU3Ym » Fri, 03 Aug 2007 04:32:04

Hi all

Is it possible to obtain the server name which is holding the active
directory you have connected to using C# .Net 1.1 or .Net 2. The reason being
is that we have multiple active directory servers which are load balanced and
we would really like to know which server we have actually been routed to via
the load balancer once we have connected.

I hope i've explained that clearly enough but if extra detail would be
helpful i'll post more info should it be required

1. Can connect to SQL 2005 via VPN with .NET 1.1, but cannot with .NET 2.0

2. Problem connecting to the database after upgrading from .Net 1.1 to .Net 3.0??

I am trying to upgrade a large asp.net application from .Net 1.1 to
.Net 3.0

I'm getting an error when connecting to the database now that the app
runs as a .Net 3.0 application.

the database connection code is part of Microsoft's ApplicationBlocks,
the Data Access Block. The project is using the SQLHelper class from MS.

The connection fails the SqlConnection call to Open()
Looking at the SQL Server 2005 logs it thinks the "Login failed" with
an Error 18456, Severity 14, State 5 which I think means some sort of
wrong password.

The exact code works in .Net 1.1
The error happens after upgrading .Net 3.0
If I change the <trust level= in the web.config from Medium to Full
the .Net 3.0 call to SqlConnection.Open() works just fine.

This application needs to run under Medium trust.

anyone have any ideas what I need to change to get this to work under
Medium trust? Other settings I need to make in the web.config maybe?
Do I need to upgrade to a newer version of Microsoft's Enterprise


3. .NET Framework 1.1 and .NET Framework 1.1 Hotfix (KB886903)?

4. strong name validation failed: compiled in VS 2005 (.NET 2.0) but running under .NET 1.1

5. Any information on DW.Net in Visiual Studio.Net 2003 and .Net Runtime Frame Work 1.1

6. Interfacing .Net Framework 1.1 and .Net Framework 2.0 beta using .Net Remoting.

7. [Dot.Net 1.1][Broacast & Muticast ] via UDP only or possible via TCP-IP ?

8. C# - C#.NET - Visual C#.net

9. .NET client cannot connect to server after installing Framework 1.1 on it

10. Problems with USER AGENT header with side by side .NET 1.0 and .NET 1.1

11. had .NET 1 and installed .NET 1.1 on the IIS machine

12. .NET 1.1 Virtual Directory in a .NET 2.0 Website

13. .NET 1.1 apps stop working when .NET 2.0 starts working etc

14. how to force .NET Interop COM objects to use 1.1 .NET framework

15. ADO.NET's WriteXML have difference behaviour between .NET 1.1 and .NET 2.0