Hi Niaz Maybe your leader and yourself are thinking of the same thing, as maybe he/she is referring to a ajax request as client side? Because when you don't use ajax you're doing full page request which 'could' be thought of as a server request while ajax as a client request?
On Tue, Aug 27, 2013 at 4:15 PM, Sam Lai <samuel....@gmail.com> wrote: > Just to clarify, you have a web application being served up from a > server (machine A) and accessed from a client on machine B, and from > the web app client-side, you want to communicate with a Windows > Service running on machine B. > > If so, this isn't a question about the capabilities of ASP.NET or > NodeJS (or Rails or whatever other web platform), but rather a > question about what's available on the client machine. Typically, > there are four ways of doing this, and all involve some kind of > modification on the client machine (which you can anyway assuming > you're communicating with a custom Windows Service). > > 1. Register a protocol handler on that machine such that when a custom > URL like mycustomwindowsservice://some_data_to_pass_to_the_service is > accessed, your custom windows service is called to handle it. IIRC, > this is how iTunes links work. > > 2. Register a default file extension handler for a custom file > extension and MIME type, and serve up a file from the web app with > that extension/MIME type, which will cause the browser to download and > prompt the user to execute the handler which can communicate with your > custom Windows service. This is how just like what happens when you > download a Word document, except instead of opening the file in Word, > it opens in your custom app which can talk to the service. > > 3. Require the user to install a browser plugin, which can then handle > the communication to the service. > > 4. Add a custom Java applet (with unsandboxed permissions) that can > communicate with the service. Please don't do this. > > I strongly recommend you consider the security risks involved in doing > this, especially given services usually run as somewhat privileged > users. Even if the service runs as the same user as the user accessing > the web app, the attack surface is still significantly larger than the > attack surface of a browser. If you have to, the service should be > running as a separate user that is as restricted as it can be. > > On 27 August 2013 02:29, Niaz Rana <forni...@gmail.com> wrote: > > Well, > > My understanding is that i have to make a web service(WCF) exposed as > JSON > > or what ever and running at window service, > > and at clientside call it via JS or JQuery. > > > > but my leader is saying we have to do it at client side.? > > I dont know what he want to say. > > > > may be some otherway likeWebSockets or NodeJS. > > Please guide for this, thanks in advance. > > > > > > On Mon, Aug 26, 2013 at 5:25 PM, Jano Petras <jano.pet...@gmail.com> > wrote: > >> > >> Hi Niaz, > >> > >> Browser's XmlHttp request has a restriction that it can only invoke URLs > >> that are on the same domain as the current URL. > >> > >> > >> As as long as you serve the page from (for example): > >> > >> http://my.domain.com.au/my-page.aspx > >> > >> and then from JS make an Ajax request to anything that is on the same > >> domain (my.domain.com.au) - you should be fine. > >> > >> > >> Cheers, > >> j. > >> > >> > >> On 26 August 2013 16:15, Niaz Rana <forni...@gmail.com> wrote: > >>> > >>> Hi All, > >>> > >>> Can JS/JQuery call .NET WindowService method(s) at client side(Client > >>> Machine), where the web application running. > >>> > >>> Environment is Windows at client & Server. > >>> > >>> > >>> > >>> > >>> Thanks, > >>> > >>> -MN > >> > >> > > > > > > > > -- > > Regards, > > Muhammad Niaz > > +966 596 792864 >