For Programmers: Free Programming Magazines  


Home > Archive > ASP > October 2004 > perpetual client-side - server-side dilema









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author perpetual client-side - server-side dilema
Support

2004-10-25, 8:55 pm

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


Bob Barrows [MVP]

2004-10-25, 8:55 pm

Support 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.


Support

2004-10-26, 8:55 am

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...
> 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.
>
>



Bob Barrows [MVP]

2004-10-26, 8:55 am

It's totally transparent. The web server authenticates the user using the
Windows credentials.

Bob Barrows

Support wrote:[color=darkred]
> 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.


Support

2004-10-26, 8:55 am

Thanks 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.
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com