TheFopp Posted April 29, 2013 Posted April 29, 2013 Hi all, When running Version 5.6 of HAP we also had some classic .asp pages that pulled specific info from a database for each user which worked by using the following code: <% ' CAPTURE STUDENT USERNAME Dim objNet Set objNet = CreateObject("WScript.NetWork") session("user") = objNet.UserName response.write session("user") %> With the new install, presumably because the version 9 install on IIS7 now uses AppPoolIdentity, no matter who logs in, the user that this code returns is 'HAP'. Is there anyway of grabbing the username that is entered when someone logs in now? Many thanks in advance, Adrian
TheFopp Posted April 29, 2013 Author Posted April 29, 2013 Thanks Nick, but how do I use that in context of the code I gave? I've had a Google and it seems to asp.net rather than classic and I need to do it from classic. Sorry for being thick, but this isn't my forte!... (not sure what is really!)
nickbro Posted April 29, 2013 Posted April 29, 2013 Ah, I don't think you can from classic, sorry to say. It's a ASP.net thing
TheFopp Posted April 29, 2013 Author Posted April 29, 2013 No worries Nick. I've just moved the classic ASP stuff to a new virtual directory and am using basic auth on that instead.
nickbro Posted April 29, 2013 Posted April 29, 2013 Ah ok, that works too. You could set HAP+ up to use Windows Authentication as well, which v9 supports, couple of things need to change to do that, if you want it
TheFopp Posted April 29, 2013 Author Posted April 29, 2013 That would be useful to know for future reference if I try to do any more work on the classic asp stuff. (What I really need is a year of doing sod all but learning asp.net instead but I don't think thats going to happen soon!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now