Fixing ASP.NET Login Control login failure

My .Net 2.0 web site was throwing an exception when I was trying to use the Membership features and authenticating my credentials (using Forms Authentication) using the Login control on a page called "Login.aspx".
 
It turns out that the problem is a name collision between System.Web.Login and your Login page. This post indicates the easiest solution; add a namespace to your code-behind page and change the Inherits tag in the aspx page to be Inherits="<namespace>.Login". Then, when you publish the site, the collision is resolved.
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s