Firstly . I am a fresh man of WCF . Maybe something i done looks like easy for you .but if you have any comments for me . i will be appreciated for that . thank u .
Recently when i was writing something simple enough WCF server testing program.
in my console app. firstly i had to add system.ServiceModel.dll of .net 4.0 in my computer system like all the others wcf app.
and i add code shown blow in the main method.
see ? i did not add anything of configurations . let 's what would be happen.
...
the console wrote the message like this :
"The service is ready."
"Press <ENTER> to terminate service."
well . it seems this kind of WCF service without any configurations works .
but . if you access the base uri defined in the main in web browser .
the wcf will show you a message that inform you can not get the metadata from the service you consumed.
so. what are u going to do with a WCF service without metadata ? that is the problem i really want to mention. we knew even the simplest app i wrote before is working without any exception .without metadata. we don't know the detail of how to communicate message to message between the client and server.
so . we had better follow the instructions shown in the above . add service behaviors . add mex endpoint....something like that . that will make sense of the service you created.
then . i add all the stuff that need to be in app.config. also you can done it in code
after configuration. access the WCF in browser again . everything is fine now.