Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 28th, 2009, 01:00 AM
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problem in getting the current user in RSS reader

Hi,
I'm want to filter the article list (in the webpart) by the user information.
The code I wrote is getting the current user information using the code below -

Code:
MembershipUser usr = Membership.GetUser();
However, when the code is running in the GetArticlesRSS.aspx.cs, it always returns null.

The same code in the welcome box is returning the right information, but I didn't figured out what is differnet.

Any help will be appriciated.
Dror
 
Old August 1st, 2009, 05:05 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Membership.GetUser() always returns null if the current user is not logged on.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
The Following User Says Thank You to Lee Dumond For This Useful Post:
cohdr01 (August 6th, 2009)
 
Old August 6th, 2009, 07:38 AM
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problem in getting the current user in RSS reader

Quote:
Originally Posted by Lee Dumond View Post
Membership.GetUser() always returns null if the current user is not logged on.
Thanks Lee,

When the user is logged on already, the problem is that on the master page I'm getting the correct user information, but through the web part source file (GetArticlesRss.aspx.cs) i'm getting null.

Another note is that during debugging the code - runnig directly the file from solution explorer (view in browser) i'm getting the right information, but when running the home page (default.aspx), it returns null.

I'm gessing that this is some context problem, but have no idea where to look for solution.

Thanks, Dror





Similar Threads
Thread Thread Starter Forum Replies Last Post
RSS Reader meflies BOOK: Adobe AIR: Create - Modify - Reuse ISBN: 978-0-470-18207-9 0 May 21st, 2009 08:03 PM
javascript rss reader rajuru Javascript 0 April 24th, 2007 12:21 PM
rss reader from site catalog.. question kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 February 2nd, 2007 04:13 PM
FLASH RSS Reader tufat123 Flash (all versions) 1 January 5th, 2007 12:56 AM
not showing updated rss in my reader ryan6 RSS and Atom 0 August 3rd, 2006 01:35 PM





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