473,396 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 2475

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kevin | last post by:
I'm writing a service in VB.NET. Reference the following code: Dim oStreamWriter As StreamWriter .... .... .... oStreamWriter = File.CreateText(TempLogFile) If Err.Number <> 0 Then...
1
by: Cesar | last post by:
Hello, I've developed a .NET C# web service; which has one method named, let's say, upload_your_data. This method has one parameter ( string your_data). The value that this parameter will...
8
by: Kevin D. | last post by:
Please note, I already posted this on the MySQL official forum, but received no response. I thought I'd try again in another location. My apologies to anyone reading this twice... Despite...
1
by: Kisa | last post by:
I am using Visual Studio 2005 on Windows Server 2003 (Virtual Server). All service packs are installed. I first had this problem when trying to distribute an application for testing so I then...
4
by: Jason Richmeier | last post by:
I am sure this has been asked at least once before but I could not find anything when searching. If I set the value of the ExitCode property to 1066 for a windows service, the text "A service...
0
by: mmcgee00 | last post by:
Hi, Currently, I am trying to get different service banner by connecting to different ports using python (code below). The versions I am working with are python 4.2.1 and fedora core 4. I am...
6
by: alho | last post by:
The web service is called by a program running on pocket pc. When to call the web service, the first call is still ok, but for the second or later calls, it will throw "403 Forbidden" WebException....
13
by: problem. | last post by:
#include <stdio.h> #include <stdlib.h> int main(void) { int a, b; float result = 0.0f; char symbol = '\0'; int loop = 0;
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.