.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 13th, 2004, 01:02 PM
Robkemp76 Robkemp76 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 Robkemp76 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
IIS interaction from a VB.Net (not ASP.net) application

I'm am looking for any one who can help me figure out how to interact with IIS from a VB.NET application. I keep getting this error:

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in system.directoryservices.dll

Additional information: Unknown error (0x80005000)

Here is the code I am trying to run. Objective being, aquire a list of virtual directorys (or anything) from the website, "Default Web Site" within IIS.

Dim jds1 AsNew DirectoryEntry

jds1 =
New DirectoryEntry("IIS://localhost/")

Dim jds2 As DirectoryEntries = jds1.Children

jds2.Find("PW")

'Note: "PW" is supposed to be a virtual directory directly under "Default Web Site" within IIS.

I also get the error listed above when adding a virtual Directory.

Dim jds As DirectoryEntry

jds1 =
New DirectoryEntry("IIS://localhost/")

jds = jds1.Children.Add("MyNewFolder", "IIsWebVirtualDir") '<-- Error

'Never reach the next two lines.

jds.Path = "C:\testweb\"

jds.CommitChanges()

Now, I'm on a Windows 2000 Server. Running IIS 5.0.

Basically, all the examples on the web or in any of my books, don't seem to work when I try to access the IIS server. I literally have no other code setup to access IIS. What am I missing?


Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > IIS interaction from a VB.Net (not ASP.net) application


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT