can not access iis hosted wcf from remote machine - wcf

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

Related

Is it possible to host dache cache on IIS?

I'm developing a Web App with Dache, Thanks the author for the fantastic library.
Unfortunately, I have a big problem with it.
In previous version of 1.5.6, it was worse. but in 1.5.6 it's better but still I get The following exception:
There are no reachable cache hosts available. Verify your client settings and ensure that all cache hosts can be successfully communicated with from this client.
In developing, I get the exception after 2 or 3 times build, and I have to restart cache service and stop IIS Express to remove the exception.
In the web app after some hours the clients disconnect from cache service. and I have to restart the cache service and web sites to remove the exception.
I hosted dache on windows service.
I think the problem is for comunications between dache host and dache clients.
So, Is it possible to host dache cache on IIS like a WCF service instead of windows service?
You can host Dache in your own process using the Nuget package. More information available on the Dache wiki:

Unable to invoke WCF Service method from remote machine

We created WCF Service and hosted in IIS in a specific machine.
WCF Client is hosted in some other machine which is there in the same LAN.
We were able invoke it. Suddently it started giving error. It is throwing some Timeout exception.
Please tell me the possible scenarios to get this kind of errors. If the WCF Client and WCF Service both are in the same machine, then it is not throwing any error.
Can you ping the service from the machine where the client is set-up?
Are there any firewalls causing this problem? But you said you were originally able to invoke it? are there any event logs to draw from?
You can try set up WCF loging

Resource not found error when accessing wcf svc file from remote machine

I hosted a simple wcf service in IIS and I am able to access it from the IIS server machine without any issues. But, when I access it from any other machine I get the error:
"Server Error in '/' Application.The resource cannot be found." I put an aspx file in the same location as that of the svc file and is accessible from all the machines; to rule out the connectivity problems. Please throw your thoughts on this.
It can be deployment or configuration issue. It can related to MIME type.
So plese re check your deployement process.
Refer the below links:
Host WCF Service on IIS 7 & Windows Server 2008
Setting up a netTcpBinding enabled WCF Service in IIS 7

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.

Unable to host a Service Bus WCF Host in IIS on Azure

I have worker roles that send out multicast messages using the azure service bus. Two of the consumers of these messages are websites hosted on Azure. I know that there are issues hosting service bus WCF endpoints in IIS even when running on premise. I've followed the Microsoft's advice and configured a service host programmatically.
One of the websites has been using this technique successfully for quite a while. It uses the hosted web core (it was developed before full IIS was an option on Azure) and it initialises the service host as part of the RoleEntryPoint.OnRun(). I'm trying to move this site to using full IIS. Because in full IIS the RoleEntryPoint runs in a different process to the site itself and the service host needs access to some static variables in the site I've moved the initialisation of the service host to the Global.asax Application_OnStart. This code works fine when running as a website under IIS locally and it runs fine when running in the compute emulator, but once I deploy it to the cloud my WCF host never seems to receive any messages. I haven't been able to catch any errors that are occurring.
Has anyone else out there successfully deployed something like this?