Click here to Skip to main content
15,881,424 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Password Storage Class Pin
flinchy318-Jun-12 7:28
flinchy318-Jun-12 7:28 
GeneralRe: Password Storage Class Pin
908236519-Jun-12 5:29
908236519-Jun-12 5:29 
GeneralRe: Password Storage Class Pin
flinchy321-Jun-12 4:17
flinchy321-Jun-12 4:17 
GeneralRe: Password Storage Class Pin
908236521-Jun-12 5:30
908236521-Jun-12 5:30 
GeneralRe: Password Storage Class Pin
908236522-Jun-12 10:39
908236522-Jun-12 10:39 
GeneralRe: Password Storage Class Pin
flinchy328-Jun-12 1:20
flinchy328-Jun-12 1:20 
GeneralRe: Password Storage Class Pin
flinchy328-Jun-12 1:25
flinchy328-Jun-12 1:25 
QuestionHow to get session state in VB.NET desktop app Pin
ilgrongo18-Jun-12 3:38
ilgrongo18-Jun-12 3:38 
Hi people

I have a desktop vb.application that make a logon on to a server application.
In case of successfull logon session is set (or at least I suppose it is). This code is a webservice public function linked to VB.NET as webservice Reference

Public Function Login_Click(stringa, azienda)
Dim conn As OdbcConnection
Dim comm As OdbcCommand
Dim dr As OdbcDataReader
Dim Sql As String = stringa
Dim ritorno As Boolean = False

conn = New OdbcConnection(connectionString)
Try
conn.Open()
comm = New OdbcCommand(Sql, conn)
dr = comm.ExecuteReader()

ritorno = dr.Read
If dr.Read() Then
'create sessions
Session("ID") = dr.GetString(0) *That's the userid
Session("DateTime") = DateTime.Now.ToString()
Session("company") = azienda
Session("blacklist") = dr.GetString(2)

End If

Now, from another VB.NET application I wish to check the users who logged on. So as webservice reference I tried something like this, but it doesn't work:
<webmethod()> _
Public Function checkSession(id) As Boolean
Dim answer As Boolean
MsgBox(Session.Item(id))
If Session.Item(id) Is id Then
answer = True
Else
answer = False
End If
Return answer
End Function

My expectation was that VB.NET application get the user state, but an error happens.
Regardless my implementation, any suggestion from you in order to get the information that i need ?

Anybody so kind to give me an hand ?
Thanks a lot \\ Antonio
AnswerRe: How to get session state in VB.NET desktop app Pin
Dave Kreskowiak18-Jun-12 10:53
mveDave Kreskowiak18-Jun-12 10:53 
GeneralRe: How to get session state in VB.NET desktop app Pin
ilgrongo18-Jun-12 13:04
ilgrongo18-Jun-12 13:04 
GeneralRe: How to get session state in VB.NET desktop app Pin
Dave Kreskowiak18-Jun-12 14:51
mveDave Kreskowiak18-Jun-12 14:51 
GeneralRe: How to get session state in VB.NET desktop app Pin
ilgrongo18-Jun-12 19:52
ilgrongo18-Jun-12 19:52 
QuestionWindows 7 Lock app Pin
flinchy316-Jun-12 2:42
flinchy316-Jun-12 2:42 
AnswerRe: Windows 7 Lock app Pin
Dave Kreskowiak16-Jun-12 3:42
mveDave Kreskowiak16-Jun-12 3:42 
GeneralRe: Windows 7 Lock app Pin
flinchy316-Jun-12 16:21
flinchy316-Jun-12 16:21 
GeneralRe: Windows 7 Lock app Pin
Dave Kreskowiak16-Jun-12 17:26
mveDave Kreskowiak16-Jun-12 17:26 
AnswerRe: Windows 7 Lock app [fixed] Pin
Eddy Vluggen16-Jun-12 10:38
professionalEddy Vluggen16-Jun-12 10:38 
GeneralRe: Windows 7 Lock app Pin
Richard Andrew x6416-Jun-12 10:57
professionalRichard Andrew x6416-Jun-12 10:57 
GeneralRe: Windows 7 Lock app Pin
Eddy Vluggen16-Jun-12 11:11
professionalEddy Vluggen16-Jun-12 11:11 
GeneralRe: Windows 7 Lock app [fixed] Pin
flinchy316-Jun-12 16:48
flinchy316-Jun-12 16:48 
AnswerRe: Windows 7 Lock app [fixed] Pin
Eddy Vluggen17-Jun-12 0:06
professionalEddy Vluggen17-Jun-12 0:06 
GeneralRe: Windows 7 Lock app [fixed] Pin
flinchy318-Jun-12 3:12
flinchy318-Jun-12 3:12 
GeneralRe: Windows 7 Lock app [fixed] Pin
Eddy Vluggen18-Jun-12 6:23
professionalEddy Vluggen18-Jun-12 6:23 
AnswerRe: Windows 7 Lock app Pin
Richard MacCutchan16-Jun-12 21:49
mveRichard MacCutchan16-Jun-12 21:49 
GeneralRe: Windows 7 Lock app Pin
Dave Kreskowiak18-Jun-12 2:06
mveDave Kreskowiak18-Jun-12 2:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.