473,698 Members | 2,242 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert Domain to adspath

I have the following code:
--------------------
sdomain = "mydomain"
oDomain.Path = "LDAP://" & sDomain
------------------------------
odomain : DirectoryEntry

I want to get the adspath from the domain
ldap://cn=mydomain,cn= mytopdomain,cn= com

In the past I used this asp code
Set oDomain = GetObject("LDAP ://" & sdomain)
sBase = "<" & oDomain.ADsPath & ">"

How do I get the adspath now in dotnet?
Nov 20 '05 #1
0 1865

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1223
by: R Chown | last post by:
Using vbscript I can get the domain of a server by binging to the WinNT provider and then getting the ADsPath Set comp = GetObject("WinNT://MyComputer" sComputerAndDomain = comp.ADsPat How do I do the same using c# and the .net framework Thank Richard Chown
2
2176
by: OZ | last post by:
Hi, I am new C++ and need a little help with a public domain program that is suppose to perform a byte swap. I am receiving the following error messages during the compile process with Microsoft C++ 2003. Here are the error messages and source code: (97) : error C2664: 'fgetpos' : cannot convert parameter 2 from 'void
7
7109
by: whatluo | last post by:
Hi, all I'm now working on a program which will convert dec number to hex and oct and bin respectively, I've checked the clc but with no luck, so can anybody give me a hit how to make this done without strtol or s/printf function. Thanks, whatluo.
2
2266
by: Joebloggs | last post by:
Hi I am trying to do an ldap lookup. I can pick up the domain name in the standard format DOMAIN\USERNAME. The problem is the company I work for expects the query in the format DOMAIN:USERNAME. I tried to do a simple string replace to replace \ to : but it turns out the only string you can't replace in c# is \ as it gives the error "Invalid Escape Sequence" - using "\\" or @"\" doesnt work either
1
2302
by: Mark Hollander | last post by:
Hi All, Could you please help me convert this code so that it will run in VB.NET Thank You Mark Hollander Private Type USER_INFO Name As String
3
3154
by: shapper | last post by:
Hello, Could someone tell me how to convert a XML file into another XML file using a XSL file with a parameter? I created the code to do it, and it seems ok, but it is not working. Could somebody, please, help me out? I am on this for days. My code is as follows:
5
1445
by: pointzero | last post by:
Can someone help me to convert the following perl code into php? Leave the Net::DNS, Net::DNS::Resolver, search functions as is. I can replace them with PEAR Net_DNS module. use Net::DNS; sub ablookup { my ($domain) = @_; my ($res, $query, @r); $res = new Net::DNS::Resolver; while(1) {
6
1484
by: Ty | last post by:
Here is another block that I can not get to convert. This is a class module. public bool IsAuthenticated(string domain, string username, string pwd) { string domainAndUsername = domain + @"\" + username; DirectoryEntry entry = new DirectoryEntry( _path, domainAndUsername, pwd); try
1
1275
by: Mushq | last post by:
Hi, I want to convert following VB6 code to C#, can some one help me regarding that. // Code starts here strComputer = "atl-ws-01" Set objGroup = GetObject("WinNT://" & strComputer & "/ Administrators")
0
8676
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8898
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.