In my code I use this line to Initialize my Base:

MyBase.Initialize(name, config)

Everything goes fine in the first time pass... but when it passes second time then throws me an error The Base Is already Initialized and that is something I don't want to happen.
Is there any way to catch this event?

有帮助吗?

解决方案

Finally the Base initialized only in the Default.aspx page, putting these lines in the Page_Load:

Dim myNewAsp As New AspNetSqlProvider
        If MyAspNetSqlMembershipProvider.SQLconnectionString = Nothing Then
            myNewAsp.InitializeSite(sender, e)
            Return
        End If 

Doing this the system always knows when if the Base is initialized or not.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top