سؤال

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