.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

WCF Faults After 20 Minutes Of Inactivity

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :SharePoint

We have a web site that calls a WAS Site to make WCF Service calls.  The service channel is automatically attempting to close every 20 minutes.   I am not sure where this 20 minute limit is coming from.   In addition, the attempt to close the channel fails so a fault is thrown.  We are trying to allow users to have 45 minutes of idle time not 20.  We have set the session state cookie to expire after 45 minutes.  We have set the receiveTimeOut and activityTimeOut to 45 minutes on both the Service and the Client, but the problem continues.

Microsoft Service Trace Viewer indicates that after 20 minutes of idle time, the Channel Listener is closed but then fails with

Description    Failed to close System.ServiceModel.Security.SecuritySessionServerSettings+SecurityReplySessionChannel


Description    Failed to close System.ServiceModel.Channels.ServiceChannel


I have also attempted to do the same thing on my local machine with IIS 6.  The same problem is occurring.

Any guidance on how to handle this issue would be appreciated.

An example of how the channel is created and managed is listed below:


    class ChameleonAdminServiceClient : ClientBase<IContentAdminService>, IContentAdminService

View Complete Post

More Related Resource Links

User complaining about getting kicked out repeatedly after only a few minutes...


Hi, I am using forms authentication.  My web.config file contains this:

<authentication mode="Forms">
 <forms loginUrl="Login.aspx" defaultUrl="LeaseTracker.aspx" protection="All"   timeout="30" slidingExpiration="true"/>
 <deny users="?"/>

And the login includes this:

FormsAuthenticationTicket formsAuthenticationTicket =
 new FormsAuthenticationTicket(1, userName, DateTime.Now, DateTime.Now.AddMinutes(30),
 _isPersistent, userData, FormsAuthentication.FormsCookiePath);


Response.Redirect(FormsAuthentication.GetRedirectUrl(userName, _isPersistent));

Any ideas on why it would be treating the user this way?

Help! "You must rerun snapshot because current snapshot files are obsolete" every 90 minutes!

I'm having difficulty with SQL Server replication getting machines in the field to replicate correctly.   Here are the specifics of my installation:   100 remote tablet PCs using web sync to update. 1/2 running Vista, 1/2 XP (all latest updates applied) SQL Server Express 2005SP2 w/ cumulative update 6.   Server: Win2003 (all latest updates) SQL Server 2005SP2 CU6   There is 1 database. For each tablet I create a separate publication (PUB001, PUB002, PUB003, etc.) with filtered articles containing data for the tablet. Each publication has a single subscription -- the tablet to which the subscription is assigned. Subscriptions are set to expire after 14 days. Snapshot agent was run when subscription was created, and is set to run automatically every 14 days.     This is a "test" system which is scheduled to roll out into production in 2 weeks.   For the past month I have been running 6 tablets A-OK with no problems (had 6 separate publications/subscriptions on the server/tablets).   I use a stored procedure to create the publications and subscriptions. This stored procedure hasn't changed in months.   Yesterday, we added another 6 tablets w/ separate publications on the server, using the same aforementioned stored procedure.     The tablet application is set to auto-sync over the internet every 15 minutes.   Starting yesterday afternoon, at random, tablets would st

getting minutes from calculation in gridview

Hi..I have to change the background colour of a calculated field (just the cell not the whole row) in my gridview called ElapsedTime, based on the number of minutes e.g > 30 mins background is red.I have already done something simliar for hours..I have succesfully written a sql statement that calculates elapsed timeCONVERT(Varchar, (DATEPART(dd, GETDATE() - DateAdded)-1) * 24 + DATEPART(hh,GETDATE() - DateAdded)) + 'h:' + CONVERT(Varchar, DATEPART(mi, GETDATE() - DateAdded)) + 'm' AS ElapsedTimeElapsed time looks like this e.g 11h:14mI then used this bit of code to get the hourProtected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GridView1.RowDataBound        Dim et As String                ' For Each r As GridViewRow In GridView1.Rows        If e.Row.RowType = DataControlRowType.DataRow Then            et = e.Row.Cells(13).Text            et = et.Substring(0, et.IndexOf("h"))            Dim number As Integer = Int32.Parse(et)            If e.Ro

PollingDuplexHttpBinding Client Channel Faults unexpectedly after few seconds

Hello, i have a Silverlight 4 application which communicates using Http Polling Duplex to an IIS 7, .NET 4 WCF Service (actually two of them, in the same app). I am obviously taking advantage of the callback features provided by this type of solution. Setup has been performed by following these documents: Service setup: http://msdn.microsoft.com/en-us/library/cc645027%28v=VS.95%29.aspx Silverlight setup: http://msdn.microsoft.com/en-us/library/ee844557%28v=VS.95%29.aspx All has been working fine until yesterday, when i went on upgrading the Silverlight Tools for VS2010 to version 10.0.30319.352 which has also upgraded my Silverlight runtime to 4.0.50826.0 . Running my app now, after few seconds from the first call to the services, the client inner-channel faulted event fires on both proxies without an apparent motivation (exception, user interaction, etc.). What i have been able to notice, by analyzing connections with Fiddler, is that as soon as the open connection to the service which holds a callback channel receives a response, the client-side proxies fail. I'll try to show how the HTTP connections appear to behave: Call to the first service, callback channel retreived, immediate response 200 OK, no content Call to the second service, business logic performed, immediate response 200 OK, no content Call to the first service, no response for a few seconds, response 200 OK

Grouping Records into buckets of 15 minutes ....

Hi, Let's say I have a table with the following fields: [Id] [UpdateDate] [Group] Now for one day starting from 00:00:00 to 23:59:59 Let's say I want to plot how many records exist for each group / type in the last day, BUT I want to count these groups in 15 minute intervals. How would I best structure a T-SQL (SQL 2008) query to do this? Example Results: 00:15:00    Group 01 = 211; Group 02 = 289 00:30:00    Group 01 = 205; Group 02 = 233 00:45:00    Group 01 = 200; Group 2 = 267 etc.      I.W Coetzer

.NET Framework installations take 30 minutes on XP 64

We install .NET FW 1.1, 2.0, 3.0, and 3.5 (and patches that are part of the 3.5 download) using msiexec and wusa (/quiet /norestart). The total installation time for all .NET Framework versions is 30 minutes on Windows XP 64-bit: .NET FW 1.1: 2 minutes .NET FW 2.0: 5 minutes .NET FW 3.0: 10 minutes .NET FW 3.5: 8 minutes .NET FW 3.5 patches: 5 minutes Vista 64-bit only takes 3 1/2 minutes for .NET FW 3.5 and 1 patch. Why does XP 64 take 10 minutes for the same operations?Is there anything that can be done to speed up these installations?

Error: The replication agent has not logged a progress message in 10 minutes

Hello,      We are consistently getting the error message below on our subscribers that have blob images. Is there a way to increase a setting to avoid SQL to throw this error, or another suggestion? Thanks in advance.   John   Error messages: The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active.   18 -BcpBatchSize 10000018 -ChangesPerHistory 10018 -DestThreads 218 -DownloadGenerationsPerBatch 518 -DownloadReadChangesPerBatch 10018 -DownloadWriteChangesPerBatch 10018 -FastRowCount 118 -HistoryVerboseLevel 318 -KeepAliveMessageInterval 30018 -LoginTimeout 1518 -MaxBcpThreads 218 -MaxDownloadChanges 018 -MaxUploadChanges 018 -MetadataRetentionCleanup 118 -NumDeadlockRetries 518 -PollingInterval 6018 -QueryTimeout 40018 -SrcThreads 218 -StartQueueTimeout 018 -UploadGenerationsPerBatch 318 -UploadReadChangesPerBatch 10018 -UploadWriteChangesPerBatch 10018 -Validate 018 -ValidateInterval 60   Due to the memory leak issue with respect to replicating blobbed images we have changed UploadGenerationsPerBatch to = 3.

filtering by minutes and hours

guys, is there a way where i can filter my data based on the minutes and hours ie i already have the start date and end date.. i need to filter by the time as well. any help?

Get Difference between two dates as Hours, Minutes



 I am using the below query to get difference beiween two dates in hours and minutes.Minutes part look ok but the hours is incorrect.

 select datediff(minute,LastDate,getdate()) as "Minutes", datediff(hour,LastDate,getdate()) as "Hours"from emp.

 Note: Using SQL Server 2005


How can i show the seconds in the timer as minutes and seconds?


Im using a timer to countdown seconds. The value of the int is 1200000.

Instead shoing 1200000 and then 1199999

I want to show it as minutes and seconds.

Not the same format like DateTime.Now but something like that a forma that will show minutes and seconds and that will count the seconds back and when a new minute so it will count one minute down and so on.

Like: Minutes left: 7 Seconds: 55 for example.


This is the timer code where i want to show better format:




How to Get Total Minutes From Hours in SQL Server 2005?


Hi All.........!

I have 10:45 Hours and Now I want to get Total Minutes Like 645 Minutes.

How Can I Get in SQL Server 2005?

Please Help Me................!

Thanks in Advanced..............!

find files older than 15 minutes


Can someone please provide me with an example in vb.net of how I can delete a files that was created more than 15 minutes ago? I've been looking on google but can't really find a clear example.I think I need to use FileSystemInfo.CreationTime but not sure..If someone

could get me started I'd appreciate it ...Thank You 

The TimeSpan could not be parsed because at least one of the hours, minutes,.....


One of my users is getting the following error:  

The TimeSpan could not be parsed because at least one of the hours, minutes, or seconds components is outside its valid range.

Here is what I have pin pointed it down to:


cmd.CommandText = "InsertExportPairing";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("@pn", SqlDbType.VarChar, 50).Value = pairing.Number;
        cmd.Parameters.Add("@pt", SqlDbType.Time, 7).Value = pairing.FlightTime.Insert(2, ":");
        cmd.Parameters.Add("@date", SqlDbType.Date).Value = DateTime.ParseExact(pairing.Date, "MMM dd, yy", CultureInfo.InvariantCulture);
        cmd.Parameters.Add("@uid", SqlDbType.Int).Value = userID;
        SqlParameter outParam = cmd.Parameters.Add("@newId", SqlDbType.Int);
        outParam.Direction = ParameterDirection.Output;


Difference between 2 times 6:00 Hours - 5:50 hours is 10 minutes i.e 0.10 How to do the same in SSRS


Hi I have a report where I have to get the employees absence hours, i.e if there are 8 hours in a day and the employee worked for 5:50 minutes then the difference would be calculated in time.... Please also let em know how to calculate absence hours if the working ours are null as its not showing any value for absence column

WorkingHrs    HoursWorked Absencehours

8                       5.10              2.50

8                        Null              Null

I have query that I have written to get the absenceHours= WorkingHrs - HoursWorked

Please help I feel its a simple query but kinda confused with it. Thanks.


4 gig log files in 2 minutes?

I am having an odd and very frustrating problem that just started showing up  two days ago.

I am starting to receive log files in my MOSS 2007 server:

10/23/2008 14:33:08.99  OWSTIMER.EXE (0x1E60)                    0x1570 Windows SharePoint Services    Timer                          5uuf Monitorable The previous instance of the timer job 'Application Server Timer Job', id '{C455141D-FE86-49BB-88CC-9691AC63AF39}' for service '{5C4ADEDE-0FC5-47ED-8DA7-8BF3DD989A5D}' is still running, so the current instance will be skipped.  Consider increasing the interval between jobs. 

these errors repeat themselves over and over in the log file and as a result the log file is balloning to hundreds of megs.

and in my event viewer i'm getting errors that look like this:

Event ID 17310

A user request from the session with SPID 71 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.

however the SPID seems to change every couple of seconds.

my log files went from about 28 megs to a couple hundred meg.  and out of the blue there appears a log file that balloons to over 4 gig in a matter of minutes.  it is so large that it tries to take up the remai

User Being Asked To Log In Again After Approx 20 Minutes


Dear All

I have a web application that uses forms authentication, memberships and roles. I'm finding it difficult to test but it looks as though the application is forcing my users to log in again after about 20 minutes of inactivity. However, the nature of my application requires users to stay logged in for longer than this even if they aren't using the application constantly.

I've already set the following line in my web.config file so that doesn't seem to be making a difference:

<sessionState timeout="60"/>

Is there something else that I need to set to prevent my users from being redirected to the login page too early on? I'd like them to be inactive for about an hour before forceably logging them off. I don't want them to lose their work if they don't use the system for 20 minutes.

Please can you help me?

Many thanks



Session timesout inspite of setting it for 45 minutes


Dear All,

I am using the "Inproc" mode of setting  session state to 45 minutes but still the session times out after 10 or so minutes.


Following is the setting included in the web.config:


<sessionState mode="InProc" cookieless="false" timeout="45"/>


Any co-operation in resolving this will highly be appreciated.





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