Click to See Complete Forum and Search --> : Access is denied when listen on a port


George2
May 29th, 2008, 05:32 AM
Hello everyone,


I am using Windows Server 2003. When call the Start method of HttpListener, there is the following exception -- System.Net.HttpListenerException: Access is denied.

Any ideas how to grant the access?


thanks in advance,
George

cjard
May 29th, 2008, 05:52 AM
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=93940
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=583856&SiteID=1
http://technet2.microsoft.com/windowsserver/en/library/e17527d2-105a-451f-8e3f-d515479527011033.mspx?mfr=true
Google.. (yawn)

Shuja Ali
May 29th, 2008, 05:56 AM
I think you will have to use httpcfg utility in this case although I am not sure, but you can check it yourself.

George2
May 29th, 2008, 06:18 AM
Thanks Shuja Ali and cjard,


1.

Your ideas give me a lot of hints. I have studied the httpcfg tool, but few information about how to use this tool.

I have found a sample from the below link, which is,

httpcfg.exe set urlacl /u http://localhost:80/StevenCheng/ ; /a D:(A;;GX;;;WD)

I think it will grant the access to all the URLs whose prefix is "http://localhost:80/StevenCheng/"?

For example, the following 2 URLs are granted automatically by the above command?

http://localhost:80/StevenCheng/folder1/1.html
http://localhost:80/StevenCheng/folder1/folder2/2.html

2.

How to use the getsid tool? I can not any help information and sample, for example, how to get the id of an account?

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=93940
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=583856&SiteID=1
http://technet2.microsoft.com/windowsserver/en/library/e17527d2-105a-451f-8e3f-d515479527011033.mspx?mfr=true
Google.. (yawn)


regards,
George