Why do i need both mex endpoint and httpGetEnable?

前端 未结 3 866
死守一世寂寞
死守一世寂寞 2020-12-08 15:13

I was wondering why do i need to declare this:

 

and also this



        
3条回答
  •  星月不相逢
    2020-12-08 15:30

    This seems to be useful in the following situation...

    
        
            
                
                    
                        
                    
                
    
                
                
    
                
    
               
            
            
                
                    
                        
                    
                
            
    
    

    There are no HTTP endpoints defined and you can get to your service in the following ways...

     - Browser: http://localhost/WCFService/Service.svc    
     - svcutil.exe net.tcp://localhost:8080/WCFService/Service.svc/mex
    

    If you comment out the MEX endpoint then neither will work.

    You wonder why the meta data can still be seen in the browser as

    a) I don't have a HTTP endpoint and b) I have specifically set ...

    
    

    The reason for this is that in the advanced settings for the website I had the following defined for Enabled Protocols under Advanced Settings...

    http,net.tcp

    If you remove http then the metadata cannot be seen in the browser. It would seem that it is in this scenario, a net.tcp enabled only website, that you need the mex endpoint.

提交回复
热议问题