Developer forum

Forum » Development » Autologin for Intranet

Autologin for Intranet


Reply

Hi,


 


i want to make an Autologin module for my intranet, based on IP host addresses, how can I make this possible? Do I have to set an Session variable to something?


 


Gunnar


Replies

 
Nicolai Høeg Pedersen
Reply

You need to make the IP mapping your self. To log in the user do like this:


 


Dim Sec As New Dynamicweb.Security


Sec.ExtranetLogin(Username, Password)

 
Reply
NP wrote:


You need to make the IP mapping your self. To log in the user do like this:




 




Dim Sec As New Dynamicweb.Security




Sec.ExtranetLogin(Username, Password)





Thanks, that worked :) But how to extend the current session to say 480 minutes (8 hours)?


 


Gunnar

 
Nicolai Høeg Pedersen
Reply

In theory like this:




Session.Timeout = 480




But don't expect it to work. If you really wanna try you need a dedicated box with lots of RAM and an application pool manager that knows sessions - and its still no guarantee.




If you want the login to last that long, you will need to store some information in a cookie and use that information to login the user again if he or she gets logged out.

 

You must be logged in to post in the forum