Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid object name 'User'
Message
 
À
28/04/2004 09:45:48
Bill Benton
North Florida Software Services
Middleburg, Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00898606
Message ID:
00898925
Vues:
21
Bill,

>I got past that hurdle, and am now running into another obstacle. Am I supposed to be passing another parameter to Login()?

>[ArgumentNullException: Value cannot be null.
>Parameter name: url]
> System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
> System.Web.HttpResponse.Redirect(String url)
> OakLeaf.MM.Main.Web.UI.mmBaseUserLogin.Login()
> PMR.UserLogin.btnLogin_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\pmr\userlogin.aspx.cs:64
> System.Web.UI.WebControls.Button.OnClick(EventArgs e)
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
> System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
> System.Web.UI.Page.ProcessRequestMain()

Looking at the above stack trace, it looks like the "url" parameter being passed to HttpResponse.Redirect is null (which is a problem). If you look at the Framework-level source code for the login form (found in mmBaseUserLogin.aspx.cs), you'll see in the Login form's OnLoad method that the "url" parameter is retrieved from one of two places:

1. The url from which the user originally navigated
2. The session variable "mmUserSecurity_RedirectionUrl"

Typically, the way users are sent to the Login form is by being redirected there from a secure page. If you set a page's RequiresSecurity property to true, if someone tries to navigate to that page, they are automatically redirected to the Login form. The url of the page from which they navigated is then captured in the form's OnLoad method. Once they log in and are authenticated, they are redirected back to that original page.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform