WCF RIA DOMAIN SERVICES - wcf-ria-services

I created WCF RIA DOMAIN Services project with Silverlight 4 with entiry framework having enablabed WCF RIA . Two projects are created;silverlight and web. Project is running file on my local system. But upon hosting on web server. it shows remote server error. If there any svc file which i have to created or Domain service host it byself.I can find any service reference. is this something i have to add as .svc file.
Thanks

If the project is working fine locally and not when you deploy to a web server, the first thing to check is if the ServiceModel assemblies are installed in the GAC of the server. If they are not, then in your project, do the following...
In the References folder of Solution Explorer, locate the assemblies called System.ServiceModel.DomainServices.*, right click on each and select 'Properties'
In the Property window, set 'Copy Local' to true.
This will place these assemblies in the 'bin' directory. Then deploy the bin directory to the service.

Related

How to deploy EAR into the WAS cluster and IBM HTTP server by Monitored Directory Deployment functionality

My goal is to automatically deploy EAR file in WebSphere Application server cluster by Monitored Directory Deployment. So my deployment target is cluster. WAS version is 9.0.0.10. Everything works fine if I drop EAR file in
monitored directory for example '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/'. Application is deployed and started. But I also want to deploy that application into the IBM HTTP server(resides in the same WebSphere cell with cluster) in the same automatically process by Monitored Directory Deployment.
I tried to manually predefine deploymentTargets(cluster and ibm http server) in deployment.xml file, put it in the EAR file, and drop EAR in the '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/', but WAS deploy EAR only in cluster. As a consequence I must manually via WAS console map all modules from EAR to ibm http server, but I do not want to do it manually.
My second idea/attempt was sto create separate monitored directory for the ibm http server '/{monitored_directory_defined_in_WAS}/servers/my_ibm_http_server_name/'.
First I drop EAR into the '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/' and right after that I drop EAR in to the '/{monitored_directory_defined_in_WAS}/servers/my_ibm_http_server_name/'. Result is that the EAR modules are deployed only in to the web server, and that is not my goal.
Is that even possible by WAS Monitored Deployment Directory functionality?
Is it allowed to manually create the deployment.xml file and add it to the EAR file?
First of all installing via monitored director is not recommended in the production environments, as it lacks control.
As you correctly suspected it is not possible to install it to the cluster and web server - check Installing enterprise application files by adding them to a monitored directory.
Because you can use only one server directory, drag and drop to map
applications to combinations of servers is limited. Scenarios
requiring use of more than one server, such as mapping to an
application server and a web server, are not supported by direct drag
and drop of an application file.
However, you still want to use it, you may deploy property file into monitored directory. That property file can fully customize your deployment e.g. configuring also module to map to web server.
Check Installing enterprise application files by adding properties files to a monitored directory for more details
UPDATE
If you have issues, I'd suggest the following approach - install your application 'classically' via admin console and map it to both web server and cluster. Then run wsadmin command to extract propertes:
AdminTask.extractConfigProperties('[-propertiesFileName myApp.props -configData Deployment=MyApplication -options [[SimpleOutputFormat true]]]')
Try to use format from that exported file for your properties
I had time to run it in my environment. I have app with 2 modules inside, one module is just mapped to the cluster, other is mapped to both cluster and web server. Here is relevant part of the property file:
taskName=MapModulesToServers
row1={ module=HelloTestUI #readonly
uri=HelloTestUI.war,WEB-INF/web.xml #readonly
server=WebSphere:cell=!{cellName},cluster=!{clusterName} }
row0={ module=HelloTestWeb #readonly
uri=HelloTestWeb.war,WEB-INF/web.xml #readonly
server=WebSphere:cell=!{cellName},cluster=!{clusterName}+WebSphere:cell=!{cellName},node=!{nodeName},server=!{serverName} }
I didnt try to use that property file to deploy the app via monitored directory, but as you can see the entry is created and mapping is done via + sign that connects cluster and web server.
If you dont see the mapping to your web server, make sure you saved the changes done in the console, and then connected via wsadmin, otherwise wsadmin will have not current data.

Can Windows services be deployed from Visual Studio as easily as web projects?

I'm running an ASP.NET Core web service that's dead easy to deploy to IIS on a Windows Server using WebDeploy: Right-click the project in VS, choose Publish, done. The currently running site is backuped and then updated. Couldn't be easier.
However, Windows services are another matter. I'm taking over maintenance of a service that is currently updated by building the Release config, remote desktoping to the server, stopping the current service, renaming the folder the service executable resides in (for easy rollback in case something goes wrong), copying over the build output from the dev machine, renaming the copied folder to the service folder name so the service finds the executable, and starting the service.
Is there a way to publish/update Windows services that is as easy as running WebDeploy? I haven't found any. There's always the possibility of abusing WebDeploy and just replacing the Windows service head project with an ASP.NET head project running on IIS, but the service has nothing to do with the web and I have no idea whether there would be any side effects to this solution.
(I could of course just write a script that performs the copying etc., but a built-in VS deployment process as with web projects would be optimal. As for continuous integration/deployment, it is unfortunately not something we have ever done at my company.)

Using the Web template in service fabric produces a non-managed ASP .NET5 project

Working on a sample Service Fabric app. I created services and tested them. Now I wanted to add an API Gateway that acts as an entry point to my app...so in VS, I right-clicked on the services and chose the Web Template ASP.NET 5. It did create a regular ASP .NET 5...not managed by Service Fabric...there is no Package Root or Program.cs for example.
What am I doing wrong please? Of course, a regular ASP .NET 5 works ...but I wanted the whole app (including the gateway) to be managed by the Service Fabric.
Regards
When you right-click to add in a service it is a common mistake to select the solution root (like you would normally do) to add in another project. But, in order to add in a new fabric service (including ASP.NET 5), you have to right-click the main service fabric project (the one with the ApplicationManifest.xml) and then select Add => New Fabric Service. You will then get the dialog box where you can select ASP.NET 5 Web Api.
Right-click here first:
Then select Add => New Fabric Service:

Open RIA domain Service Not creating RiaDomainService metadata file

I'm creating a Open RIA Domain Service. My Project configuration is like this
Hpm.DomainModels
contains edml file , entities
hpm (silverlight)
hpm.Web
- Domain Services
My project is in Silverlight 5 , Entitiy framwork 6 & Open RIA Domain Services.
is it a bug? How to fix it? When I test with default project & created edml in same Hpm.Web project then It created doaminservice.metadata.cs file too when DataContract etc was there.

Deploy WEB Service Consumer module

We have recently added some functionality to our web site that requires adding a service reference to an api in an external domain. Adding the reference to a VS2008 project createed a sub-folder in the "Service References" folder and added 18 files to that folder that appear to represent the classes in the api. The api provider also had me add custom binding and client references to system.serviceModel in my web.config file.
Do I have to deploy that entire folder with its 18 files to my production site to use the web service? Does some of it get compiled into my project dll? I can find all kinds of references to deploying a service, but not what is necessary to deploy a service consumption module.
Sorry for short, but I don't have the answer for you. But you can get this answer yourself. This is the only way Iwould get the answer. Deploy it without them, see if it works. If it doesn't deploy with. If it works, then you know.
The good news is that I have to deploy absolutely no files from the project have to be deployed to the production site. Everything the web service consumer application needs gets compiled into the application assembly.