Silverlight WCF service returns remote server not found error on deploy - wcf

I have been trying to host a WCF service for a Silverlight OOB application. When I run the application from my local machine it works fine. But when the same is deployed to a server, I get the following
Remote Server not found error.
I used fiddler to track the error and it says
HTTP/1.1 500 System.ServiceModel.ServiceActivationException
Could this be some issue with the IIS settings on the server?

You need to check two things,
1.Check for these two files in your service root folder clientaccesspolicy.xml and crossdomain.xml.
2.Check for the namespace of your service.you might be wrong on the namespace.
if these does not work post your web.config .

Related

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

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

Unable to host WCF REST Service 40(CS) on IIS 7

I have created WCF REST service in vs2010(4.0) with WCF REST Service Template 40(CS). It works fine on localhost and local IIS (7.5), without giving me any errors. But while I am trying to deploy it on server, it gives me 500 Internal server error. I have deployed same way I did on locl IIS. It is not giving me more details about the error. When I checked the server log, it says service.svc - file does not exist. While I have not created .svc file, I did directly with given template.
Can any one please help me to find the solution to this...
Thanks in advance...
I am using template, so there is no .svc file. In this we can directly access the uri without .svc with the filename.
Chrome is just displaying me 500 Internal server error. It is not displaying any related information about error.
-
Satyen Pandya
finally I found the thing that causes error in my service. I have used MySQL database and for that reference to MySql.Data.dll file of older version, and when I upgraded that dll with newer version, my entire project was not responding. It was replaced my newer version and when I tested with older version, service is running fine.
And for hosting it on WCF, Normal procedure of hosting the site on IIS worked for me after solving above problem... And I better opt for going with .net 3.5 WCF Rest Service with .svc extension available.
Thanks all for reviewing my problem..
Take a look at similar post...
# hosting .net 4.0 REST WCF service in IIS 6

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

how to debug a WCF service once it's out of dev env

I have a WCF service that i've been able to communicate with fine while it's hosted locally.
I have it deployed to a web server in IIS now, and I can get the wsdl file without error by navigating to http://site.com:8000/service/servicename.svc?wsdl
in trying to test this, i've created a console app and was able to successfully add a service reference to this. But when I try to run a Get() method on the service reference, it just hangs with no response.
How can I begin to debug this?
Thanks!
When you have a service that works in dev but not in IIS, it is often due to a problem with the WCF configuration:
Is the configuration in place (since you can add service reference it probably is)
Is the protocol you are using available. The configuration you are using must match what is turned on. For example are you using nettcpip binding without WAS.