I'm totally newbie in Azure techs.
I'm finding the optimal way to migrate WinForms App (.NET 4.5) that interacts with Database managed by SQL Server 2012 to Windows Azure platform. For now DB and application deployed on single machine.
WinForms application interacts very much with DB, when it's in active work phase. Tons of transactions about 3 hours a day. This proccesses are automated and running on schedule. ("worker part"). It also has UI for administrator to manage some of DB data.
There will be also clients that make a queries to that DB from their desktop client apps.
DB already successfully migrated to Azure SQL DB. Now I wonder: what should I do with my WinForms app? For example I can deploy it on Virtual Machine created in Azure without changes, but a think it's far from optimal way. Maybe I should create a kind of Cloud Service from a active "worker part" of my WinForms app, and migrate UI management part to Web interface somehow.
One of main goals for me is to deploy "worker part" of app as "close" as possible to Azure SQL DB(maybe even like it deployed on single machine with DB), bacause of perfomance issues (much work with DB), and, as i get it, Microsoft will take a lot of money if transactions between "worker part" and DB will look like outer transactions to DB. Maybe there's a way to avoid it, and pay only for client apps queries?
What ways can I choose?
Sorry my bad english, some things are difficult to formulate for me.
When porting a Windows Forms application to Azure, you can:
Rewrite the GUI with the web role. Web role are web applications.
Move the back end code into worker role. Worker role are back end processes without GUI, which are doing some tasks(for example: image processing, update database, etc). This should be the "worker part" of app
Related
.NET framework newbie here!
If I require an ASP.NET web app and a wpf desktop app to share a database, would it be achievable simply by using the same connection string in both projects? I am hosting the website locally. Or is this an over simplification?
I understand I could develop an API and host it as a web service and then let that do all the heavy lifting for me. But if everything is hosted locally and all I'm doing is having a little fun with these technologies then this is not absolutely necessary, correct?
There's nothing preventing you from using the same database for multiple applications, just make sure your update, insert or delete commands do not cause a deadlock or data corruptions. This can be achieved in several ways, such as locking a database object before updating or deleting it.
I'm pretty new in developing pc and mobile applications that need to work with the same database.
Maybe this isn't really a question but I would be happy to get some advice from you.
I have now a vs project written in C# with a Service-Based Database. I want to create a mobile app (can be only for android) and I want both the apps to use the same database.
What options do I have? Windows Azure isn't free and I can't spend any money on this so even a small trial (limitless) will work here.
I was thinking using Parse..
What do you recommend?
If I understand correctly I would suggest you create some backend service - web service or web api - that both application use which in turn uses the database.
This will allow you to re-use business logic across both applications, abstract the database away so that you can make database and logic changes without having to redeploy the applications and avoid the requirement to deploy database credentials with your applications (the backend service should employ some form of authentication)
A free-tier Azure mobile services can really help with the mobile device end but not necessarily on the PC (unless windows store app), but a free-tier Azure websites instance will happily host either web service or web api
I have a project assignment from the university and want to ask you if you can show me the right approach. I'm not asking for any code or to write me something. I just want some guidelines to follow.
Firstly, to explain a bit.. I have to design and implement an Info System in .NET. It should have a Desktop App (based on Windows Forms), a Mobile App (Windows Phone 7.1) and a database (MS SQL). The idea is to have a database, hosted on a remote machine. The desktop and mobile apps should be able to connect to that database and do some stuff with it (mobile app will be only for viewing data, not modifying). The system must be multi-client - the database should be able to be accessed from multiple desktop and mobile clients at a time.
I'm ready with the GUI and it's time to do some real work. What's the easiest way to get that communication done? I thought of a WCF Service Application, which will provide the clients' access to the DB. My idea is to have the database and the service on a machine with a public IP address. The apps (desktop and mobile) will connect to that machine and respectively to the SQL through the WCF.
I saw some tutorials around, but didn't find one that shows how to make that WCF Service work with both Windows Forms app and Windows Phone app. I'm not very familiar with WCF - should I have IIS to run the service? I'm also not sure what kind of techniques I have to use on the client side to do the connection...
Is this approach rght? Can this be done in the way I explained? What should I be aware of? I will appreciate every kind of advise and reproach.
The easiest (and in your case, most efficient) way would be to use Windows Azure. For the purpose of your project, you can always sign up for the free trial.
Specifically, you can leverage Windows Azure SQL Database. Or, if you are so inclined, you could use Mobile Services, which also relies on SQL databases but you will have a much better time setting it up in your Windows Phone app (doesn't matter whether you want to read or write data).
I am new to WCF and i am designing a project in which i want to run a crawler program (coded in c#) which crawlers some websites and it stores the crawled data in the tables of database (sql server db). I want that crawler runs repeatedly after 30 minutes and updated the database.
I want to then use the service on my hosted platform so that i can use the data from tables in web form (i.e. .aspx page)
Is it okay to use WCF for this purpose ?
Please suggest me how to move on ?
Thanks
Windows Communication Foundation (WCF) is responsible for communication between 2 points with different channel technology. you will use WCF if you want to send/receive some data between two point regardless channel technology (TCP/UDP/NetPipe/MSMQ , ...)
But you first need to design you crawler application which is configured to fetch data from your target web sites, then you need to design a schedular application using
http://quartznet.sourceforge.net/
to run your crawlers.
after running and storing your web pages you can use WCF if you need to do replication or synchronization with center server but it is optional
You could use a WCF service to do this but I would go for another setup:
I'd build a Windows application that is scheduled to run every 30 minutes by the Windows Task Scheduler. A simple console application might be fine.
I'd use a Web application (possibly ASP MVC) to query the database.
As you can see there is no need to use WCF at all.
An exception can/must be made when the server is not yours but you are using a hosting provider who doesn't allow you to schedule a Windows task. In that case you might want to run the crawling process by hand through the web application and have it repeat itself after 30 minutes.
Some hosting providers do allow the scheduling of tasks but in a different way so it might be worth to investigate.
I am building a system which is made up of 2 application
ASP.Net Website where jobs will be created for engineers to visit data held in central database
Windows Forms Application running on Laptop where jobs will be synced from central database then a form is completed and data sent back to the central database.
What will be the best way to transfer the data, the laptops will be remote and may be on a slow connection.
I will be using SQL Server 2008, Entity Framework, .Net 4
I have looked at the Microsoft Sync Framework but unsure if this will do whats required, also thought about having a web service where the windows form client can pull and push data to.
I have had bad experiences with MSMQ so what to avoid this.
How would you approach this?
Take a look at merge replication for SQL Server. This would allow your laptop users to make changes to the data they've received while offline and later sync back to the central database.
I believe MS Sync framework is designed to handle just this problem. While you can use MSMQ, you'd be writing most of the logic to do the syncing yourself. Sync framework should give you a better abstraction and take care of most of the details.