CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 4/19/2007 5:11:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 144 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
huangdashi
Asp.Net User
what is this "IIS://localhost/W3SVC"4/19/2007 5:11:22 PM

0

Hi

 I am reveiwing the old codes and coming across the folllowing statement that I don't quite understand. Anyone knows what is going on?

DirectoryEntry

server = new DirectoryEntry("IIS://localhost/W3SVC");

If I execute this statement, I get the thrown exception that -- Access is denied 

My questions are:

1 Is there a way that I can see the directory IIS://localhost/W3SVC?

2 Looks like there is a permission issue. But first I cannot assert or grant any rights (absolute path is required) and second, don't i have a security problem because this statement allows any anonymous user to scan all subdirectory under //localhost/W3SVC. Am I right?

3 In fact, the function is to get the web root directory entry, is there any other way?

 Thanks

Michael

 

 

 


huangdashi
Kumar Reddi
Asp.Net User
Re: what is this "IIS://localhost/W3SVC"4/19/2007 8:46:41 PM

0

As you noticed.. if you simply execute that statement.. it throws Access Denied error.. Since the page is running under Anonymous User account by default

You might need to impersonate as an "Adminstrator" user.. so the page has enough permissions to execute the code..


Kumar Reddi
My Blog
huangdashi
Asp.Net User
Re: what is this "IIS://localhost/W3SVC"4/19/2007 9:32:46 PM

0

Thank you for the information. In fact, I have specified impersonate = true in the web.config file.

 and it still gives the error -- Acess is denied

 how to impersonate it to administrator (or some other type of user)?

 Thanks

 Michael


huangdashi
Kumar Reddi
Asp.Net User
Re: what is this &amp;quot;IIS://localhost/W3SVC&amp;quot;4/19/2007 10:07:39 PM

0

<identity impersonate="true" userName="AdminUserName" password="password" />

 


Kumar Reddi
My Blog
Bo Chen – MSFT
Asp.Net User
Re: what is this &amp;amp;quot;IIS://localhost/W3SVC&amp;amp;quot;4/23/2007 8:19:26 AM

0

Hi,

i searched thru the internet and it seems that some other guys have already met this problem before. Please refer to:

http://www.webservertalk.com/archive120-2004-4-122769.html

and

http://www.winserverkb.com/Uwe/Forum.aspx/iis/14858/ADSI-access-to-IIS-localhost-w3svc-failed-with-access-denied

Hope my suggestion helps :)


Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Microsoft® log parser toolkit Authors: Gabriele Giuseppini, Mark Burnett, Pages: 437, Published: 2005
Developing ASP components Authors: Shelley Powers, Pages: 811, Published: 2001
CYA securing IIS 6.0: covering your a** by getting it right the first time Authors: Chun Hai Cheah, Ken Schaefer, Chris Peiris, Pages: 397, Published: 2004
IIS 6: The Complete Reference Authors: Hethe Henrickson, Scott R. Hofmann, Pages: 699, Published: 2003
Sams teach yourself Windows Script Host in 21 days Authors: Thomas L. Fredell, Steve Campbell, Michael Morrison, Ian Morrish, Charles Williams, Pages: 607, Published: 1999

Web:
GetObject("IIS://LocalHost/W3SVC/1/ROOT") fails on IIS 7 : The ... I suspect that the path has changed in IIS 7 – is IIS://LocalHost/W3SVC/1/ROOT valid in IIS 7. If no, can you provide the correct value? ...
Using the IIS Metabase to Power ASP Specifically, we would use the IIS://LOCALHOST/W3SVC interface. Breaking this definition apart, we see that the type of interface is defined (IIS), ...
what is this "IIS://localhost/W3SVC" - ASP.NET Forums http://www.winserverkb.com/Uwe/Forum.aspx/iis/14858/ADSI-access-to-IIS-localhost -w3svc-failed-with-access-denied ...
Get list of all sites using ASP.NET running on IIS6 : The Official ... IIS://localhost/W3SVC/1/ROOT/aspnet_client. IIS://localhost/W3SVC/AppPools ... IIS://localhost/W3SVC/Filters/ASP.NET_2.0.50727.0 ...
What does "IIS//localhost/W3SVC/1/Root mead? - Acresso Community Can somebody please explain to me that "IIS://localhost/W3SVC/1/Root" means? I need to be able to update the MIME type if IIS Version 6 and ...

DirectoryEntry - Access is denied. (Exception from HRESULT ... 1 DirectoryEntry deRoot = new DirectoryEntry("IIS://localhost/W3SVC/1/Root", " Administrator","Password"); 2 deRoot.RefreshCache(); ...
DirectoryEntry.Password - ng.asp-net-forum.migrating_from_asp ... 1 DirectoryEntry deRoot = new DirectoryEntry("IIS://localhost/W3SVC/1/Root", " Administrator","Password"); 2 deRoot.RefreshCache(); . ...
Deploying a CLS SP - ng.asp-net-forum.visual_studio_2005 Host = "localhost" '(4) Send the MailMessage (will use the Web.config settings) smtp.Send(mm) End Sub End Class ... what is this "iis://localhost/w3svc" ...






xsd to vb

control opoup (window.open) size and settings.

html-type code snippets in the asp editor?

where is running documents window?

vs 2005 ide five errors on remarked html

please help me!

wec custom control

copy tooltip content?

phantom code behind files

upgrade to visual studio 2005 iis login problem.

dll file fof asp.net 2.0

vsdesigner error creating table adapter

cannot get intellisense to work in c#

visual studio 2005 crashes when saving

post publish batch file automation

unable to start debugging on the web server

free source control

the program '[5460] webdev.webserver.exe: managed' has exited with code 0 (0x0).

missing debug options

simple separator line

page_load

how do i get rid of the asp.net development server?

how to debug a com+ component

registertagprefixes and imports

web.config connection string test.

sql server database projects

newbie needs help with a databound drop down box

class viewer in visual studio 2005

running tools from the command window

vs2005 - vb.net - stop continuos build ...

   
  Privacy | Contact Us
All Times Are GMT