Enable MEX in a Web.Config

前端 未结 3 861
刺人心
刺人心 2021-01-23 03:18

How do I enable/create a MEX endpoint in the below web config so I can view the service from my browser?

I have tried a few variation from googling but VS always complai

3条回答
  •  梦毁少年i
    2021-01-23 03:57

    Add this line to the web.config right under the service endpoint:

    
    

    Thanks josh3736 for the tip on the GUI editor, the only problem I had was I still didn't know how to use the editor to do this, so here is what I did:

    1. In VS, open Tools/WCF Service Configuration Editor
    2. Open the web.config or app.config file that contains your service definition
    3. Navigate to the Services / (your service) / Endpoints folder
    4. If the MetadataEndpoint is there, click on it and edit the configuration to your liking, otherwise, right-click the Endpoint folder then click New Service Endpoint and configure like the one in the image below.

    enter image description here

提交回复
热议问题