WCF RIA Services Class Library and Deployment - silverlight

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.

Related

How to deploy a Flask+React application to Azure Web Service

I have been working on this app on my localhost, which has Flask as the backend (localhost:5000) and React as the front end (localhost:3000), and they have been communicating well. Now I am supposed to put it up online so that other ppl can see it as well - I didn't have much experience in Azure, but how can I deploy these two components(React&Flask) into one URL on Azure web app service? (Before I had some experience in using FTP to upload the 'build' folder to a "site/wwwroot" folder to put up a simple React app without any backend)
Newest
After testing, the python project is deployed in the webapp, the react project is deployed in the virtual application, and the normal node project is also deployed in the virtual application.
Deploy the flask python project to the windows environment, the normal deployment method will fail, please be sure to follow this blog document (third-party document) to operate, it works for me.
Running Flask app with HttpPlatformHandler in Azure App Services
The effect is shown in the figure. You can see that the normal node project can be accessed normally, but the react project is not. I think there are some bugs. (Has raised a support ticket to confirm)
The deployment method of virtual application is recommended to adopt the publishing method shown in the figure below.
Privious
It is recommended to choose windows when creating azure web app, because windows supports virtual application.
We can deploy flask app normally and deploy react app in virtual app.
Under normal circumstances, the process.env.port of the two webapps is the same and will not interfere with each other because of the virtual path.
Reference post:
1. Vue Frontend and Express backend on same Azure web app Service
2. Azure Front Door Is Not Maintaining Custom Domain in Browser

Service to update WPF application placed on server

I am developing a WPF application, which will be accessed from shared folder on server (Windows Server). My goal is to implement some mechanism of updating the app. The updater should be run on server probably as some kind of service. Which mechanism/technique would you recommended to use?
Based on your comment, I would look into using ClickOnce.
ClickOnce enables Web-style application deployment for non-Web
applications. Applications are published to and deployed from Web or
file servers.
https://msdn.microsoft.com/en-us/library/t71a733d(v=vs.140).aspx
You can also use Squirrel.
Squirrel: It's like ClickOnce but Works™
https://github.com/Squirrel/Squirrel.Windows

Share WCF RIA Services Library between Silverlight Applications

I have:
- some count of Silverlight Web applications, hosted on different IIS virtual directories.
One Application has WCF RIA Services, which part of functionality I want to share between all these SL applications
How to do this?
I have idea to create WCF RIA service library, which referenced to WCF RIA Services host and have needed functionality to clients. But If I will create references to this DLL from my different solutions, how this DLL (WCF RIA Services Library) known, where address (endpoint) of this WCF host?
For example, WCF RIA is hosted on http:\webapps\UserManager
and SL aplpication is hosted on http:\webapps\ClientApp
There is no spoon... and there are no fully-qualified Endpoints with RIA services by default...
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.
To use a RIA service from another location, other than the hosting website, you need to specify the service Endpoint manually in the DomainContext constructor:
DocumentDomainContext d = new DocumentDomainContext("http:someotherserver:1234//ClientBin/RiaServices-Documents-Web-DocumentDomainService.svc");
(I do not know how to do this for a Domain Data Source).

Problem Publishing WCF Ria Application Over Citrix Access Gateway

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

Is it possible to host the clientaccesspolicy.xml file with the ASP.NET Development Server?

I have a solution with two service projects (one is hosting a unit test silverlight application and other is providing the services being tested). Because of cross-domain policy, I have to publish the primary service site to IIS before the unit test site can consume a service.
Is it possible to host the clientaccesspolicy.xml file on ASP.NET Development Server so I can run these without needing to do an IIS publish first? OR, does Visual Studio provide a more elegant solution?
I don't know of a "more elegant" solution, however you can serve a clientaccesspolicy.xml file from a ASP.NET development server, its after all just a static file. Just add it to the web project as a Content file.

Resources