WebMatrix StarterSite

Discussion in 'ASP.NET / ASP.NET Core' started by BoBoDev, Jul 18, 2011.

  1. Hi all,
    I have tons of difficulties getting the WebMatrix StarterSite running. It runs fine on my computer, but, not on the published site. I published the site thru WebDeploy tool. If you are able to upload WebMatrix StarterSite example, please help me. I think I will get even more errors, so if you know the whole story, please let me know as well.

    Thank you so much.

    My web.config is the following

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
        <roleManager enabled="true" />
      </system.web>
      <system.data>
        <DbProviderFactories>
          <remove invariant="System.Data.SqlServerCe.4.0" />
          <add invariant="System.Data.SqlServerCe.4.0" name="Microsoft® SQL Server® Compact 4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
        </DbProviderFactories>
      </system.data>
      <connectionStrings>
        <remove name="LocalSqlServer" />
        <add name="LocalSqlServer" connectionString="x" providerName="System.Data.SqlClient" />
      </connectionStrings>
    </configuration>
    
    I am getting the following error.

    HTML:
    Server Error in '/' Application.
    --------------------------------------------------------------------------------
    
    To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider". 
    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.InvalidOperationException: To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".
    
    Source Error: 
    
    
    Line 61:                 try {
    Line 62:                     bool requireEmailConfirmation = !WebMail.SmtpServer.IsEmpty();
    Line 63:                     var token = WebSecurity.CreateAccount(email, password, requireEmailConfirmation);
    Line 64:                     if (requireEmailConfirmation) {
    Line 65:                         var hostUrl = Request.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped);
     
    
    Source File: e:\web\checkyourfo\htdocs\Account\Register.cshtml    Line: 63 
    
    Stack Trace: 
    
    
    [InvalidOperationException: To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".]
       WebMatrix.WebData.WebSecurity.VerifyProvider() +74
       WebMatrix.WebData.WebSecurity.CreateAccount(String userName, String password, Boolean requireConfirmationToken) +14
       ASP._Page_Account_Register_cshtml.Execute() in e:\web\checkyourfo\htdocs\Account\Register.cshtml:63
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +209
       System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68
       System.Web.WebPages.WebPage.ExecutePageHierarchy() +123
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
       System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context) +226
    
     
    
     

Share This Page