.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the s

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :WCF
The following error is issued following 10 minutes of system inactivity: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: The message could not be processed. This is most likely because the action 'http://tempuri.org/IParticipant/SearchParticipants' 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. Per the message, I tried changing the app config on the client from     receiveTimeout     ="00:10:00" to     receiveTimeout="10:00:00" but the change seems to have no impact.  What am I missing?

View Complete Post

More Related Resource Links

WCF Service hosted in IIS 6 failing on idle timeout and does not restart

I've got a WCF service hosted in IIS 6 with its own application pool.  The application pool is running under a domain service account.  It appears that the application pool's idle shutdown setting is killing WCF service and subsequent requests to the WCF service get an exception as listed below I can only access after I browse to the .svc page in order to get it working again.   I've went through the svc tracing and able to see where the ServiceHost closes down. I have tried various session management techniques with no result. I haven't read anything about having to disable the idle timeout in IIS 6 when hosting a WCF service, and I suspect that there shouldn't be any need to.   Can anyone provide any insight into why this is happening?   ******************* My client exception ******************* Test method **********  threw exception:  System.ServiceModel.ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<html>     <head>         <title>Runtime Error</title>      

Web Service that will receive xml request and send xml response


I am trying to create a web service that can do the following functionality:

Request XML 

<?xml version="1.0" encoding="UTF-8"?>
<Authentication UserName="test" Password="test" MyId="0987">

Response XML - After authenticating request xml from client send them back the following response:

<?xml version="1.0" encoding="UTF-8"?>
   <Test MyId="0987">
       <TestType id="11"></TestType>
       <TestType id="22"></TestType>

How can I create web service to do this.

Session Timeout increase to 2 hours.



    for Business needs i am planning to increase the session timeout to 2 hours(120 min) in one application, i am using sql server session state. if i increase to 2 hours of session time out, how it will effect the performance of application and web server.

   Could any one help me on this.






Increase timeout on Send Activity

I am using Send activity to call another Workflow service. I am getting the following error: The HTTP request to 'http://fulfillment.odp.skinit.com/OrderWorkflowService/AssemblyWorkFlow/ReleasePhysicalAssetsWithArt.xamlx' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. How do I increase the timeout in the Send Activity? Thanks.

A connection has exceeded the idle timeout of this connection pool ????

Dear all,I have an the following message in my service lo :A connection has exceeded the idle timeout of this connection pool <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"> <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"> <EventID>262147</EventID> <Type>3</Type> <SubType Name="Information">0</SubType> <Level>8</Level> <TimeCreated SystemTime="2009-06-12T10:11:24.7047020Z" /> <Source Name="System.ServiceModel" /> <Correlation ActivityID="{5e7a4c90-646a-41ae-8081-b6ebddbe3e9e}" /> <Execution ProcessName="Maillefer.Nomos.Plateform.Service.Console" ProcessID="5984" ThreadID="12" /> <Channel /> <Computer>VISTATEST</Computer> </System> <ApplicationData> <TraceData> <DataItem> <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Information"> <TraceIdentifier>http://msdn.microsoft.com/fr-FR/library/System.ServiceModel.Channels.ConnectionPoolIdleTimeoutReached.aspx</TraceIdentifier> <Description>A connection has exceeded the idle timeout of this connection pool (00:02:00) and been closed.</Description> <AppDomain>Maillefe

How to increase the timeout for a SharePoint 2010 website

The default timeout for an Http Request in SharePoint Foundation 2010 is 120 seconds*.  Any Http Requests above this 120 seconds will be met with a "Request timed out" error as displayed in the SharePoint logs: Unexpected     System.Web.HttpException: Request timed out. Note: The SharePoint logs can be found at:     C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS To increase this timeout you will need to modify the web.config file for the SharePoint Website.  If you are using the default SharePoint configuration, then the web.config file will be found at: C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config Open this file in Notepad and then scroll down to the system.web > httpRuntime element (about half way down the file).  To increase the timeout, add the executionTimeout attribute to the httpRuntime element with a value of the number of seconds for the timeout.  For example, to increase the timeout to 5 minutes, add an executionTimeout of 300 like this: <httpRuntime maxRequestLength="51200" executionTimeout="300" /> In the default SharePoint Foundation 2010 web.config file it will look like this: Save the web.config file and now the timeout for HttpRequests will have been increased (Of course you need to ask why a request is taking more than 2

how to increase timeout in SSAS

Dear Sir,   When SSAS makes query from relational table it time out [in my SSAS project timeout value is set to 0 in datasource connection string]. So how can i increase its timeout sufficient to complete a query that takes time in many minutes. What is min time for timeout? What is max time for timeout? thanks

Workflow Service 4.0 with One Way Receive activity will not get fired when called by a console based

Workflow Service 4.0 with One Way Receive activity will not get fired when called by a console based client application. This service does get called when there's the default ReceiveRequest coupled with a SendReply activity in the service. However deleting the ReceiveRequest and SendReply Activities and replacing it with a one way Receive Activity causes the Workflow 4.0 Service to not get called. Thanks, Leo Cono - http://www.YouLoveMe.com, Free Dating Site  

WCF : How to prevent an endpoint from being published in the service WSDL?

Suppose I have a WCF service which has 2 endpoints A and B. I want to enable mex/wsdl on this service but my requirement is that B should not be published in the WSDL. So to say B is only for internal purpose and clients should never be aware of it. Is there a way (most probably somehow using IWsdlExporterExtension), to remove this endpoint B from being published in the metadata?

WCF Web Service URL (Timeout)


Hello all,


I have a WCF web service project called ALC_Service. I have built a client application that needs to access this service. I assumed that I could change the URL of the service at runtime and it should just work but I keep getting a timeout when I call the method of the service (System.Net.WebException: "The operation has timed-out.").

Here is the code that I am using:

    private void button1_Click(object sender, EventArgs e)
      button1.Enabled = false;

      // Display the message from the service
      AlcServiceReference.AlcService service = new ALC_Client.AlcServiceReference.AlcService();
      service.Url = "http://fakepooPC/ALC_Service/AlcService.svc";      
      button1.Text = service.GetTimeString();

      button1.Enabled = true;


Basically, I create an instance of AlcService and set the URL to the machine that is running the service. Then, I try to call the method of the service (GetTimeString) and here is where it times out.


Any ideas?




Webservice timeout while calling windows service



We have a .net product built in .Net 2.0.
It consist of three blocks.
First is a asp.net web application which calls webservice which in turn call a windows service to get results from database.
Our problem is that windows service is taking time to get results from database because of which timeout is occuring.

Now we have already set timeout property in web application while calling web service through proxy. However, we could not find how to set timeout property for webservice(This will stop webervice from timeout before windows service send back the result).

If somebody have done it, please help


Intermittent timeout calling ASMX web service yet Upload data transfer completes OK

I'm calling my webservice from a web page and getting a timeout despite setting very high values in my web.config files. This occurs intermittently when the file is usually pretty large but yet the file is still getting uploaded completely (as if the timeout DID NOT occur). Here is a function in my .aspx file which calls my ASMX proxy class:
private void UploadFile(HttpPostedFile postedFile, string fileNameOnly) 
    // create an instance of the proxy class to talk to our service; calling it client: 

how to prevent session timeout during files uploading (postBack free uploader).


Hi All,
         i am using a multi selecting file upload control which is postBack free.
I am using session timeout.
 My problem is that during files uploading my session got expired. Bcoz my uploader
not being postback so i can't enhance session timeout. and while uploading my session
got expired and process was not completed, causes some imp files could not uploaded.

 any one suggest me what to do OR any idea to complete uploading then session timeout.

WCF service timeout when not closing the client properly



I have a WCF service hosted in IIS. I know you need to close the client after calling the service. But I use the service as a web service and I don't know if clients will close the service. When they don't close the client the service will get a timeout after 10 calls.

I set the following on the service:
[ServiceContract(SessionMode = SessionMode.NotAllowed)]

When I use performance monitor I see the number of instances stays 0. When I don't use SessionMode =
SessionMode.NotAllowed an instance is added for each call. I thought I solved it. bad luck: still I get a timeout after 10 calls.

Next I added this to the class implementing the service:

Receive Client Certificate in Web Service


I'm trying to receive a Client Certificate in a Web Service and having some problems.


Dim cert As X509Certificate = X509Certificate.CreateFromCertFile("C:\cert.cer")
Dim hw As String = _ws.HelloWorld

The certificate seems to be correclty loading and added to the client.

The client connects to the server with HTTPS.


 <WebMethod()> _
    Public Function HelloWorld() As String
        Dim cert As HttpClientCertificate = Me.Context.Request.ClientCertificate
        Return "Hello World"
    End Function

cert.IsPresent is false and all certificate fields are empty.

IIS is configured to Accept Client Certificates.

Reproduced in two environments:

- Windows 7 x64, IIS 7, VS 2008, .NET 3.5

- XP x86, IIS 5, VS 2008, .NET 3.5

Always in the Web Service the Client Certificate is not proesent. I haven't been able to find any other configuration I should do. Can anyone help?



Getting the number of open sessions to a WCF Net.Tcp service


I am trying to find out the number of open sessions to a service. In the case of a client proxy being used but not closed. In .NET 4.0 I was able to find out the performance counter to do it, it is Max Concurrent Session

But in .NET 3.5 this counter does not exist. We can not move to 4.0 yet, and I was sure there should be a way to do (maybe via another counter) for version 3.5

For a service that is using net.tcp, what can I use to find out the number of open sessions, or the number of refused sessions?

How to setup a ReceiveReply activity to receive the result of a WCF service operation?


I already figured out what I have to do to send a WCF message to a WCF service developed with .NET, but I could not get the result back to the workflow. I need to know what I have to do to get that result. 

I have a very simple test WCF service with following contract:

[ServiceContract(Namespace = http://www.juergen-bayer.net/samples/wcf)]
public interface IDemoService
  long Add(int value1, int value2);

The client application uses a workflow with a Send and a ReceiveReply activity. The WCF endpoint is configured in the config file:

   name="BasicHttpBinding_IDemoService" />

The Send activity is configured like follows:

Action="http://www.juergen-bayer.net/samples/wcf/IDemoService/Add" => This would also be the default value in my case

The parameters of the WCF message are placed in the content: 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend