I want a separate layer or my APIController, like DAL we use in BLL or
where ever we want to use.

but when I try to put my APIController in a separate layer and host it as
WindowService Client then it did't work
but when I put my APIController in WindowService Project then it ONLY work.


thanks,


On Thu, Aug 29, 2013 at 2:26 AM, Sam Lai <[email protected]> wrote:

> What have you tried and how does it not work? What exactly do you mean
> by separate 'Layer'? A separate assembly that is shared?
>
> On 29 August 2013 04:48, Niaz Rana <[email protected]> wrote:
> > Hi,
> >        need some more thoughts,
> > currently application is like html+jQuery via WebAPI then web api hosted
> in
> > Window service calling DAL methods at the end DB.
> > working fine, yah. ;)
> > so what is the problem.?
> > problem is i want to put WebAPI controller stuff in seprate Layer and
> window
> > service just be a hosting app, is it possible.how.?
> > because i try my best but no success.:(
> >
> >
> > thanks in advance for you typing words :)
> >
> >
> > On Tue, Aug 27, 2013 at 5:16 PM, Niaz Rana <[email protected]> wrote:
> >>
> >> Dear Sam,
> >>      You are 100% right, App nature is that I must run within
> Network/Lan
> >> but its Web App,...Ahhhh.... what can I do if I have to follow.
> >>
> >>
> >> thanks for your support Guys.
> >>
> >>
> >> On Tue, Aug 27, 2013 at 12:55 PM, Sam Lai <[email protected]> wrote:
> >>>
> >>> So you're going to distribute the web app to every client and make
> >>> them run an instance of it locally and access it using their browser?
> >>> Effectively, you have just converted your web app into a Windows app.
> >>> You might as well create a quick WinForms window for it with a
> >>> WebBrowser control so they can use it without launching a browser.
> >>>
> >>> On 27 August 2013 17:09, Niaz Rana <[email protected]> wrote:
> >>> > Hi & Thanks,
> >>> > basically the client is restricted within network to access this web
> >>> > app,
> >>> > although its not access able outside of network/province.
> >>> > so i was thinking to make a JSON WCF webservice and call from jquery
> >>> > blah
> >>> > blah, but we can't host at IIS, restriction from Leader, :( (i don't
> >>> > know
> >>> > why frankly).
> >>> > but point is there is a dll that will be at client/user machine who
> is
> >>> > using
> >>> > this Web App.
> >>> > we have to interface with them from client/user system who is using
> >>> > this Web
> >>> > App from Browser.
> >>> >
> >>> > so thanks for your suggestions, but right now i am working on Self
> host
> >>> > Web
> >>> > API.NET, am i going fine.?
> >>> >
> >>> >
> >>> >
> >>> > On Tue, Aug 27, 2013 at 9:29 AM, Michael Ridland <[email protected]>
> >>> > wrote:
> >>> >>
> >>> >> 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 <[email protected]>
> 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 <[email protected]> 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
> >>> >>> > <[email protected]>
> >>> >>> > 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 <[email protected]> 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
> >>> >>
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Regards,
> >>> > Muhammad Niaz
> >>> > +966 596 792864
> >>
> >>
> >>
> >>
> >> --
> >> Regards,
> >> Muhammad Niaz
> >> +966 596 792864
> >
> >
> >
> >
> > --
> > Regards,
> > Muhammad Niaz
> > +966 596 792864
>



-- 
Regards,
Muhammad Niaz
+966 596 792864

Reply via email to