Re: Layout Advice
- From: Michael Nemtsev [MVP] <nemtsev@xxxxxxx>
- Date: Thu, 21 Feb 2008 21:06:04 +0000 (UTC)
Hello Steven,
Ok, you have 2 choices
First is implementing ICallbackEventHandler which "hides" all your calls to server, but there are a lot of manual jobs
Secord, rely on ajax, where everything implemented for you, even Logging to the server - see http://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys.Services/AuthenticationServiceClass/default.aspx
Btw, to consumer services from javascript u recommed to rely on ajax and JSON serialization - google to find more samples.
For example there u can find a good sample how to consume WCF services directly from javascript http://msdn2.microsoft.com/en-us/library/bb514961.aspx
---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo
SE> Hi,
SE> SE> Our company currently has a client/server based app. Now the need
SE> has arisen to tap some of the functionality from a webpage. This
SE> means the client will disappear and a subset of functionality will
SE> be needed from the web.
SE> SE> Normally a user logs in from the client, then functionality will
SE> send commands to the server to accomplish certain things.
SE> SE> I also have a traditional unmanaged COM object that wraps this
SE> functionality for 3rd party developers to use.
SE> SE> //pseudo code
SE> ServerConn conn = new ServerConn ();
SE> int UserID = conn.Authenticate(UserName, Password);
SE> if(UserID != -1)
SE> {
SE> //do some stuff
SE> }
SE> conn.Close();
SE> SE> Since there needs to be a user logged in, I'd like to tie the object
SE> to a session. Here's the kicker. The "stuff" that needs to be done
SE> needs to be done from JavaScript without postbacks. For example
SE> clicking an arrow to move a camera. The movement of that camera
SE> has to be tied to a "logged in" user. I had considered doing a
SE> web service, but wasn't sure how that would maintain a logged in
SE> user, then consume the web service within the JavaScript
SE> So I need to be able to:
SE> SE> Connection [Server-Side Script]
SE> Log In [Server-Side Script]
SE> Perform functions with hardware [Client-Side JavaScript]
SE> Close Connection [Server-Side Script]
SE> I had also considered wrapping the client-side needs in a page,
SE> and have the arrows, for example, call the page with XMLHttpRequest.
SE> I also wasn't sure if that would use the same logged in session.
SE> Thanks for the advice ahead of time.
SE> SE> Steven
SE>
.
- Follow-Ups:
- Re: Layout Advice
- From: Steven Edison
- Re: Layout Advice
- From: Steven Edison
- Re: Layout Advice
- References:
- Layout Advice
- From: Steven Edison
- Layout Advice
- Prev by Date: Re: regular expression AND required validator together?
- Next by Date: Re: Process.Start/ASP.NET under **Vista**
- Previous by thread: Re: Layout Advice
- Next by thread: Re: Layout Advice
- Index(es):
Relevant Pages
|