Authentication question

I'm stuck with an old project where I want to implement a login page using authentication from a web config.

The problem I can't solve is the fact that the pages are ASP 3 pages and not ASPX.

Obviously my form authentication works well with a .aspx page, no problem.
I can't unfortunatly cut and paste my ASP code in a new webform, too many pages and use of some objects.
Somebody has an idea how to implement easily form authentication with .ASP pages ?

6 Comments

  • hahahahahah . oops sorry, paschal. :-) That was one of the great advances from asp to asp.net. In asp you either had to have function in a file and then #include that file in every single page or have some type of session validation code that throws invalid sessions out to a login page - on every single page. Probably someone more experienced with asp might give you some mroe useful advice. Congrats on all of your rollouts, by the way.

  • I did a proof of concept where I rewrote the asp security scripts to call aspx pages and to react accordingly.



    Instead of the original IsLoggedIn() redirecting to the asp login page, it would call an aspx page.



    Ill see if it at home tonight

  • Did you try it yet?

  • As I said, the session is just the way to show that it works.

    You should check whatever you check for your security and set whatever you set.



    You should not use Session varaible in production code unless absolutely neccesary.



    I use them in samples, but I haven't used one in production code for at least 4 years.







    I didn't just post this, I make it work before posting it.



    WebForm1.aspx should do nothing other that provide the ServerXMLHTTP request with "OK".



    Set oReq = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")



    Call oReq.Open("GET",URLSecurePage,false)

    Call oReq.SetRequestHeader("Cookie","a=b")

    Call oReq.SetRequestHeader("Cookie",Request.ServerVariables("HTTP_COOKIE"))

    oReq.Send



    Is on side of the bridge, WebForm1.aspx is the other.







  • Thanks Andrew for the help but the issue here seems to be the oReq.Send.



    When I do a test with oReq.responseText to see if I have "OK", apparently the test return false all the time because it seems for me that he don't wait enough to get back the value returned by webform1.aspx.

    I am thinking about cookies now, maybe because they are at the end the same for .Net or ASP.

  • I'll put the whole thing in a separate solution this weekend and send you the zip.

    (Is your email addy around here?)



    oReq.Open("GET",URLSecurePage,false) is a synchronous call, it should wait/block until the response is returned.



Comments have been disabled for this content.