Send simple data from wp7 to winforms application - winforms

I want to send simple data (geolocation data to be precise) from Windows Phone 7 application to a windows forms application and use it, as I'm a total beginner in this field I don't know which tools to use.
I searched about wcf services and tested this method but there's some issues: the data is sent from the phone application but isn't sent to the winforms application (guess something is missing)
If your know how to do this in a quick way, or have good tutorials I'll be thankful.
EDIT
I found this tutorial, it show how to connect directly wp7 application and desktop application without using sockets neither wcf service, I'm wondering if it is really works if the application isn't in localhost.
the like for the tutorial: wp7 tutorial

I had a similar problem and so I created a REST/JSON WCF service hosted in IIS with AppHarbor to provide the data. There's hundreds of ways to do it (Ruby/Heroku, etc..), but that particular one fits well within the Microsoft stack. I also needed to share route data and I used the WCF service to wrap the BingMaps services so that route computations are cached and shared. Considering that I had already created a local model, moving it out of my phone project into a service took less than a few hours (including the usual config hiccups, and forgetting to add the appharbor user to my bitbucket repo).
Consuming the service from WinForms (or any client) shouldn't be an issue as the service knows nothing about the client implementation.
Here's a tutorial from code project. REST WCF Service with JSON

I think you would need to implement some sort of server side solution which you could upload to on your Windows Phone and download from on your Windows Form application. This could be achieved using a WCF service which was connected to a server side database.

Another option would be to use sockets and communicate directly with your WinForms application. Check this tutorial on how to use basic sockets on WP7.

Related

What's the best way to send event notifications from a Winforms server application to a Blazor client application?

A few years ago I was instructed to build an Windows Desktop application to control several devices, add and check data from a local database among other stuff. At the time the answer was very simple and I decided to create a WinForms application that provided a solution to the request, the app would control the devices, it would store data in a local database and it would show the data in it's UI.
Even though it worked perfectly for a while, the project has now expanded a lot, to the point were it consists in several projects including two REST API services working on different servers as windows services, a Xamarin Android and iOS apps that access those servers and some other stuffs. Obviously, my dicision of not separating the original Winforms server application's UI from the server stuffs has kick me in the rear. Another problem is that the solution has been working for a long time and the client does not want to give me much time for updating (which by the way it would probably require to rethink everything) so he want me to give him a fast and simple solution to the problematic server - client scheme.
So again I decided to try a fast solution (probably not the right one, but its a matter of time) and created a Blazor app that connects to the local database and it would work in the same server where the winforms app is, guaranteeing that none one will touch that app.
The problem now is that I need a way to show real time notifications in the blazor web UI and update its datagrids, etc., when the winforms app receive an event from one of the devices. At first I thought of SignalR, being the blazor app the server for SignalR and the winforms just a client, but I have no experience with it. Although if SignalR is the answer I'll deal with it.
So, the question is: which is the best way to send real-time event notifications from a winforms application to a blazor app?
Thanks in advance

What technology to deploy RESTful Server with SQL+COM capability

We're developing a cloud based web application for customer management. One of the main goals i the capability to connect to different local applications on the customer endpoint.
As example, we don't want to have a customer database in out application, the customer should be able to search within his local ERP system right away.
What we need is not much. Only a client on the customers server with access to the local SQL server as well as the COM model.
But as webdevelopers and mainly going with PHP the question came up, what technology we should use?
I've got two approaches in mind:
NodeJS
Lightweight, Javascript and with the Express and winole32 extension we should have everything we need. But the deployment and installation as a service seems to be a bit wacky.
C# .Net Web API
Also a good approach I guess since the client servers are allways windows. But is there a way without IIS?
Or do you have something completely different in mind? It should be very fast and compact. So its basically just a RESTservice that can be deployed with ease.
Thanks for your inputs and thoughts.
C# .Net Web API Also a good approach I guess since the client servers are
allways windows. But is there a way without IIS
It is called OWIN and it is properly documented (web api self host is a good keyword) and works like a charm. Using that on various services to expose an API into the service.

Real-time messages notifications with WPF + WCF

Hey I'm trying to upgrade notifications service that uses task polling to see if there are new messages for a given interval.
My client is a WPF application and WCF in the server side.
I have 2 application servers with windows server 2008 r2 and load balancer between them.
I thought of implementing it with WCF Duplex binding and noticed it will be a problem to manage my users in 2 service instances (since I can subscribe user only to 1 service).
The trigger for sending messages is when data is manipulated by a user and is related to other specific users.
Another important point is that we plan to scrap our wpf application and revise our front end as web project (with angularjs probably..) and our backend from wcf to .net web api.
I read a bit about push techniques and came to this conclusion:
SignalR - the thing is, how will it work with web? (angular.js instead of asp.net)
Wamp - didnt find much about it but it looks promising
Websockets
.NET implementation (requires IIS 8 which means upgrading our servers)
socket.io - simple and great documentation and community. but I'm not familiar with nodejs.
What are your thoughts about how to implement it?
Thanks, Bar

How to Load Test wpf application that uses WCF web services to communicate?

I need to find out the performance of my application.This application works as follows-
It's a WPF windows application, which requires some data to be filled by user
On clicking Submit button, it calls WCF web services
These services save these values in DB
Which tool would be the best for this scenario?
For automated load testing you probably need two things:
A database server with data in it. There is a question regarding generating test data: Creating test data in a database
You can use the UI automation framework to simulate user input in your WPF app.
Then setup your server and run as many clients as you want to see when it falls over.
There are a couple of excellent tools. Telerik has a good tool for profiling both a .NET windows application as well as a WCF service. I've also found that JetBrains has another excellent profiler. I've used Jet Brains to profile, WCF code as well as windows applications. If you're app communicates over HTTP. Fiddler could be another good

Call a WCF from only my silverlight application

I have a WCF.
I have a silverlight application.
I do not want anyone to be able to call the WCF except the Silverlight application.
I do not want to install any certificates on the client.
I do not want to hit any databases.
What would typically be the best way to do something like this?
You can address this using a cross domain policy file. Silverlight cannot connect to WCF services hosted on secondary domains without the implementation of this policy file.
Here are two links to get you in the right direction
http://msdn.microsoft.com/en-us/library/cc197955%28v=vs.95%29.aspx
Tim Heuer has a good writeup on the implementation of this file as well.
http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx
To prevent a WCF services from being accessed by other applications you will need to implement authentication of some sort Here is a related post

Resources