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

Top 5 Contributors of the Month
Post New Web Links

How to Reopen a PollingDuplex based WCF Service?

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :WCF
Hi! I have a basic WCF Service that disconnects users after they've been inactive for more than 5 minutes. this is done by serverPollTimeout="00:05:00" and then removing the CallBackChannel from a  SynchronizedCollection in my WCF Service. However I would like the users to be able to reconnect when they do something again. I do this on the client side by calling a ReConnect() method before sending any data to the server that looks like this:   if (ChatServer.State != CommunicationState.Opened & ChatServer.State != CommunicationState.Created) { ChatServer = new ChatServiceClient( new PollingDuplexHttpBinding { DuplexMode = System.ServiceModel.Channels.PollingDuplexMode.MultipleMessagesPerPoll }, new EndpointAddress("../Services/WCFServices/ChatService.svc")); ChatServer.OpenAsync(); ChatServer.ConnectAsync(); }   and the Connect() method on the service looks like this:     if (!clients.Any(x => x.UserName == HttpContext.Current.User.Identity.Name.ToLower())) {// The code below is being hit, so the above if statement is not flawed var newUser = new ConnectedUser { CallbackChannel = OperationContext.Current.GetCallbackChannel<IChatClient>(), UserName = HttpContext.Current.User.Identity.Name.ToLower() }; clients.Add(newUser); NotifyAllUser

View Complete Post

More Related Resource Links

Service Station: Authorization In WCF-Based Services


Windows Communication Foundation (WCF) provides an easy role-based system and a more powerful and complex claims-based API for implementing authorization in services.

Dominick Baier and Christian Weyer

MSDN Magazine October 2008

Cutting Edge: A Provider-Based Service for ASP.NET Tracing


When it comes to catching programming errors, the debugger is a developer's best friend. ASP. NET tracing, however, is a nice complement to the debugger and shouldn't be overlooked. It enables your ASP.

Dino Esposito

MSDN Magazine June 2006

SQL Analysis Service based Status Indicator

Can you help me on this error while i am trying to create sql analysis service based status indicator.. 1- I created a .odc file connection string from MS Excel 2010. 2- After that I uploaded that file to my sharepoint site data connection list. 3-  After that I Selected SQL Analysis Server Status Indicator & uploded a .odc file from data connection list. After uploading .odc file it shows an Error : Error :- "This data connection does not use encryption for the communication with the SQL Server Analysis Services server. It is recommended to enable encryption for the SQL Server Analysis Services server to help prevent unauthorized users from viewing this information." Sharepoint version :- 2010 Thanks and Regards, Faheem Ahamed

How to call SSIS Package through web service based on ASp.NET using C#

Hi All, How to call SSIS Package through web service based on ASp.NET using C#.   Regards Amit

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  

Sharepoint Claim Based Authentication Web Service issue


Hi all,

I have Configured sharepoint 2010 foundation to use claim based authentication with sqlmembership provider.

When i try to consume the webservice i get access denied error. The service i wish to consume is http://<server>:25757/_vti_bin/usergroup.asmx.

I tried to find out the issue i cannot consume the service as it redirects me to the login page. I also tried to pass the network credentials but same error. (Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

When i try to consume the same service of another web application (sharepoint 2010 foundation) it works. Only difference between the two web application is classic authentication with NTLM and other is CLAIM based authentication windows (with NTLM) / forms.


Best Regards,


Consume service based on XSD?


I've been given the task of consuming a client's web service, and all they've given me is a XSD file. I'm a little unsure how to go about doing this, as the only other time I've consumed a web service was internally and we just pulled it in as a web reference to our project.

Where do I start when all I have the XSD (below)?

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.cisco.com/services" targetNamespace="http://www.cisco.com/services" elementFormDefault="qualified">
<element name="employeeSearch" type="tns:employeeSearchType"/>
<complexType name="employeeSearchType"

Active Service Requests based on start and end date, where date is null or in range



I have FACT and DATE dimension

ServiceRequestFactID          StartDateId           EndDateId

100              20090401              20090501
101              20090501              NULL
102              20100301              20090401

       DateID              FYear     FQuarter     FPeriod
       20080401          2009        Q1            01
       20080429          2009        Q1            02


Some service requests do not have end date, which means that they have service request all the time.

Date Hierarchy:   FYear -> FQuarter -> FPeriod. (Note: the hierarchy is not till the date level)


MDX Help: How to calculate the acti

Optimizing tempdb for service broker based operations


SQL 2005 Standard.

I have an application based on Service Broker that is very very slow.

I know that service broker is based on tempdb and tried to optimize it moving on a separate disk and creating a different filegroup with new, big enough datafiles into it.
However it is still slow ..probably also due to the fact that sql server is a virtual machine with no dedicated disk.

Can you please recommend the best practices for dealing with high tempdb workload ?

Thanks !!

How to Call a .NET-based Web Service Using the SOAP::Lite Perl Library

Describes how to call a .NET-based Web service from a UNIX-based system and how to return a Microsoft .NET DataSet to a Perl array using SOAP::Lite.

Hash-based Message Authentication Code in WCF 4.0 RESTful service


What is an ideal way of implementing "Hash-based Message Authentication Code" in WCF 4.0 REST, with out putting logic inside each service operation logic?  Can you give me an example of using ServiceAuthenticationManager or some kind of service behavior to accomplish this?


Update document using claims based service


We have a document in a doc lib we need to update a field on the document.  We are using a claims based environment over the internet through ssl.  What is the best way to do this?  A rest service post?  Client side linq to sharepoint?  Any ideas/blogs/walkthoughs would be most helpful.


stop a service using http based .net remoting without terminating a process

I have a client server appliction and in this when i stop the service from the server i have to terminate the process but i dont want to terminate it  i.e closing the port without terminating the service host process

Windows Service Applications Tutorials

You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

5 GridView Themes Based on Google's Personalized Homepage (igoogle)

One of the silly features I have found that I like about igoogle is how the pages color palette changes depending upon the time of day. So as the day progresses from morning to afternoon to evening the colors on the page change as well. Like I said, I know this is a silly feature, but I like it. And I have asked around a little bit and seems like other people like it to. To get a better idea of how the colors change, here are the background images from a few of the HTML elements.

Realizing a Service-Oriented Architecture with .NET

This article is meant to be a practical discussion guide to building a .NET application in a service-oriented architecture. We will consider real-world goals, real-world obstacles, and experience-based solutions. I quickly concede the approaches discussed here are not exhaustive or infallible. This paper is focused on application development, not application integration. We will specifically consider architectural issues and component design issues.

The Potential of Web Services
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