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


Post New Web Links

Is WCF Duplex Service scalable?

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :WCF
 
Hi all, I would please like to know if the WCF Duplex service can be used to push data e.g. realtime prices to thousands of silverlight clients. I have read this article (http://dotnetaddict.dotnetdevelopersjournal.com/sl_polling_duplex.htm) that says that it isn't scalable. I know there are several commercial platforms as described in this article (http://blog.programmableweb.com/2010/09/14/client-push-services-open-up-real-time-to-everyone/) that can provide real time push services but I'd like to know if there are any other options I could consider other than using a commercial platform? Thanks.


View Complete Post


More Related Resource Links

Duplex communication and calling clients from outside the hosted service

  
Hey,   I am currently building an interface between two applications: One that hosts a WCF service and receives external input (e.g. from a sensory system) and another which subscribes to updates sent by the first.   It is quite easy to call back to the client if I create a ServiceHost and provide it with an instance of my service (using ServiceHost.SingletonInstance). However, if I use a PerSession instance mode, how is it possible to call the clients when I receive an updated from the external sensory system?   Thank you for your time!   Cheers, Till

Problem in consuming WCF duplex service 4.0 in web application developed in 4.0

  

I am facing an issue in consuming WCF duplex service (WCF service library) 4.0 in c#.net web application project developed in 4.0 framework.

I have defined a callback contract with one callback function in WCF. When this callback function is called from my service implementation, the client application crashes and closes abruptly.
If i remove the callback implementation from WCF, everything works fine.

I tried changing the framework for client to 3.5 from 4.0 and to my surprise the callback works perfectly. I am not able to get why callbacks are not working in 4.0 framework.

Would appreciate help on this issue! 

Source Code:

 

Interface:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WCFDuplexServ
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract(CallbackContract = typeof(IClientCallback))]
    public interface ITemperature
    {
        [OperationContract(IsOneWay = true)]
 

Problem in consuming WCF duplex service 4.0 in web application developed in 4.0

  

I am facing an issue in consuming WCF duplex service (WCF service library) 4.0 in c#.net web application project developed in 4.0 framework.

I have defined a callback contract with one callback function in WCF. When this callback function is called from my service implementation, the client application crashes and closes abruptly.
If i remove the callback implementation from WCF, everything works fine.

I tried changing the framework for client to 3.5 from 4.0 and to my surprise the callback works perfectly. I am not able to get why callbacks are not working in 4.0 framework.

Would appreciate help on this issue!

 

Source Code:

 

Interface:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WCFDuplexServ
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract(CallbackContract = typeof(IClientCallback))]
    public interface ITemperature
    {
        [OperationContract(IsOneWay = true)]

Duplex workflow service, chat, IM application

  

I need to create service that can handle clients connections and administrator connection.The clients that connects to service are handled by Durable duplex, so the service can send commands to clients in any time when client is connected. When some client connects, the service should add its callback to clients collection. Then when administrator connects to service he should be able to send some commands to clients. I have created a workflow that is on the image below. In that workflow there is a problem because any time when the new connection is initialized the client variable is reseted to its default value. How to create static/global variable, or solve a problem in some other way?

http://img820.imageshack.us/img820/2346/workflowservice.jpg



Http Help for duplex WCF service

  

After reading http://msdn.microsoft.com/en-us/library/ee230442(v=VS.100).aspx I couldn't get this to work for my service.

Is it possibe to accomplish this for a duplex WCF service? In my case it's a service with a wsDualHttpBinding endpoint. When I add the binding behavior to this endpoint and do a rpc from my client, it throws a CommunicationException: "Security negotiation failed because the remote party did not send back a reply in a timely manner. This may be because the underlying transport connection was aborted." My (partial) web.config: http://pastebin.com/nRa62RLC I also tried to add a wsWebHttpBinding, but afaik this endpoint breaks the service because it's incompatible with a contract that has a callback contract (ie. a duplex service). So, that didn't work either.

Any suggestions on this matter are greatly appreciated.

Thx in advance.


Duplex WCF Service runs into NullReferenceException

  

This question grew out of http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/3ebbca54-5ebe-4ca3-a014-18036786982f (Duplex WCF Service - How to have it wait before doing the callback) but is logically independent.

A zip file is available at http://rad129.net/SRacq10.zip; it contains one VS2010 solution with two VB.Net projects. In order to show the problem succinctly, they are greatly condensed versions of my actual projects.

Project SRacq10 is a Windows Forms app that provides a duplex WCF service in file SU_ProvidesWCFservice.vb. The constructor of SU_MDI.vb starts the service.

Project TestSRacq10 is also a WinForms app; it contains the client: file SU_ConsumesWCFservice.vb has the definitions. The code in frmTSU sends commands and receives messages, and logs what's happening to RichTextBox rtbLog.

To make endpoint http://localhost:8080/Raad10/SU_WCF accessible, I have to run netsh in a command window similar to:
netsh http add urlacl url=http://+:8080/Raad10 user=mycomputer\myuserid

After opening the solution in VS2010, and possibly rebuilding TestSRacq10, run TestSRacq10.exe, say, from Win Explorer.

Now run SR

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.

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

Web Service for uploading documents into SharePoint

  
WS UploadService is a web service written for Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 and is meant for uploading documents into SharePoint. I have just uploaded the zip file to GotDotNet.com so it will take some time before the zip file appears in the list of downloads. For the time being, you can download the zip file from the following location

Creating and Using an ASP.NET Web Service in Visual Web Developer

  
In addition to letting you create Web pages, Microsoft Visual Studio also lets you create Web services that use ASP.NET XML. Creating a Web service in Visual Studio is similar to creating a Web page. You can also use the Microsoft Visual Web Developer Web development tool to reference and use Web services that are in a Visual Web Developer solution, on your local computer or in a local or external UDDI directory. In this walkthrough, you will create the Web service in one solution and use it in another.

Tasks illustrated in this walkthrough include:

Creating a simple XML Web service in Visual Web Developer.

Creating a separate Web site that uses the Web service.

AutoGenerateSelectButton="False" ignored when using Domain Service

  

Crosspost from RIA Services forum: http://forums.silverlight.net/forums/t/196466.aspx

I'm creating a Dynamic Data application in VS2010 and have recently switched to using a Domain Service to give greater control over the data presented to the client. I've noticed that the AutoGenerate<Action>Button attributes on my GridView are being ignored. The presence of the Edit and Delete buttons appear to be contingent on the existence of Update and Delete methods on the partial classes autogenerated in the Domain Service, but i'm not seeing how to control the generation of the Select button. Is there a way to control this from within the Domain Service class?


Any framework for creating a job scheduler service?

  

Just curious to know if there was any official Microsoft code blocks, classes, or such for writing a service that runs other assemblies or WCF services?  That can be configured easily from a web page, pre-coded, for running tasks at certain times on certain recurring intervals?  I've already built one but am open to anything done better- which I'm sure there is.  Thanks!!!


Convert WCF service to self hosting application

  

 I created project as a  WCF Service application and now according to recuriment that needs to be converted as a self hosting application

How can i do this?

Converting WCF service app to Self hosting app?


Error : Polling duplex in WCF DotNet4.0

  

We are making sample polling duplex in .net 4.0.

when ever we are  binding this tag in web.config it shows below error.

<bindings>

      <pollingDuplexHttpBinding/>

</bindings>

Warning    1    The element 'bindings' has invalid child element 'pollingDuplexHttpBinding'. List of possible elements expected: 'basicHttpBinding, customBinding, msmqIntegrationBinding, netPeerTcpBinding, netMsmqBinding, netNamedPipeBinding, netTcpBinding, wsFederationHttpBinding, ws2007FederationHttpBinding, wsHttpBinding, ws2007HttpBinding, wsDualHttpBinding, netTcpContextBinding, wsHttpContextBinding, basicHttpContextBinding, mexHttpBinding, mexHttpsBinding, mexNamedPipeBinding, mexTcpBinding, webHttpBinding'.    D:\DuplexTest\TestPollingDuplexWcf\TestPollingDuplexWcf\TestPollingDuplexWcf\Web.config    9    8    TestPollingDuplexWcf


WCF Data Service to JSON example? v4

  

I would like to take WCF Data Service and produce JSON output to consume on various mobile apps.

Can anyone give me a how-to on the JSON part?  I.e., what is different than normal XML outut?


Thanks.

 


Problem to obtain client IP on web service

  

Friends,

I'm having problems to obtain the client IP on web service. Here's my scenario:

One server with Windows 2003, hosting the web service using .Net Framework 2.0, with IP 10.0.2.50 and host name ServerTransaction.
Other server with Windows 2003, hosting a web application using .Net Framework 2.0, that consuming the web service on  ServerTransaction, with IP 10.0.2.51 and host name ServerApplication.
Many other computers on the local network (IPs: 10.0.2.80, 10.0.2.81, 10.0.2.82, ...) acessing the web application on ServerApplication.

On the code of the web service I've tried to use HttpContext.Current.Request.UserHostAddress or HttpContext.Current.Request.ServerVariables("REMOTE_ADDR") or HttpContext.Current.Request.ServerVariables("HTTP_X_FORWARDED_FORR"), but always I can only get the IP of ServerApplication (10.0.2.51).

Any idea or tip?


Thanks and sorry for my bad english.


Categories: 
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