Hessian headers

  • Thread starter Thread starter Peter Morris
  • Start date Start date
P

Peter Morris

Hi all

A project I am working on at the moment uses C# Hessian for remote calls. I
was wondering if anyone knows how (if possible) to send additional header
information with each request and read that on the server? My requirement
is to send a session token with each request and have it handled in a
generic way on the server, rather than having it sent as the first parameter
of every method call and expecting the implementor to execute some code with
it.

I visited the C# Hessian forums to ask, but it seems they only get about 1
post per month :-)
 
A project I am working on at the moment uses C#Hessianfor remote calls.  I
was wondering if anyone knows how (if possible) to send additional header
information with each request and read that on the server?  My requirement
is to send a session token with each request and have it handled in a
generic way on the server, rather than having it sent as the first parameter
of every method call and expecting the implementor to execute some code with
it.

The solution I found is to pass the session ID information in the URL
as a query parameter. You'll have to make one call with the base URL
and no parameters to find out what the session ID is. You could
implement a method like getSessionId() and return it via Hessian.
Then, append the sessionID to the URL and use the new URL for all
subsequent calls. I find this much more elegant than passing the
SessionID as the first argument in every call (which I've also done
before).

I wish these libraries just implemented cookies right off the bat.
That would really simplify this.

HTH,
Sarel
 
Back
Top