I don't get data from remote service - wcf

I have a service, hosted in a windows service. When I installed the windows service in the local machine, I can get data from the service, but when I installed the windows service in the remote computer (in the server), I don't get data.
I have tried in a internet browser to use the address of the endpoint in the server, and I get response, so I get the page that says how to use svcutil to create the proxy.
Although I get this page, I have tried to disabled the firewall in the server and in the client, but the problem persists, how I expected.
If I get response in the internet browser, wouldn't I get access to the methods of the service?

On server side add trace listener so as to find out what error occures. Do you make use of any certification which service may not possess?

Related

can not access iis hosted wcf from remote machine

I have hosted a wcf on IIS when I write its url to the same machine's browser it works but when I try to access it from a remote machine or mobile on the same LAN I get this message :
500 - Internal server error
how can I solve this problem?!
any ideas!
The best way to determine the root cause may be to enable WCF Tracing on both the client application and host service. Oftentimes, the WCF Trace log will reveal issues that were previously “hidden”.
http://msdn.microsoft.com/en-us/library/ms733025(v=vs.110).aspx

after deployment picture download from wcf service doesn't work how to find out what is wrong?

WCF service is used to retrieve data and pictures. WCF service work well on localhost, and on web-hosting of provider. But the same service after deploying to server within local network doesn't allow to retrieve pictures, however data comes successfully.
So:
WCF service data downloading:
localhost (ok)
web-hosting (winhost.com) (ok)
remote server within local network (ok)
WCF service picture downloading (binary array of bytes):
localhost (ok)
web-hosting (winhost.com) (ok)
remote server within local network (NO!!!!)
so it's strange because the same service perfectly works on web-hosting of winhost.com provider but refuses to give pictures on local server!
What could be problem?
I don't know should I do some configuration of server 2008?
At last I have to debug WCF service on remote server, but how to?
Answer:
1)If you have several references for services don't forget to put for all of them the constraints; in configuration of app.config maxReceivedMessageSize.
2)To debug service simply add some more details in reponse from wcf service
A console client takes about 2 mins to write and you can set it up to be sure it outputs the exception being sent from the service. The winform application would be just as good if you are in a position to set up those checks. The point being, be sure the service throws exception info back to the client

Remote Machine Debugging in Visual Studio 2012 with Metro and WCF

I'm trying to debug my Metro application on a tablet from my desktop, however when it boots up and tries to get data from my wcf service i get this error:
An exception of type 'System.ServiceModel.EndpointNotFoundException' occurred in mscorlib.dll but was not handled in user code
Additional information: There was no endpoint listening at http://localhost:39855/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
I'd assume that this is because the service is hosted on my desktop in iis express, and the tablet app is trying to look for the service at localhost which wouldn't be where the service is hosted, it would have to be the ip of my desktop or something. But how would i change my service in Visual studio to be hosted at my ip instead of localhost? I have disabled both firewalls so there should be nothing causing problems in that regard.
My experience with WCF is pretty limited :(
Or do i have to set up IIS, deploy my service on my local machine, and point the tablet to that address?
Hosting the service in iis express should be fine, but you have to modify the client (the tablet app) to point to your host machine explicitly (using the IP or the network host name of the machine). You can do that either by modifying the configuration file for the app or by creating the client binding in code, specifying the host.

Expose WCF service cannot retrieve object through windows firewall

I built a WCF service that exposes itself for a web application, it accepts an object and prints the data on the clients machine. Works fine on my development machine, and the service is up and running on any machine i install it on. I can enter ip address in clients machine web browser and see it is running. Problem is when i send the object to the clients machine it returns an error, that sounds like it could be because of the clients windows firewall. Where would i start at to deal with this problem ?
There was no endpoint listening at http://192.168.1.168:2202/PrintLabel that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
And the InnerException: Unable to connect to the remote server
With further research and discussion with people in the community i came to understand that as was mentioned at the bottom of this article.
"Self-hosted HTTP addressing for WCF is not integrated into the Windows firewall. An exception must be added to the firewall configuration to allow inbound connections using a particular URL.
But this SO question led me to a page with how to control Windows Firewall through code to enable my WCF self hosted service to accept an object.
This the link below.
http://www.shafqatahmed.com/2008/01/controlling-win.html
That link was towards the direction i needed, but based on user comments it seemed to have some bugs. A colleague found this link and i believe this technique will be the best solution for this scenario.

WFC SVC File emits HTML when called from a service client

I'm in the process of deploying a WCF service application. The service works fine if it's running as its own site, but the intention is for the service to run as a virtual directory of the Default web site of the server. When I set the service up in this configuration, I get an odd problem. When the client tries to make a service call, it receives the HTML of the friendly service description, not SOAP. Naturally this generates a service error. The HTML appears to be identical to the service page that you see in a browser with an HTTP Get, but I'm only seeing the first 1024 bytes in the error message, so I may be missing something.
I've checked HttpHandlers and loaded assemblies, and as far as I can tell there's nothing unusual that is being inherited by the virtual directory. The default site has 3 ISAPI Filters installed including Outlook Web Access (yes, this server is running Exchange). I tried installing these filters in my test web site, but it still ran the service without problems. The problem only happens with the service is running as a virtual directory of another virtual directory within the default web site.
The server is Windows Small Bus Server 2003 SP 2 running IIS6.
If you're hosting WCF in IIS you need to set the server up in the 'Application Role' check out the following link does that help:
MSDN: Internet Information Service Hosting Instructions