views:

254

answers:

1

I am running my website on IIS. The default page shows this message:

Server Error in '/Enterprise/EnterpriseASP' Application. Unable to cast object of type 'System.Web.Security.SqlMembershipProvider' to type 'EnterpriseASPClient.Core.EnterpriseMembershipProvider'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Unable to cast object of type 'System.Web.Security.SqlMembershipProvider' to type 'EnterpriseASPClient.Core.EnterpriseMembershipProvider'.

Source Error:

Line 78: Line 79: Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) Line 80:
MyBase.OnLoad(e) Line 81:
Helper.WireViews(Me) Line 82:
End Sub

Source File: C:\Enterprise\EnterpriseASPClient\Core\PageBase.vb Line: 80

Stack Trace:

[InvalidCastException: Unable to cast object of type 'System.Web.Security.SqlMembershipProvider' to type 'EnterpriseASPClient.Core.EnterpriseMembershipProvider'.] Login.Page_Load(Object sender, EventArgs e) +607
System.Web.UI.Control.OnLoad(EventArgs e) +99
EnterpriseASPClient.Core.PageBase.OnLoad(EventArgs e) in C:\Enterprise\EnterpriseASPClient\Core\PageBase.vb:80 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

How can this problem be solved?

A: 

Looks like you're incorrectly trying to cast (either explicitly or implicitly) an object of type System.Web.Security.SqlMembershipProvider to type EnterpriseASPClient.Core.EnterpriseMembershipProvider.

Please provide a little more detail about what's actually going on in your program.

I'm guessing your overridden OnLoad() function - or actually the Helper.WireViews() method it calls - is doing something inadvisable with casting.

Skeolan