Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 1st, 2009, 10:42 AM
Authorized User
 
Join Date: Jun 2009
Posts: 11
Thanks: 1
Thanked 2 Times in 2 Posts
Default Question about adding users

So when I add new users to the system, it works just fine. Saves them to the database, displays them in the custom gridview.

So next I go to Roles to create a new role to assign the newly added users to.

However, NONE of the new users show up in the select listbox. this box still maintains the users that were there before. the only way to get the newly added users is to exit the program, rebuild the solution, and then relaunch the program.

That can't be right so clearly I'm missing something. Anyone wanna take a stab?
 
Old July 1st, 2009, 01:49 PM
Authorized User
 
Join Date: Apr 2009
Posts: 41
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Most likely it's because the user list is cached (or in the ViewState). I may have missed it, but I didn't see anywhere in the code where Vince flushed the cache or the ViewState (it's been a couple months since I looked at it though).

I know I experienced a similar issue, and wound up writing some code to clear the cache and/or ViewState.

Anyway, sorry for the vague answer - but I'd look at Cache and ViewState. You may need to write some code yourself to handle the issue.

Tim
 
Old March 25th, 2010, 06:07 PM
Authorized User
 
Join Date: Nov 2009
Posts: 31
Thanks: 3
Thanked 0 Times in 0 Posts
Default Its cache issue

Yes it is cached in Globals class under “App_Code” folder of web project.
To work around it we need to invalidate the cache and load the data again from DB.
To work around this I call Globals.LoadXXX(Page.Cache) methods.
These methods exatelly do the same.
On save of user I call
Globals.LoadUsers(Page.Cache);
After Saving it.

On save of role I call
Globals.LoadRoles(Page.Cache);
After Saving it.

But when I logged in from newly created user in to system. The menu tab and tree are not rendered at all only for newly created user for old users it works fine. I need to restart the web server (IIS) to make it work. no idea why its hapening. Did you solve your problem? Or any one tried to solve it? Please share your findings.

thanks,





Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about authorization of new users. scottlucas58 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 11 February 26th, 2009 09:19 AM
Accessing users profile values question? hcusto ASP.NET 2.0 Professional 2 August 19th, 2006 03:23 AM
Accounts module - adding new users andieje BOOK: ASP.NET Website Programming Problem-Design-Solution 1 June 26th, 2006 11:07 PM
Question about active directory users apalmero Access VBA 0 November 4th, 2003 03:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.