I have sql server database in my web project (hosted over the internet). Now, i want to make a c# windows forms (or WPF) application that, i can access the same database(that is in my web project).
What is the best way to make that application? Which webservice technique should i use.
Any help link regard to this will be appreciatable.
Thanks
You can expose your data through a public API implemented in WCF, and call that API from basically any kind of .NET application including WinForms and WPF by using WCF as well. So, check out WCF (Windows Communication Foundation)
Related
I am still relatively new to writing API's and web services, so bear with me if I use incorrect terminology.
I want to know if it is possible to create an API in C# using nancyfx (or any other framework) or even just a simple web app and then set it up as a continually running web service using WampServer. I'm pretty new to Wamp, all I have done so far is create a few rudimentary pages with php; but I can't seem to find any information about running a web service with Wamp using a different back end language other than php.
WAMP is stand for Windows Apache MySQL PHP. As I can say, you can't run a C# web service with it base configuration. However, you actually don't need this. If you are on .net Core, there is a Kestrel web server. You can use it to serve your app. On a .net framework you have a HttpListener which can help you to implement self-hosted web service (for example, a windows service which hosts your application).
There are many other options, btw. Try google for some kind of "Hosting .net web application" or "Self-hosted .net web application"
i am new to visual studio, and i developing a distributed system with visual studio, i'm developing two applications
windows forum application c#
Web application asp.net
so i using WCF Services to make this system distributed, is is right?
in web application im using a WCF Services to Login and insert data and retrive data.
In your situation, i can say WCF would be fine. But in future if you are planning to support your application on devices like smartphones/tablets then Web API would be better choice.
But its totally depend on the situation. You will get more info on the following link:
http://www.dotnettricks.com/learn/webapi/difference-between-wcf-and-web-api-and-wcf-rest-and-web-service
Hope this will help you to choose appropriate option for your application.
I have a simple server app that I need to re-write. Basically, uses async TCPSockets to allow multiple clients to connect & communicate asynchronously. Right now it is running as a winforms app & is managed as a windows service. I'm trying to decide if I should rebuild it in a similar way using WPF, or should I rebuild as an IIS MVC4 WebAPI app. I like all of the monitoring options & memory management built into IIS. This is definitely more familiar territory to me.
I'll need a nice GUI interface to see realtime statistics but this should be do-able as a web app. Is there any reason I wouldn't use MVC4 web API?
I have developed a web application in C# and an android app. Web app(c#) is acting as a server and attached to SQL server 2008 R2 while android is acting as client and it communicates with web app(C#) via bluetooth( bluetooth coding is done in c# winforms).
Now one thing I know is that android cannot directly communicate with SQL database for it I have to utilize web service. I wanted to authenticate my android app login/register from web app(C#)
My winform(C#) in which bluetooth(using feet32 library) functionality is implement should act as an agent between client(android) and server(C#).
Now I wanted to know that:
How my winform application will act as an agent to communicate with client and server both and read/send data to and fro.
If I need web service to implement then in which application I should write in webapp or winform?
I wanted to authenticate my android app login/register from web app(C#). I f I have to write for it webservice then whether I will write it in web app or winform?
I am just a beginner and its my final project. Please help me to understand the complete scenario and my knowledge is too little and also if there is any good tutorial for any of these functionality please do mention the link ..
Thanks
Edited: After little Research I come to know about SOAP http web service, What you guys think where to implement this web service according to above questions.
To establish communication between two devices by using Web services you don't have to use winform application.
You can establish a connection via web services, just create a new ASP.NET project using visual studio then add a Web service and folloe the template it gives you.
Right click on the service, click on view in browser, verify there is no any error. The address of this browser is the address of your service just connect to this service from the second device.
Please check out this guideline: CodeProject Web Service
Try ICE, It got excellent cross platform support and is open source. I have been using it for last four years to communicate between c++ and C# applications.
ICE for .Net
ICE for Android
Sorry, if this sounds ignorant. Is it possible to SECURELY upload data from a Windows Forms app using an asp.net web service or some other method? If so, what is the general way of doing it?
I have never used web services before.
I have an IIS 6 server with .net 3.5 installed. I need to build this windows forms program, which will hold data in a local sql compact database. When the program has access to the internet, the user needs to be able to MOVE the local data to a database on the web server.
What ways can I go about doing this? Am I on the right track thinking about web services? I have also read a bit about Sync Framework, but I'm not sure if that is all that well suited for this.
Thanks for suggestions.
EDIT
I forgot to ask: Would WCF be a possible useful technology?
Yes. Just secure the web service by SSL.
WCF can be a useful technology too. You might also want to consider SQL Server merge replication.