Regarding WCF service url & Mex Endpoint usage RRS feed

  • General discussion

  • i am learning wcf so often questions comes to my mind.recently i developed a small calculator wcf service. i had three project one has service contract and another has wcf service with main class from where i self host the service. in app.config file i gave my endpoint address net.tcp://localhost:5555/Calculator i always thought that i have to give my service class name at the end of service url. in my apps my service url looks like above and Calculator is my service class name.

    just few days ago i was browsing a wcf code and i saw that there service class name was chatsrv but service url would look like net.tcp://localhost:5555/chat

    i like to know that can i give any name to my service at the end?

    1) if so then how self host code can understand at which url service need to start ?

    2) if i set false for <serviceMetadata httpGetEnabled="false"/> then how other client consuming my service because i have set httpGetEnabled="false" and self host the service but from other .net project i could consume that service by channel factory and as add reference? so tell me what people need to set httpGetEnabled="true" if false works fine?

    whatever i know that if httpGetEnabled="false" then mex endpoint will not expose to other client and hence forth no other client may not be able to add reference to their project of my service reference. i am new so not good about the service internal. if possible please discuss it in detail.

    3) why mex endpoint is required when client can instantiate & call service function through channel factory without mex endpoint then why & when mex endpoint would require?


    Thursday, January 30, 2014 2:41 PM