SessionState & Remoting

D

Dan Avni

Using VS 2003, i have a web application that has a business layer & a data access layer. on most
installations of my web site, the sql server is residing somewhere in the network and i configure
the DAL to have the SQL connection string. i now have a customer who decided that there should be a
firewall between the Web site and the DB server and that communications between the WEB & DB servers
can only be done using the IIS. so i added support for remoting to my web site and now the DAL is
created on the DB server using remoting. this all works great but i still need one more thing to
solve. i need to have the session state (i am working in SQLMode) to also connect to the DB using
remoting. my question: if i configure in the remoting config file that the sessionstate class should
also be remoted will that work? is there any other solution on VS 2003?

thanks
Dani Avni
 
P

Peter Bradley

Generally speaking, I'm unhappy with using the Session for storing large
amounts of data. It is my experience that this data should belong to some
other object and that the Session should store a reference to that object,
to make it accessible globally. My preference, therefore, in this case
would be to understand the nature of the object whose data is currently
being stored in the Session and then create it as a separate object. You
can then make that object Serializable and pass it to your remote object.

Of course, this means that both sides of the remote connection will need a
definition of the object - so if you're using soapsuds.exe to create your
proxy you will have to use the -gc option otherwise you may get an error
saying either that the type has been defined twice or that a type mismatch
has occurred (because without the -gc option soapsuds will create a
definition of the object you pass in, in the proxy - which is not what you
want.

HTH


Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top