I have a silverlight4 application which needs to call and be called back the wcf services self-hosted in a local windows-form application.
I wanna use the net.tcp protocal to achieve the duplex communication but encounter cross-domain problem.
It's easy to find solutions of the cross-domain problem but most of them is for the IIS-hosted WCF services.How to solve the cross-domain problem of a net.tcp WCF Service which is self hosted in a local windows-form application?
The solution is listed at the blog post at Enabling cross-domain calls for SL apps on self-hosted TCP services. Basically, if you have IIS installed on the machine you simlpy drop the cross-domain file for TCP in the root. If not, you can use the same self-hosted WCF service to serve the cross-domain file at port 80.
Related
I want to create a WCF Rest Application using NserviceBus and also i want use SQLServer transport.
Kindly help me ..Give me some Proper Code
NServiceBus V5.x - SQL Transport V2.x
The following sample shows you how to setup the SQL transport:
https://github.com/Particular/docs.particular.net/tree/master/samples/sqltransport-nhpersistence/Version_2.2
Hosting in IIS
NServiceBus can be hosted in IIS without any issues. Especially with a central broker transport like SQL, RabbitMQ, Azure Storage Queues or Azure Service Bus.
http://docs.particular.net/nservicebus/hosting/#self-hosting-web-hosting
NServiceBus can be hosted in any web technology that support .NET. This includes:
ASP.net
ASP.MVC
WCF
Web API
NancyFX
And many others.
As most web technologies operate in a scale out manner NServiceBus is usually hosted in a "Send-only" manner. In this mode they act as a "forwarder" of messages rather than the "processor". So the handling code (MVC controller, NancyFX module etc) of a given web request simply leverages the Bus send APIs and no processing is done in the web process.
Hosting in IIS does have some concerns as application pools by default don't startup automatically and can be recycled or even stopped. Any messages send to such an IIS hosted endpoint will not be processed until the application pool is started again.
MVC
The following samples demonstrate how to initialize NServiceBus and how to use it from MVC
http://docs.particular.net/samples/web/asp-mvc-application/
http://docs.particular.net/samples/web/asp-mvc-injecting-bus/
I have read up on the Cross-Domain policy from here. How do we get it to work while testing on localhost, or is this not possible?
It's not possible. Silverlight client application should try to call service hosted in different machine from web-site that hosts Silverlight app.
I have an integration test suite in silverlight that requires an http server and a socket server.
What I've been thinking to do is to control the suite from silverlight through a WCF RIA service.
I would like to know how to start those servers (They are already coded in c# and can be run seperately) whenever the WCF service starts?
IF the WCF service is hosted in IIS ASP.NET, you can use Application_Start in Global.asax to trigger starting the other services.
If you host the WCF service in a console app or Windows service, then of course that is where you would call the code to start up those external services.
Can someone post some configuration tips or settings on running silverlight that connects to an embedded ria service in the website under https.
http://blogs.msdn.com/b/kylemc/archive/2010/05/26/ria-services-using-https.aspx
We currently have a silverlight app, one that uses "vanilla" wcf services and one that uses WCF Ria Services.
We publish the application via a citrix access gateway (secure web proxy).
The SL app that accesses the WCF Service works fine, but the RIA one fails with a ton of "response invalid" errors.
If you browse to the service url of either service (using the citrix url), then you see the WCF Service description fine.
Does anyone have any idea of any special config needed to enable WCF RIA Service apps to work over a Citrix Access Gateway?
Can you change the endpoint of the WCF RIA client proxy? Because I suspect it is trying to go to http://your.website.com/yourApp/yourService.svc when it really needs to go to http://your.website.com/cvpn/BIG_HASH_HERE/yourApp/yourService.svc. I have had to jump through some hoops to explicitly support the Citrix Access Gateway in a Silverlight app that I am working on at the moment (will come back later and possibly elucidate further when I have reviewed the code).