471,120 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

Getting an error while testing my first WCF service

Rod
This is my first WCF service and it is running on my development machine (XP
Pro SP2) under IIS, I am using wsHttpBinding. (I will eventually put it onto
a Windows 2003 Server running under IIS on the server as an Intranet
application). The strange is I've stepped through the code in the WCF
service, it makes the call to the SQL Server database, it retrieves the data
and puts it into the DataTable object, and then I close the connection and
dispose of it (with using) and return the DataTable. It seems to do all of
that just fine, no errors or problems at all. However, in looking at the
returned error message (received in the client) I get the following:

"The underlying connection was closed: The connection was closed
unexpectedly."

(Which, frankly I do not understand. The connection closing is not
"unexpected". I closed it, very intentionally. I was done with it, so why
does it say this???)

According to the stack dump the InnerException has this error message:

"The message could not be processed. This is most likely because the action
'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel' is incorrect or
because the message contains an invalid or expired security context token or
because there is a mismatch between bindings. The security context token
would be invalid if the service aborted the channel due to inactivity. To
prevent the service from aborting idle sessions prematurely increase the
Receive timeout on the service endpoint's binding."

I generated the proxy class and config file using the SvcUtil.exe function,
and they also use wsHttpBinding. And I've put in some FaultException calls
to return to the client any errors occuring in the service, but none of
those are being reached. So it really looks to me as though the problem
isn't with the service so much as it is with the client, or something in
between. So I don't know what's going on here or why.
--

Rod
Jun 27 '08 #1
0 2307

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Kisa | last post: by
4 posts views Thread by Jason Richmeier | last post: by
reply views Thread by mmcgee00 | last post: by
2 posts views Thread by srusskinyon | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.