I am a beginner in Silverlight. I have developed a Silverlight chat application. In a single Silverlight window open more than one chat windows every chat window create a connection with wcf service but when it reaches 10 then the application is stop working and break all communications from wcf polling duplex service. I already have configured my wcf service web config file with :
<serviceThrottling
maxConcurrentCalls="10000"
maxConcurrentSessions="10000"
maxConcurrentInstances="10000" />
but it has no effect. Do I need to set these settings in silverlight application also? Please hep me. How is it possible to load thousands of chat windows on a one client side.
Thanks
The web browser will only allow so many connections to a web server. There are reg hacks/settings hacks for browsers to modify how many connections. I would rethink your chat window gets it's data from the WCF service. For instance, maybe you send all chatroom data down one wcf client, and have your application send them to their constituents UI.
Related
I've gone through some tutorials on creating a WCF service. I'm using Visual Studio 2012. I got a very simple WCF Service Library (vb.net) and Windows Application (vb.net) communicating via WCF. That's a start.
However, my project requires I do the following:
My Windows Service - This is already an application that has it's tasks.
My Application - This is an application that is already developed as well.
I need the service to talk to the application. The service will need to send the following information to the windows application:
Status Updates
Metric Information (mostly integers for counts)
I need the application to send information to the service. It would need to send:
Reload Configuration command
Should be relatively simple, but I've never worked with WCF until today. So I have some questions...
Do I need to re-work my current windows service into a WCF Service?
Since it won't be in IIS, do I also create a WCF Service Library or do I roll this into the windows service somehow?
What is the best way to set up the different types of communication? (i.e., sending over specific metrics and reload commands)
Probably the main question is what components, in addition to my current windows service and application, will I need to make this work?
I hope that was clear :( I think I'm confusing it all... but I hope not
Your Windows service can host the WCF service. Similarly, if you want, your application can host a WCF service. The application could talk to the WCF service in the Windows Service, and the Windows Service's WCF could talk to the one in the application. Depending on the nature of the communication, you could also just use a callback channel to permit the Windows Service's WCF to call back to the application.
I suppose you should configure your WCF windows service to use named pipes. If your windows service is already built then the easiest way to do it would be to build another one as a WCF windows service and wrap the already existing functionality.
Hope I helped!
I’m very new to SL and was from ASP.NET and WPF back ground. I wish to ask couple of question which may be very basic for you guys... Please feel free to consider this and respond with sample code / Link.
Let me define my current situation.
I have an enterprise application in finance domain which is built in WPF, WCF and SQL 2008. All my smart client WPF communication routed through a distributed environment via
WCF. It has customized behaviors, bindings, SSO etc.
Now my question is, I’m in process of building a POC in Silverlight to connect to the SQL server db via the same existing WCF service. Will that be possible? If so, how?
Here is my service end point sample which is being consumed by WPF smart client application
<endpoint address="http://my IP/Application/TestService"
binding="customBinding"
bindingConfiguration="httpCompressionBinding"
contract="ITestService"
name="WSAddress"
behaviorConfiguration="FullyAuthenticatedNonSsoBehavior"
/>
It's possible. You (maybe) need to tune wcf configuration so SL can use it without problems (maybe create separate endpoint for SL clients without line of code).
SL as WCF client has some restrictions (WS HTTP binding is not supported, NetTcpBinding with security not supported, some response modes too ... and others). But I use it (I've created service SL admin console) to access my WCF consumed by WPF via TCP. TCP binding in silverlight client is CustomBinding. Why not? One of WCF goals is interoperability. So it can handle many different client requests in heterogeneous network.
I am currently developing a WCF duplex Service for 2 clients. The first client would be an asp.net webpage which upon receiving a posting, it will send the data over to the service. When the service receives the data, it will then AUTOMATICALLY send it to the second client which is a winform app through the callback channel...
To make it simpler.
Asp.net will invoke the wcf
The wcf will reside on the iis server, same as the asp.net
WCF will require to send a data to the windows form application that is running on a client side. Only 1 instance of this application will be run at a time.
Your service should know nothing about the clients attached to it. Doing so pretty much breaks the intention of WCF.
A better solution might be to have your clients subscribe to "events" that your service can fire off. Or maybe the client can provide some information in their requests that indicates a service and method to call back to when needed.
I have built a Windows forms application in C# using WCF for client -> server communication. I have recently begun toying with Silverlight and built a web front end for the application which still uses the same WCF service for web client to server application. What I'd like to do is have my WCF behind a firewall on a different machine and then build an "intermediary" WCF service which would live in a DMZ between IIS hosting my Silverlight client and the WCF box.
Essentially I want to seperate the WCF service which runs my windows forms application from also acting as a webserver. Does it make sense to build this intermediary app to increase security?
Can't see how that would increase security other than forcing connections to the WCF service to go through the DMZ ... but a straight forward http proxy server would do the trick.
The intermediary becomes more useful when you have a whole bunch of services and you want to centralize things like aunthentication, message logging in a single location or if you want to do some fancy (or not so fancy) message routing such as load balancing between a few services.
I created a RoleService in my silverlight project and through that got hold of the embership/Role functionality. I am running this on a local machine and is wondering how to publish this to my website. I have 3 web applications:
My main web application where the silverlight object shoule be merged into
The silverlight project which lets me develop the silverlight application
The silverlight host application which I use for testing
In the web application (1) i have made the RoleService so that i can get a hold on my Roles. In the Silverlight application (2) I have a service reference to the service mentioned above which I consume and loads my Role data. This howecer doesnt work when i publich it online. But how do i get it to work online?
Is it because it is trying to connect to service with wrong address? If so, then you just need to propagate WCF service address to your Silverlight application through hosting web.config and start connecting to a correct service.
Let me know if this is the case, then I will share exact solution for this.