C # hide WCF hide endpoint no answer found

I am trying to hide my WCF as much as possible. If someone enters the URL of my WCF, the response “Endpoint not found” is displayed. If they try to receive a request for receipt, they are displayed with an invalid method because my service only accepts messages.

I already have the following data in my web.config

    <behaviors>
      <endpointBehaviors>
        <behavior name="webBehavior">
          <webHttp helpEnabled="false" />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="Default">
          <serviceDebug includeExceptionDetailInFaults="False" />
          <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>

I would like to show a lack of response if they do not have exact URLs and exact message parameters. I'm not sure that I need to change my Custom Errors section. My understanding is that user errors are only for cases where an exception is thrown. Endpoint not found and method not allowed is no exception.

Any help or suggestions would be greatly appreciated.

+4

Source: https://habr.com/ru/post/1655891/


All Articles