CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 PLEASE HELP.... How to use Sessions with Cookies!!!!!!

Print topic Send  topic

Author Message
sgadson

Posts: 45
Posted: 12/09/2005, 9:48 AM

:-< Can anyone help?


Here is what I need:

I have one intranet site that uses multiple code charge projects. Each project loads in its own directory. Once a user logs in on the base directory level I would like them to be recognized as logged in when they switch directories. (as it stands now if my user switches directories they have to log in again)

What is the best way to accomplish this? Is there another way other then using cookies? If cookies is the way to go, how do I do this in CCS 3.0?

I am using CodeCharge 3.0 ASP.NET VB. Code Examples would be greatly appreciated.
_________________
Shawn :-)
View profile  Send private message
Stan
Posted: 12/12/2005, 8:11 AM

Are your applications placed in subfolders of base folder? In this case you can share session between them. Another option is a cookies, as you mention. In this case base app should set it for user. After this sub-app will check presence, and automatically log-on user, by setting appropriate session variable.

Something like following

in main app, during succefull login procedure

  
Dim myCookie As HttpCookie = New HttpCookie("UserSettings")  
myCookie("UserId") = DbUtility.UserId  
Response.Cookies.Add(myCookie)  

in sub app, during security check in DbUtilty.CheckUser method

  
If Not IsNothing(HttpContext.Current.Request.Cookies("UserSettings")) Then  
DbUtility.UserId = HttpContext.Current.Request.Cookies("UserSettings")("UserId")  
End If  
sgadson

Posts: 45
Posted: 03/19/2006, 6:34 PM

Hi Stan,

Yes, my applications are loaded into sub folders under my base application. Each sub-folder application is created using a separate codecharge project.

Is it possible to share sessions between them? If so can you give me an example of how to do so?

Thanks
_________________
Shawn :-)
View profile  Send private message
Stan
Posted: 03/21/2006, 7:55 AM

Unfortunately, it's not possible. The only way is join all applications into one. Take a look on this page http://www.asp101.com/articles/jayram/sharestate/default.asp.

Stan

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.