InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Error integration login with... Expand / Collapse
Author
Message
Posted 29/03/2006 02:33:53
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 03/05/2006 00:19:55
Posts: 2, Visits: 9
I got the below errors for a sample application i did in Csharp.

The code as from http://docs.instantasp.co.uk/instantforum/default.html?page=integration_webconfig.html

I follow the code in VB then convert to C#.However, it doesnt seems to work and it give me the same errors on login.aspx, register.aspx and role.aspx.

http://docs.instantasp.co.uk/instantforum/default.html?page=integration_webconfig.html

Error 1 'ASP.login_aspx.GetTypeHashCode()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.0.cs 
Error 2 'ASP.login_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.0.cs 
Error 3 'ASP.login_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.0.cs 
Error 4 'ASP.register_aspx.GetTypeHashCode()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.2.cs 
Error 5 'ASP.register_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.2.cs 
Error 6 'ASP.register_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.2.cs 
Error 7 'ASP.role_aspx.GetTypeHashCode()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.4.cs 
Error 8 'ASP.role_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.4.cs 
Error 9 'ASP.role_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\forumlogin\641ec297\b37fe9cb\App_Web_ksvdkz16.4.cs 
Error 10 Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). c:\inetpub\wwwroot\ForumLogin\Login.aspx.cs 1 33 http://localhost/ForumLogin/

Post #10513
Posted 29/03/2006 03:07:09
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 03/05/2006 00:19:55
Posts: 2, Visits: 9

Here's my login.aspx

using InstantASP.InstantForum;

using InstantASP.InstantForum.Data;

using InstantASP.Common;

using InstantASP.Common.UI;

namespace InstantForumAuthSampleProj

{

public class Login : System.Web.UI.Page

{

protected System.Web.UI.WebControls.Label lblStatus;

protected System.Web.UI.WebControls.TextBox txtUsername;

protected System.Web.UI.WebControls.TextBox txtPassword;

protected System.Web.UI.WebControls.Button butLogin;

protected System.Web.UI.WebControls.Button butLogout;

protected System.Web.UI.WebControls.CheckBox ckbRememberMe;

// page load event

private void Page_Load(object sender, System.EventArgs e)

{

// check to ensure this is not a postback

if (!Page.IsPostBack)

{

// are we currently authenticated?

if (System.Web.HttpContext .Current.Request.IsAuthenticated)

{

// if so attempt to create forum user object from generic principal

InstantASP.InstantForum.Components.User User = new InstantASP.InstantForum.Components.User (((InstantASP.Common.Authentication.GenericPrincipal )(System.Web.HttpContext .Current.User)));

// display login success

lblStatus.Text = ("Login Success for, "

+ (User.Username + "!" ));

}

}

}

// private method to handle click event from login button

private void butLogin_Click(object sender, System.EventArgs e)

{

// check to see if the username and password exists within the

// InstantASP_Users table. If we find a match then the user identity

// from the InstantASP_Users table is returned, else 0 is returned

Int32 UserID = InstantASP.Common.Authentication.Authentication .UserExists(txtUsername.Text, txtPassword.Text, InstantASP.Common.Enumerations.EnumLoginUsing .Username);

// did we find a user?

if ((UserID > 0))

{

// if so create an instance of the InstantASP.InstantForum.Components.User object

// from the user identity within the InstantASP_Users table

InstantASP.InstantForum.Components.User User = new InstantASP.InstantForum.Components.User (UserID);

// and log the InstantASP.InstantForum.Components.User object into the forums

User.Authenticate(ckbRememberMe.Checked, false );

// display login success

lblStatus.Text = ("Login Success for, "

+ (User.Username + "!" ));

}

else

{

// we did not find the users details

// update summary to display login failed information

lblStatus.Text = "Failed Login!" ;

}

}

// private method to handle click event from logout button

private void butLogout_Click(object sender, System.EventArgs e)

{

// check to ensure the user is already logged in

if (System.Web.HttpContext .Current.Request.IsAuthenticated)

{

// logout the current user

InstantASP.Common.Authentication.Authentication .Logout();

// update summary to display confirmation

lblStatus.Text = "Logout Success!" ;

}

else

{

// update summary to display confirmation

lblStatus.Text = "You are not logged in!" ;

}

}

}

}

Post #10514
Posted 15/02/2007 05:46:29


Support Supremo

Support SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport SupremoSupport Supremo

Group: Customers
Last Login: 13/11/2008 12:44:07
Posts: 568, Visits: 2,507
daren771 (3/29/2006)

Here's my login.aspx

using InstantASP.InstantForum;

using InstantASP.InstantForum.Data;

using InstantASP.Common;

using InstantASP.Common.UI;

namespace InstantForumAuthSampleProj

{

public class Login : System.Web.UI.Page

{

protected System.Web.UI.WebControls.Label lblStatus;

protected System.Web.UI.WebControls.TextBox txtUsername;

protected System.Web.UI.WebControls.TextBox txtPassword;

protected System.Web.UI.WebControls.Button butLogin;

protected System.Web.UI.WebControls.Button butLogout;

protected System.Web.UI.WebControls.CheckBox ckbRememberMe;

// page load event

private void Page_Load(object sender, System.EventArgs e)

{

// check to ensure this is not a postback

if (!Page.IsPostBack)

{

// are we currently authenticated?

if (System.Web.HttpContext .Current.Request.IsAuthenticated)

{

// if so attempt to create forum user object from generic principal

InstantASP.InstantForum.Components.User User = new InstantASP.InstantForum.Components.User (((InstantASP.Common.Authentication.GenericPrincipal )(System.Web.HttpContext .Current.User)));

// display login success

lblStatus.Text = ("Login Success for, "

+ (User.Username + "!" ));

}

}

}

// private method to handle click event from login button

private void butLogin_Click(object sender, System.EventArgs e)

{

// check to see if the username and password exists within the

// InstantASP_Users table. If we find a match then the user identity

// from the InstantASP_Users table is returned, else 0 is returned

Int32 UserID = InstantASP.Common.Authentication.Authentication .UserExists(txtUsername.Text, txtPassword.Text, InstantASP.Common.Enumerations.EnumLoginUsing .Username);

// did we find a user?

if ((UserID > 0))

{

// if so create an instance of the InstantASP.InstantForum.Components.User object

// from the user identity within the InstantASP_Users table

InstantASP.InstantForum.Components.User User = new InstantASP.InstantForum.Components.User (UserID);

// and log the InstantASP.InstantForum.Components.User object into the forums

User.Authenticate(ckbRememberMe.Checked, false );

// display login success

lblStatus.Text = ("Login Success for, "

+ (User.Username + "!" ));

}

else

{

// we did not find the users details

// update summary to display login failed information

lblStatus.Text = "Failed Login!" ;

}

}

// private method to handle click event from logout button

private void butLogout_Click(object sender, System.EventArgs e)

{

// check to ensure the user is already logged in

if (System.Web.HttpContext .Current.Request.IsAuthenticated)

{

// logout the current user

InstantASP.Common.Authentication.Authentication .Logout();

// update summary to display confirmation

lblStatus.Text = "Logout Success!" ;

}

else

{

// update summary to display confirmation

lblStatus.Text = "You are not logged in!" ;

}

}

}

}

Hi!

You'll need to replace the code:

InstantASP.InstantForum.Components.User User = new InstantASP.InstantForum.Components.User (UserID);

to:

 InstantASP.InstantForum.Components.User user = InstantASP.InstantForum.Business.User.SelectUser(System.Web.HttpContext.Current.User.Identity);

It was modified at InstantForum4.1.4 we will update our documentation.

Post #12376
Posted 06/01/2008 13:47:32
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Customers
Last Login: 06/01/2008 22:27:42
Posts: 42, Visits: 90
OMG! I've been scratching my head on this one for the last hour! Please update the docs.

-------------------------
Matt Brown
Metal Review Forums
Post #13679
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 12:03pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 6 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.