Forum  General Visual ...  How do I...?  Login Form with 6.4P0 on .NET 4.0
Previous Previous
 
Next Next
New Post 8/21/2010 2:14 PM
  jasb
279 posts
4th Level Poster


Login Form with 6.4P0 on .NET 4.0 

Howdy people,

I'd like some help on creating a login form:

- howto define the global authicanted variavel?
- how to change from the login form to the main form after sucessfull auth?

thanks,

Jorge,

 
New Post 8/21/2010 3:14 PM
  palli
11824 posts
1st Level Poster




Re: Login Form with 6.4P0 on .NET 4.0 

Hi Jorge,

See the KB with this query here or this one here. It will take you to a few references, videos and articles on how to create Logon Form, which hasn't changed much in version 6.4, except there have been some additions.

The global variable that indicates you are authenticated is built into the Visual WebGui framework. In pre 6.4 there was only a session level VWGContext.Current.Session.IsLoggedOn which you set to true on successful login and then your whole session is logged in. In version 6.4 there was a per form authentication added, and you will see a sample of its use here.

When you set up authentication (or logon form) in your Visual WebGui application, every time there is a request posted towards your application, Visual WebGui checks if that request is authenticated or not. If it is not, you will get the logon form automatically shown and on successful login you will be passed through to your mainform.

In your logon form, as soon as you programmatically set IsLoggedOn = true, the next request that hits your application will not go to the logon form, it will go directly to your mainform. This means that if you have a Login button, then in the Click event handler you just set IsLoggedOn = true and they you're done.

Hope this helps, but if you have any more questions, then feel free to ask.

Palli

 

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 8/21/2010 4:00 PM
  FrankR
102 posts
5th Level Poster


Re: Login Form with 6.4P0 on .NET 4.0 

Now that's the way to implement authentication.   Fantastic.  

 
New Post 8/22/2010 5:42 AM
  jasb
279 posts
4th Level Poster


Re: Login Form with 6.4P0 on .NET 4.0 

Hi Palli,

I'm back to WGX now with vs2010 and WGX 4.0 :)
It seems a solid rock now and much mature, excelent!

I haven't tested the code for the AUTH form yet but I'll do it later tomorow or so.
Allow me one question (I can't post new thread again..get an error saying "add/edit posts is unavailable")

The PasswordChar property seems to not be working, no matter what I define here, it always result on a black DOT.
Ideas?

 
New Post 8/22/2010 2:37 PM
  palli
11824 posts
1st Level Poster




Re: Login Form with 6.4P0 on .NET 4.0 

Hi Frank,

Yes, this is true. It's really simple indeed.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  Login Form with 6.4P0 on .NET 4.0
Azure banner
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS