tags:

views:

272

answers:

1

Is there a way in the .NET framework to validate that a process has access to a specific WCF address namespace without attempting to call ServiceHost.Open and capturing the resulting AddressAccessDeniedException?

Right now if that exception is thrown I restart the service in elevated (administrator) mode so that I can properly reserve the namespace. But it seems like there should be a way to do that without waiting for the exception to be thrown that is a little easier to read in the code.

A: 

Check out the code here:

http://www.pluralsight.com/community/blogs/keith/archive/2005/10/17/15632.aspx

jezell
I have that working. I just need to know how to check to see if an ACL has already been set. I'm not clear on how to check whether or not a process has access to host a service on a specific namespace.
spoon16
The APIs are the same family as the code sample I linked. Here is the query api:http://www.pinvoke.net/default.aspx/httpapi/HttpQueryServiceConfiguration.html
jezell