Problem Publishing WCF Ria Application Over Citrix Access Gateway - silverlight

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).

Related

How to secure database access in mvc web application

I am developing a web application in ASP.NET MVC, iOS and Android app using Xamarin that would have a common SQL Server database. I would want to develop a common layer/object that will have functions and methods common to all applications. I am also concerned about database security. I would want understand is there any other way in which this can be achieved.
I planning this roadmap :
I will develop web service or WCF services and host on a server, applications will communicate with these services and services will communicate with DB server.
If I develop web service or WCF service and host on a server, I want to prevent direct access and attack.
Which is better for my applications, web service or wcf service?
Masters please guide me.

silverlight duplex communicates with self-hosted wcf services cross-domain problem

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.

WCF RIA Services Class Library and Deployment

Following the walkthrough at http://msdn.microsoft.com/en-us/library/ee707351(v=VS.91).aspx I have a working Silverlight solution that employs a WCF RIA Services Class Library. I am now stuck on how to deploy this to a production server.
In a previous project (not using RIA services) that used a standard WCF Class Library I had to create a seperate web application to host the services. When it came to deployment it was obvious that I needed to deploy both the front-end (Silverlight hosting) web app and the server (WCF hosting) web app and everything worked well.
With the WCF RIA Services Class library solution there is only one web app in the solution. I am presuming that since the solution works in VS, the service is somehow being hosted in the same web app that was created for the Silverlight front-end but this is not visibly clear. Anyhow, I deployed the application using Web Deploy (as I have done other apps before) but it does not work. I didn't really expect it to!
Can anyone point me in the right direction?
When you link the .web RIA class library projects to your main web project, the services are accessed behind the scenes by URLs like:
http://localhost:2911/ClientBin/RiaServices-Documents-Web-DocumentDomainService.svc/binary/GetDocuments?$take=20&$includeTotalCount=True
The client RIA class library projects just assume a relative URL (relative to the hosting project), so they will work in any Silverlight application.
The only requirement is that you link the RIA service ".Web" project to the website hosting your Silverlight app. That will place the required service relative to the clientbin folder, ready to be consumed.
I had not installed RIA on the IIS Server because I received a message that led me to believe that you couldn't do it. However there is a command prompt command to do a special Server install see here msdn.microsoft.com/en-us/library/ff426913(v=VS.91).aspx. It now works by simply deploying the Web project.

How to perform operations upon a WCF service creation?

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.

Adding service reference for Silverlight Application with WCF services

Im totally new to WCF. Trying to create a Silverlight application with WCF services.
Im not sure what address to fill in for adding the service reference for the client side.
Also, what do I need to specify in the Web config file in the server side?
Thanks.
There are a few different kinds of WCF Services. WCF Services, WCF Data Services & WCF RIA Services. For a bit of background on these types/kinds check out this forum entry.
If you are using just WCF Services, here's an intro and a sample and another sample that should get you going. :-)
Here's a great overview from Shawn Wildermuth on creating a WCF Data service & consuming it in various ways.
WCF RIA Services are specifically built/optimized for Silverlight. If you are in control of the Service as well you might want to look into creating a RIA Service instead of just a WCF Data Service. Here's an intro to RIA Services.

Resources