Is basicHttpBinding really required when exposing a WCF service as a Web Service for .NET 2.0 Target Client?

后端 未结 3 1758
栀梦
栀梦 2021-01-26 01:37

I have a WCF service and am hosting it in a Windows Service.

I tried to add a reference for the service from a Windows Form client built on .NET 2.0. I could get the Web

3条回答
  •  温柔的废话
    2021-01-26 02:13

    Your config doesn't quite line up.....

    
       
           
                
           
       
    
       
    
    

    If you take all this into account, you get http://localhost:8002/HBAccess/ from the base address, plus mex from the MEX endpoint --> http://localhost:8002/HBAccess/mex

    But in your behavior configuration, you use a different address for MEX:

    
        
    
    

    Here, you point at http://localhost:8002/HBAccess/help/mex - note the extra /help in there. Now which one is it really??

    I would recommend tossing away the explicit httpGetUrl in the service behavior config - just use:

    
        
    
    

    and you should be able to get your MEX at http://localhost:8002/HBAccess/mex.

    Marc

提交回复
热议问题