I want to develop a web service that handle another web service's event. (C#.Net 3.5 framework)
I will develop a web service and the correspond service's event catch this service, and it will send some data to me.
Is it possible?
Thanks.
I am not sure what you meant but you can create two web services with one webservice references another one.
Related
I want to call my custom windows service running on particular client machine from my Web application on button click. How can I do this?
I got the solution and it works. Please find below steps.
Created Self-Hosted WCF service that call window services/processes
Call this WCF service from your web application
Please find below link for more details:
https://techinqueincsharp.blogspot.com/2019/05/open-clients-machine-local-file-from.html
I have a .NET MVC web app and a Windows Service running on the same machine. Both projects use the same database through a different Data Access Layer project.
I need the Windows Service to perform some actions on the database, and i know there are different options, just want to know which is the correct:
1.- Calling an Action on the .NET MVC web app that also performs the same actions needed by the Windows Service. To do so i would call the Action with a standard "HttpWebRequest" call.
2.- Creating a Web API controller on the .NET MVC web app and calling it from the Windows Service using the WebApi.Client library.
3.- Creating a new WCF project to create a new service and calling it from the Windows Service.
I'm not familiar with any of the options above, so please feel free to post the correct way to do it.
How about creating a class library with the code you want to run and use it in both the web app and the service? I call that option 4.
I need to develop windows service which will do fortnightly transfers of files into the system. The problem is that I will also need "RunNow" method, so users can call transfer method any time by clicking to the link in the web app (asp.net mvc).
How can I call my windows service methods from external resource?
If you want to call a windows service method on the server side of your web application then take a look at the WCF or RestSharp and Nancy. Shortly, you need to create a RESTfull service in the windows service application that will be using a http://localhost/myservice/transfer address to expose the Transfer method. Then use ajax from your javascript code or RestRequest from your .net-controller class to call the address.
But if you want to call a windows service method on the client side of the application it will be a problem.
You could use Microsoft Message Queuing
The Webapplication would send a Message that the Service picks up.
Queue-Based Background Processing in ASP.NET MVC Web Application
http://msdn.microsoft.com/en-us/library/ms978430.aspx
I have a sharepoint web service running at specified host + "/_vti_bin/UserProfileWebService.asmx". I would like to instantiate a web service client, so that i could interact with this service. This is basically what I am trying to do: http://msdn.microsoft.com/en-us/library/ms550407.aspx.
How is this done in .NET? And do I have to use the MOSS API to know what functions it supports?
EDIT:
I guess I should add that I want to connect programmatically, not through a web reference, because that seems to be static.
In VS (2008/2010) you can add a web service reference to your console project for example. It will auto-generate the proxy classes for you to use in your code.
I want to send data from my Windows form to client wep page(.aspx).Pls help me.
You could use Web Services within your ASP .NET application and consume them them from your WinForms app.
Give a look to these articles:
Web Services with ASP.NET
Using ASP.NET Web Services
Walkthrough: Calling XML Web Services from Windows Forms
I would say use httpwebrequest and httpwebresponse to do this. it will be easy to do also.check the link below
http://www.codeproject.com/KB/IP/httpwebrequest_response.aspx
You can use .NET Remoting for doing this. Your desktop app can act as a remoting server, whereas your web app will be the remoting client.
The marshalled object exposed by your server (Windows app) will be accessed by the web application, which will call a method for getting the data. Your windows app will provide the data as a serializable object to your web application, which it will deserialize and process.
ther are several ways,
1) If you want to send data from window app to Web App then Use Query String.
2) If you want to send data from Web App to Windows app then you can User Either Remoting or Webservice.
3) You can user Biztalk Server for Integration.(this would be quite expensive).
4) You can build your own messaging mechanism, write all you information into a file and ask you application to read the file.