Code Comments
Programming Forum and web based access to our favorite programming groups.Hello: I wrote a vb6 "client-side" ActiveX Component that will extract the user's network login. Now I want to be able to do some server-side work with this info, and it would be great if I could put the user's network login into a session variable but serverside-code is executed first .... My objective is for, each time (or the first time) our intranet users access the intranet's web page, it call the activeX which pull their user name which them would call SQL and displays custom information. Does anyone have any ideas ? would an include file work ? or can I in vb6 re-write my ocx so that it places the username directly in a server session object (nah! that wont work because the ocx is on the client...) help Thanks Terry
Post Follow-up to this messageSupport wrote: > Hello: > I wrote a vb6 "client-side" ActiveX Component that will extract the > user's network login. > Now I want to be able to do some server-side work with this info, and > it would be great if I could put the user's network login into a > session variable but serverside-code is executed first .... > > My objective is for, each time (or the first time) our intranet users > access the intranet's web page, it call the activeX which pull their > user name which them would call SQL and displays custom information. > > Does anyone have any ideas ? would an include file work ? or can I in > vb6 re-write my ocx so that it places the username directly in a > server session object (nah! that wont work because the ocx is on the > client...) help Thanks > Terry Why are you doing this? Why don't you set authentication to Windows and disable Anonymous? The LOGON_USER servervariable will then contain the user's network login (I'm assuming this is an intranet application) Given that you need to use this client-side ocx, you can use the XMLHTTPRequest object to pass data to a server-side asp page which can do whatever you like, including putting it into a session variable. Bob Barrows -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
Post Follow-up to this messageYes - thanks that may work. Will the user be required to "login" on the web server ? or will this be totally transparant? They access the intranet sporadically and we do not want them to login each and every time... Thanks "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message news:%23wGzXYtuEHA.3456@TK2MSFTNGP14.phx.gbl... > Support wrote: > > Why are you doing this? Why don't you set authentication to Windows and > disable Anonymous? The LOGON_USER servervariable will then contain the > user's network login (I'm assuming this is an intranet application) > > Given that you need to use this client-side ocx, you can use the > XMLHTTPRequest object to pass data to a server-side asp page which can do > whatever you like, including putting it into a session variable. > > Bob Barrows > -- > Microsoft MVP -- ASP/ASP.NET > Please reply to the newsgroup. The email account listed in my From > header is my spam trap, so I don't check it very often. You will get a > quicker response by posting to the newsgroup. > >
Post Follow-up to this messageIt's totally transparent. The web server authenticates the user using the Windows credentials. Bob Barrows Support wrote: > Yes - thanks that may work. Will the user be required to "login" on > the web server ? or will this be totally transparant? > They access the intranet sporadically and we do not want them to > login each and every time... > Thanks > > "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message > news:%23wGzXYtuEHA.3456@TK2MSFTNGP14.phx.gbl... -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
Post Follow-up to this messageThanks I tried this:
this required in ie ->tools ->Internet Options ->Security ->Local Intranet
Custom Level -> Setting User Authentication/Logon to Automatic login with
current username and password
I can then get the user name via Request.ServerVariables("AUTH_USER")
Thanks
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:%23wGzXYtuEHA.3456@TK2MSFTNGP14.phx.gbl...
> Support wrote:
>
> Why are you doing this? Why don't you set authentication to Windows and
> disable Anonymous? The LOGON_USER servervariable will then contain the
> user's network login (I'm assuming this is an intranet application)
>
> Given that you need to use this client-side ocx, you can use the
> XMLHTTPRequest object to pass data to a server-side asp page which can do
> whatever you like, including putting it into a session variable.
>
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.