0
我有一個非常基本的網站,它自己能正常工作,但是當我創建網站的副本並嘗試將其添加到子域(然後將其轉換爲應用程序)時,我嘗試使用任何控制器時出現錯誤它的頂部有以下設置:MVC 3子網站?
public class AccountController : Controller
{
// This constructor is used by the MVC framework to instantiate the controller using
// the default forms authentication and membership providers.
private CustomMembershipDB datacontext;
public AccountController()
: this(null, null)
{
datacontext = new CustomMembershipDB();
}
// This constructor is not used by the MVC framework but is instead provided for ease
// of unit testing this type. See the comments at the end of this file for more
// information.
public AccountController(IFormsAuthentication formsAuth, IMembershipService service)
{
FormsAuth = formsAuth ?? new FormsAuthenticationService();
MembershipService = service ?? new AccountMembershipService();
}
public IFormsAuthentication FormsAuth
{
get;
private set;
}
public IMembershipService MembershipService
{
get;
private set;
}
錯誤,我得到:
說明:該請求提供服務所需的配置文件的處理過程中出現錯誤。請查看下面的具體錯誤細節並適當修改您的配置文件。
解析器錯誤信息:條目'EFMembershipProvider'已被添加。
IIS似乎在抱怨在同一個域上設置了一個重複的成員資格提供程序,不確定只是重命名它將解決這個問題?任何想法讚賞,因爲我是一個新手,這是在我之上!