locked
Regarding WCF service url & Mex Endpoint usage RRS feed

  • Question

  • User88744855 posted

    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?

    thanks

    UPDATE

    1) i like to know that can i give any url as endpoint address ? i have given this net.tcp://localhost:5555/chat as my endpoint address and it works but if i give the endpoint address like net.tcp://localhost:5555/Mychat then does it work?

    i like to know what is the convention of giving endpoint address url?

    2) now regarding mex endpoint. in my service config file i disable mex like but still i saw any client can add reference like net.tcp://localhost:5555/chat/mex how it is possible ?

    when mex is disable then mex point should not be expose or accessible before client...am i right?

    please guide me. thanks

    Friday, January 31, 2014 2:18 AM

All replies