So here is the scenario. I just added a new Web Service for my project to consume using the URL which pointed to the source WCF Service. I have consumed a lot of web services in the past so it was nothing new and I built out all the code rather quickly for it. However, when I tried to run it, it would always timeout, no other errors just a timeout:
Server Error in '/' Application.
The operation has timed out
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Net.WebException: The operation has timed out
Source Error:
|
Source File: C:\path\Reference.cs Line: 84
Stack Trace:
|
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3614
I removed some of the stack trace that was specific to my application...
After fighting with this issue for a day or two, stepping through the code, monitoring calls at both ends, the basic troubleshooting stuff. I finally read this blog post again, who knows what neurons in my brain got triggered and why, but it clicked... I had added my WCF Service as a Web Service. Adding WCF Services isn't quite as intuitive as the old web service was because there is no Add WCF Service option in the visual studio 2008 gui that I could find. Instead you have to right click on the project name itself and click Add Service Reference.
---------------------
The next error I fought trying to get this web service up was:
System.Net.WebException: The remote server returned an error: (405) Method Not Allowed.
This was resolved by making sure that the "endpoint address" on the server had the service URL without the final file name. While the client "endpoint address" had the fully qualified url of the wcf service.
4 comments:
maaaaaaaaaaaaaaaaaaaaaaaaaaan. I went through gazillion sites and no one mentioned this... Thanks for this, I was working on this for 5 hours. love you <3
That was a very good post, like other i too searched in lots of website for a resolution and finally tried this. I'm impressed with your Math profile as well.
awesome... thanks!
Thanks saved my time
Post a Comment