Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hello guys! :)

 

i would like to ask if it is possible to put an object in session (global.asax)

 

im trying to migrate my classic asp code into VB.net and i successfully referenced my DCOM.

 

in my global.asa i only put this code to be accessible to all pages

 

<object runat="server" progid="pass" id="objectname" scope="session" > </object>

 

and here is my classic asp code

 

'Log In.asp
if not isempty(request.form("buttLogIn")) then
	username 	= request.form("tbxUsername")
	password 	= request.form("tbxPassword")
	stat = objectname.chkUserID(username, password)
	if stat = "00" then
		response.write("Succesfully Logged In")
	else
		response.write("* Invalid Username / Password")
	end if
end if

 

and here is my current ASP.net code together with my question remarks

 

   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
       Dim username As String, password As String
       Dim stat As String
      
       'how to put this object in the global.asax?
       Dim epass As epasssoa.epasssoa = New epasssoa.epasssoa   

       If Request.Form("buttSubmit") <> "" Then
           username = Request.Form("boxUsername")
           password = Request.Form("boxPassword")
           If username <> "" And password <> "" Then
               stat = epass.chkUserID(username, password)
               If stat = "00" Then
                   Response.Write("Succesfully Logged In")
               Else
                   Response.Write("* Invalid Username / Password")
               End If
           End If
       End If
   End Sub

 

how can i put this object (epasssoa.epasssoa) into my global.asax? i tried to put it in the global.asax but i cannot access this object :(

 

i hope that you can help me with my problem.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...