Click to See Complete Forum and Search --> : Plink ASP.NET


upperwall1
August 14th, 2010, 08:16 AM
Hi Gurus,
I've developed an application that uses plink. Its a window based application and now im trying to create the same application but in ASP.NET. The problem is I get an error when i try to put the instance of my class to a session. Please help me gurus...plsssssssssssssssssssssss

heres the part of my program.

Dim objSSH As classSSH
objSSH = New classSSH

Dim sHostName As String
Dim sUserName As String
Dim sPassword As String
sHostName = drpHostName.SelectedValue.Trim
sUserName = txtUserName.Text
sPassword = txtPassword.Text

Dim sStatusLogin As String
sStatusLogin = objSSH.sPuttyLogin(sHostName, "D:\plink.exe", Me.txtPassword.Text, Me.txtUserName.Text)
Session("ssh") = objSSH 'This is the line where error starts

the error is: Unable to serialize the session state. In 'StateServer' and 'SQLServer'
mode, ASP.NET will serialize the session state objects, and as a result
non-serializable objects or MarshalByRef objects are not permitted. The same
restriction applies if similar serialization is done by the custom session
state store in 'Custom' mode.

HanneSThEGreaT
August 17th, 2010, 04:20 AM
Please use [CODE] and [/CODE] tags when posting code.