2011-02-24 25 views
2

我創建了一個MVC 3 Web應用程序項目,並使用Nuget Package Manager安裝了microsoft-mvc-helpers軟件包。爲了得到這個工作,我不得不添加對WebMatrix.Data和WebMatrix.WebData(將「Copy Local」設置爲true)的引用。在MVC3中使用帶有自定義成員資格提供程序的microsoft-mvc-helpers包的問題

當我嘗試運行項目中,我得到以下錯誤:

this method cannot be called during the application's pre-start initialization stage.

並將其指向以下部分在我的web.config(特別是加標籤):

<membership defaultProvider="ICNMemberProvider" userIsOnlineTimeWindow="60"> 
    <providers> 
     <clear /> 
     <add name="ICNMemberProvider" type="Website.Providers.ICNMemberProvider" /> 
    </providers> 
</membership> 

在安裝microsoft-mvc-helpers軟件包之前,這工作正常,如果我將其卸載,則可以正常工作。任何想法爲什麼我的客戶會員提供商和助手包會導致此錯誤?

+0

我不要以爲有一個名爲microsoft-mvc-helpers的軟件包。你是不是指microsoft-web-helpers?另外,你是否可以包含你得到的異常堆棧。謝謝! – 2011-02-25 19:03:24

+0

@David,沒有堆棧,它說這是一個配置錯誤,並指向我包含的web.config部分 – Austin 2011-04-28 14:31:27

回答

相關問題