S
Steven Edison
Hi,
Our company currently has a client/server based app. Now the need
has arisen to tap some of the functionality from a webpage. This
means the client will disappear and a subset of functionality will
be needed from the web.
Normally a user logs in from the client, then functionality will send
commands to the server to accomplish certain things.
I also have a traditional unmanaged COM object that wraps this
functionality for 3rd party developers to use.
//pseudo code
ServerConn conn = new ServerConn ();
int UserID = conn.Authenticate(UserName, Password);
if(UserID != -1)
{
//do some stuff
}
conn.Close();
Since there needs to be a user logged in, I'd like to tie the object
to a session. Here's the kicker. The "stuff" that needs to be done
needs to be done from JavaScript without postbacks. For example
clicking an arrow to move a camera. The movement of that camera
has to be tied to a "logged in" user. I had considered doing a
web service, but wasn't sure how that would maintain a logged in
user, then consume the web service within the JavaScript
So I need to be able to:
Connection [Server-Side Script]
Log In [Server-Side Script]
Perform functions with hardware [Client-Side JavaScript]
Close Connection [Server-Side Script]
I had also considered wrapping the client-side needs in a page,
and have the arrows, for example, call the page with XMLHttpRequest.
I also wasn't sure if that would use the same logged in session.
Thanks for the advice ahead of time.
Steven
Our company currently has a client/server based app. Now the need
has arisen to tap some of the functionality from a webpage. This
means the client will disappear and a subset of functionality will
be needed from the web.
Normally a user logs in from the client, then functionality will send
commands to the server to accomplish certain things.
I also have a traditional unmanaged COM object that wraps this
functionality for 3rd party developers to use.
//pseudo code
ServerConn conn = new ServerConn ();
int UserID = conn.Authenticate(UserName, Password);
if(UserID != -1)
{
//do some stuff
}
conn.Close();
Since there needs to be a user logged in, I'd like to tie the object
to a session. Here's the kicker. The "stuff" that needs to be done
needs to be done from JavaScript without postbacks. For example
clicking an arrow to move a camera. The movement of that camera
has to be tied to a "logged in" user. I had considered doing a
web service, but wasn't sure how that would maintain a logged in
user, then consume the web service within the JavaScript
So I need to be able to:
Connection [Server-Side Script]
Log In [Server-Side Script]
Perform functions with hardware [Client-Side JavaScript]
Close Connection [Server-Side Script]
I had also considered wrapping the client-side needs in a page,
and have the arrows, for example, call the page with XMLHttpRequest.
I also wasn't sure if that would use the same logged in session.
Thanks for the advice ahead of time.
Steven