I was instructed to write a program that will run a series of diagnostic tests for our main application. One application uses WCF on top of HTTP (this is done for compatibility reasons, so it cannot be changed to use NET.TCp or any other WCF communication channel), and since it should not work with elevated privileges, reservation of the HTTP namespace is required. ( https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/configuring-http-and-https ).
My question is - is it possible to programmatically find out if the namespace reservation was performed in an OS-independent way (using C # /. NET 3.5 or 4)? The only way I can think about this is to create a small WCF application that will try to communicate on the http channels that interest me and catch an exception ... but this seems really not an elegant way to solve my problem.,
The reason I want to find out is because a number of clients “forgot” to make a reservation, and therefore it generates calls - the diagnostic program is designed to check well-known problems, such as this one, and display a friendly warning, because WCF is debugging on client site is not my idea of fun.
source
share