tags:

views:

106

answers:

2

Hi,

I've got a WCF service that I'm hosting in IIS 7, which I connect to from a .NET page. The service and page work fine when I test it locally from Visual Studio, but when I put it on my staging server I get a TimeoutException.

Any suggestions on how I can debug this to work out what's going wrong?

+1  A: 

A timeout would typically mean that you aren't even making the connection. I'd check that your endpoints are configured correctly: you have the same ports and your client is attempting to connect to the staging server, not your dev system. Also, you might want to check firewall/ip access restrictions on your staging server. I often have my staging server isolated from the net and frequently have to open up access to specific clients for testing.

tvanfosson
+1  A: 

Sometimes it helps to isolate the problem by removing one half of the system.

For example, if you believe that you problem is the WCF service, try hitting the service from a browser. If that works, write a tiny console application and try to invoke some methods on the service. If THAT works too, then consider looking into your web app/config (as covered by tvanfosson in another reply here).

Andrew Anderson
Turns out that I had to increase the maxStringContentLength attribute so that I could see the error that was being thrown at the server.
Sugendran
Oooh - tricky. Great to hear that you got it solved.
Andrew Anderson