473,804 Members | 3,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DirectoryEntry and Remote Server Webs

I am trying to enumerate the webs on a remote server
using the DirectoryEntry provider for VB.NET. Here is my
code:

Try
Dim SelNode As String =
TreeConfig.Sele ctedNode.Text

Dim oSite As New
DirectoryServic es.DirectoryEnt ry("IIS://" & SelNode
& "/W3SVC")
oSite.RefreshCa che()
Dim oEntry As New
DirectoryServic es.DirectoryEnt ry

For Each oEntry In oSite.Children
If oEntry.SchemaCl assName
= "IIsWebServ er" Then
MessageBox.Show (oEntry.Invoke
("Get", "ServerComment" ))
End If
Next
Catch ex As Exception
MessageBox.Show ("Enum Err: " &
ex.Message, "Enumeratio n Error", MessageBoxButto ns.OK,
MessageBoxIcon. Error)
End Try

When I run it on a remote server I get the message "A
security package specific error occurred". When I run it
locally it works fine. Obviously this is a security
issue. I tried setting the oSite objects username and
password, but still no luck.
Nov 20 '05 #1
1 1847
Anyone have any ideas on this. Another strange thing, a
coworker of mine essentially wrote the same code in C#
and it works fine....
-----Original Message-----
I am trying to enumerate the webs on a remote server
using the DirectoryEntry provider for VB.NET. Here is mycode:

Try
Dim SelNode As String =
TreeConfig.Sel ectedNode.Text

Dim oSite As New
DirectoryServi ces.DirectoryEn try("IIS://" & SelNode
& "/W3SVC")
oSite.RefreshCa che()
Dim oEntry As New
DirectoryServi ces.DirectoryEn try

For Each oEntry In oSite.Children
If oEntry.SchemaCl assName
= "IIsWebServ er" Then
MessageBox.Show (oEntry.Invoke
("Get", "ServerComment" ))
End If
Next
Catch ex As Exception
MessageBox.Show ("Enum Err: " &
ex.Message, "Enumeratio n Error", MessageBoxButto ns.OK,
MessageBoxIcon .Error)
End Try

When I run it on a remote server I get the message "A
security package specific error occurred". When I run itlocally it works fine. Obviously this is a security
issue. I tried setting the oSite objects username and
password, but still no luck.
.

Nov 20 '05 #2

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

Similar topics

0
1980
by: jason | last post by:
What is the best way to handle global includes for 3 subwebs that may at various times consume similiar include files such as ENQUIRY FORMS. I ask this question as I now have the oppportunity to control sub webs more tightly on my new host via virtual director and wish to improve the folder structure and code on my various sites. However, I am concerned with the implications for the PHYSICAL and RELATIVE file path options.
7
1747
by: Dave | last post by:
I have two sites: www.site_A.com & www.site_A_news.com Site_A is in d:\webs\site_a & uses an Access DB in d:\webs\site_a\data\db.mdb Site_A_news is in d:\webs\site_a\site_a_news also requires access to that Access Database.
1
3159
by: kenguil | last post by:
I'm hoping that this is the right group to post this to and that someone will have an answer to this. Environment: 1) Laptop joined to domain "foo.com", logged in using cached credentials 2) Test Virtual Server DC/GC is PDC of Domain "bar.local" with Loopback adapter as its NIC (laptop can PING the Test Virtual server via the loopback adapter)
1
1698
by: Chris | last post by:
I am runnig IIS 5.0 on W2k. I am not able to run asp.net pages. Application mappings show all .net extensions and .NET 1.1 is installed. I get the following error:
2
3075
by: a | last post by:
I keep getting this message, "unable to get the project file from the web server" when I try to open a new project that I just copied. I created a virtual director with IIS 5 (VS2002). Trying to setup Rainbow. Suggestions? Thanks, Andy ac411@bellsouth.net
4
9056
by: Dave | last post by:
I recentlymoved my asp and aspx webs to a new server. The asp webs (developed in InterDev) come up fine. But I get the following message when I try to view my donet asp (aspx) webs: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. Is there something special I need to configure to for...
1
1512
by: John Grandy | last post by:
XP Pro SP2 , IIS 6.0 , various virtual webs already created with web-apps running against those virtual webs : I notice that on the IIS > Default Web Site > Properties > Server Extensions tab : it says : "This web is running an old version of the server extensions. To update the
3
1090
by: Michael | last post by:
Sorry for the newbie question, but if I install the .NET 2.0 redistributables on our ASP.NET server--- - will my old apps continue to work? - will I be able to add 2.0 pages to my old apps? M
4
2392
by: musosdev | last post by:
Hi peeps I've just moved my dev system to Win2k3 / VS2005 (from Win2k/VS2k3) and I'm having a problem. I've setup a new website in IIS, enabled .net, fpse, etc. From VS2005, if I choose Open Website, I can type in the location of my server by entering http://10.0.0.253:4040. That works fine, and VS loads the project.
0
9708
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...
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
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...
0
6857
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
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
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
3827
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.