Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
ASPProtect.NET Authentication Add-On Support Archives (Info Locked Info Locked)
 CJWSoft Support Info : ASPProtect.NET Authentication Add-On Support Archives
Subject Info: Login Form on A Non Protected Page A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
flesso
Member
Member
Avatar

Joined: June/15/2006
Online Status: Offline
Info: 75
Added: December/21/2006 at 10:50am | IP Logged Quote flesso

Hi,

Could I have a normal login form posting to the aspplogin.aspx login page, like the classic ASP version does?



__________________
Best Regards,
Josh Hold
Back to Top View flesso's Profile Search for other info by flesso
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/21/2006 at 10:57am | IP Logged Quote cwilliams

Not possible under .NET and the current authentication system I offer.

ASP.NET has this thing called VIEWSTATE and it means forms must post to themselves and that is why it won't work. I been working on a alternate solution for a long time but everything I have tried has failed.

__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
flesso
Member
Member
Avatar

Joined: June/15/2006
Online Status: Offline
Info: 75
Added: December/21/2006 at 11:02am | IP Logged Quote flesso

Hi,

I had an idea maybe that in the DLL instead of the login page returning an error when no ReturnURL is specified it redirects and hands the login page the ReturnURL specified by the admin, maybe /membersarea/ or something, would that be a possible idea?



__________________
Best Regards,
Josh Hold
Back to Top View flesso's Profile Search for other info by flesso
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/21/2006 at 11:08am | IP Logged Quote cwilliams

I really don't see that being useful to the majority of the people using the system. I mean if you want that page to start somewhere add the returnurl you want to the querystring and send someone to that url..

More importantly I dont see what that has to do with having a login form on a non protected page. It wouldn't do anything for that issue.

__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
flesso
Member
Member
Avatar

Joined: June/15/2006
Online Status: Offline
Info: 75
Added: December/21/2006 at 11:15am | IP Logged Quote flesso

Hi,

Lets say someone has a directory called 'aspprotectnet' where they have all their protected pages. They want a login form on their NON-PROTECTED homepage, now, in the web.config file, they specify a DEFAULT ReturnURL. So, the homepage inherits the login page code from the DLL, you add the form to your homepage and all the necessary fields. Currently, when no ReturnURL is specified, the page gets an error returned, BUT this time the DLL could tell the page to redirect to include it's default ReturnURL from the web.config file, instead of returning the error. Now the homepage (non-protected) has all the login stuff on it, now has the default ReturnURL since the ReturnURL wasn't specified when the page was origionally loaded by the user, and if one was origionally specified, the default value wouldn't be used.

....and I know that would work....

...and I wish I could do that... but no DLL source code...



__________________
Best Regards,
Josh Hold
Back to Top View flesso's Profile Search for other info by flesso
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/21/2006 at 11:25am | IP Logged Quote cwilliams

I totally dont see how that would work. The homepage wont inherit anything from the dll.. I am not sure why you think it would.

Even if you put a login form on your homepage that went to "asplogin.aspx" and the return url was specified. BTW.The action of your form can specify it so there is absolutely no reason to have any sort of default returnurl.

Regardless you can not send it a username/password nor will it work period because of the VIEWSTATE and the fact that forms must post to themselves when using VIEWSTATE. Turning off VIEWSTATE is bad and will stop a lot of ASP.NET things from working.

I have tried it all. I know it does not work.

Next time you go to a protect an ASP.NET page look a the browser source . Notice all the auto generated viewstate stuff. It's like this huge bit of text.. and ID of sorts.

__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
flesso
Member
Member
Avatar

Joined: June/15/2006
Online Status: Offline
Info: 75
Added: December/21/2006 at 11:27am | IP Logged Quote flesso

What I mean by inherit is this:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="aspplogin.aspx.vb" Inherits="aspprotectauthentication.aspplogin" %>



__________________
Best Regards,
Josh Hold
Back to Top View flesso's Profile Search for other info by flesso
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/21/2006 at 11:28am | IP Logged Quote cwilliams

that isn't going to help you..

__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
flesso
Member
Member
Avatar

Joined: June/15/2006
Online Status: Offline
Info: 75
Added: December/21/2006 at 11:28am | IP Logged Quote flesso

...and yea I now about all the view state stuff, but I don't see how my idea wouldn't be possible?!?!?!



__________________
Best Regards,
Josh Hold
Back to Top View flesso's Profile Search for other info by flesso
 
flesso
Member
Member
Avatar

Joined: June/15/2006
Online Status: Offline
Info: 75
Added: December/21/2006 at 11:30am | IP Logged Quote flesso

ok... ill have a look at the good old asp.net unleashed... surely theres something in there...

__________________
Best Regards,
Josh Hold
Back to Top View flesso's Profile Search for other info by flesso
 
flesso
Member
Member
Avatar

Joined: June/15/2006
Online Status: Offline
Info: 75
Added: December/21/2006 at 11:31am | IP Logged Quote flesso

...and merry christmas chris

__________________
Best Regards,
Josh Hold
Back to Top View flesso's Profile Search for other info by flesso
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/21/2006 at 11:33am | IP Logged Quote cwilliams

it isn't possible.. it's 100% not possible.. not using the current authentication dll and default forms authentication behavior in .NET.

Sure, you can have a login form on a non-protected page in .NET (plenty of sites do it) but not using what I gave you. I may have a custom solution someday for the situation but it will most likely work totally seperately of the current stuff.

It's just the nature of the behavior of the built in forms authentication in .NET, and the object oriented self submitting forms that use viewstate.

The biggest problem is ASP.NET generates viewstate info when a page with a form is loaded. When it submits back to itself that viewstate info must be there and be correct.  There is no way to have one page submit to another and have all that viewstate stuff work. It is just doesn't work that way.

----------------------------------------------
The only way this could possibly work would be to scrap all the built in forms based authentication behaviors and make a manually coded page to post to with a ton of code in it...  that checked the info submitted and did all the stuff the authentication dll normally would... a lot easier said than done I am afraid.



__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: December/21/2006 at 12:02pm | IP Logged Quote cwilliams

BTW: To give you an update.. I have been working a lot on the ASP.NET version of the registration/admin pages.. it's just that ASP.NET has been kicking me in the ass lately and I havent been making much progress with any of it. I have started from scratch 3 times now as I didnt like the way things were going.. not giving up but it wont be ready soon.. I am almost thinking about just doing it inline (the asp classic way) and getting it over with and working. I been spending so much time trying to keep it code behind and using all the controls in ASP.NET that I am beginning to wonder if it is worth the end results.. ultimately it will work just a well being inline code. It's just that I wanted to do it the perfy code behind way using all the controls and objects.. etc etc etc.. I find that custimizing a lot of that stuff is the big issue.. its easy to drag and drop data connections and forms controls around, but not so easy to really customize it all and get what you need out of it.

A have also been spending a lot of time trying to get cookie sharing stuff working between Classic ASP and ASP.NET so logins could be shared.. eliminating the need to login into both types of pages during a session. I made a lot of progress but in the end just end up with difficulties making it all work consistantly. It likes to work once or twice and then break.. weird issues setting and removing cookies between Classic ASP and ASP.NET. If I could just get all of that working things like this Login form on a non protected page like you want would be a piece of cake as you could do it via Classic ASP.. then redirect right after to the .NET page you want the person on. Same goes for the user area.. as that would be more useful as well if after leaving it the person were auto logged into .NET pages.

Oh well.. lots to do.. it's not like I am not working on it.. just its a bitch. .NET is a bitch.

---------------
And Merry Christmas as well..



__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 

Sorry, you can NOT post info.
This info has been locked by a info administrator.

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area


Active Server Pages ASP control controls class classes module script Scripts applet CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.powerasp.com,www.aspclassifieds.com,www.aspphotogallery.com,www.codewanker.com