I am new to WCF services and I have made one. It has 8 functions and I tested them in client desktop app, all work fine. My main task is to use those functions in REST service. I passed a tutorial:
http://www.asp.net/web-api/tutorials/hands-on-labs/build-restful-apis-with-aspnet-web-api
and I understand what I need to do, but I don't know how to start, because I don't know which type of project to use and how to make it work. Besides the fact that I need to make this REST service, I didn't get any further instruction.
So, if anyone has an idea or any tip, I would be thankful.
may below artical would be help you
http://www.codeproject.com/Articles/105273/Create-RESTful-WCF-Service-API-Step-By-Step-Guide
Related
I need a good and easy way to "Talk" to a windows service in C#
I have been able to create a windows service and start, stop, pause and continue it using a windows forms application.
My question is
Which is better and/or easier to accomplish this? WCF or Named Pipes? Or is it easier to do it using a file and make the service check it after some interval continuously?
I am very unfamiliar with both concepts(wcf and named pipes). So basically what i am asking is:
Which is worth my time? WCF or Named Pipes?
Thank you in advance :)
Ok, just provide a simple interface in c# with the following codes for doing what you wanted start,stop,restart etc
http://www.csharp-examples.net/restart-windows-service/
additionally, you may want to look into
SC commands which are specifically a way to interact with windows services..
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682107(v=vs.85).aspx
or even WMIC for remote access
http://msdn.microsoft.com/en-us/library/ms186146%28v=VS.80%29.aspx
I am working on a client server project. Client is built in WPF using mvvm pattern and service is built using WCF. I have to perform some action on a specific event which I am able to do by calling some service functions. I will have to do call the same function on a regular basis at a specific time as configured in database. Can somebody suggest a better approach to achieve this. I am thinking of creating a windows service specifically to do such things. Is that a good choice ? Thanks a lot.
Create a console app that calls the service, and add a scheduled task in Windows to run the console app at a specified interval. It is a lot easier and cleaner than creating a service for such a simple application.
I think the best approach is to use an already created (and properly tested) scheduling system or library instead of developing your own. For a Java project I worked on, I used the Quartz library, which handled the job quite nicely and it integrated easily into said project. It has a .NET port here, never used it but I suppose it works similarly.
I am working on windows service application that is suppose to perform some tasks. Apart from these tasks, I want to make some of the service functionality available on call. Means, totally separated application should be able to create an object of type specified on windows service and can call some of the functions, decalred public, ofcourse.
Let me know if is there any way to expose the functionality through API or something. if yes, kindly guide me to any tutorial or example of that.
Thanks in advance.....
I think what you are looking for is a windows service using WCF to communicate with other applications.
Here's a pretty neat tutorial you can work through:
http://tech.pro/tutorial/855/wcf-tutorial-basic-interprocess-communication
I'm running IIS 7 with a WCF service. I'm pretty sure this service is working okay because, if I click 'browse', I get this screen:
So I go into Silverlight and I want to add this as a service reference to my application (not the web project). Now I'm not sure whether I want to give it the service address with the ?wsdl or withou the ?wsdl (it seems everyone I speak to has a different view on this).
So firstly, the attempt WITH the ?wsdl on the end:
Secondly, the attempt WITHOUT the ?wsdl on the end:
Note that there are two separate errors.
So it's entirely possible that there's a problem with my web.config, right? Well I don't know about that, although I will present that too, just in case someone can see any faults with it.
I've been struggling with this for days now. I can only imagine there must be a really simple solution, but I'm buggered if I can see what it is.
Well, I hope you can offer some useful suggestions. Thanks!
Alright guys, I'm in a little over my head on this one and am hoping someone can point me in the right direction, as I'm not really sure how to implement this.
I've got a piece of hardware that exposes a c#.net API. Great. Works wonderfully. I want to collect data from this hardware using the API (so, a small c# app that does what I need) and then display the results on a web page. Currently, I have the c# app grab data I care about and stick it in an RRD file, then I have the web page load the relevant data and display it to the user.
My question, then, is what do I do when I want to expose some of the API functionality to the user? How do I go about making the 2 projects talk using .NET?
Some clarification: The reason there are two parts is due to modularity. The attached hardware and API can change, but as far as any client request is concerned, nothing's different, everything's just a web request to them.
Very little experience in big .net projects, so if you've got a better idea, let me know.
The easiest way I can think of would be to use something like NServiceBus to post a message to the other component which communicates with the hardware. The hardware piece would pick up the message from the bus, process it and put the response back on the bus.
It's not a perfect solution, but I think it's definitely workable.
You should be able to find everything for it here.
Left it here for a few days to see if anyone else had any ideas. I ended up scrapping the whole idea and consolidating everything into the web app. Not my initial preference, but it works okay. Thanks to Terrance for the brainstorming session under my question.
Easy. Create a class library for the device handler. Add a public class which exposes a nice interface for the web app. Add a reference to the class library. Create your class and use it.