简体   繁体   English

Azure和通用成员资格提供程序上的ASP.NET

[英]ASP.NET on Azure and Universal Membership Provider

I want to transfer my asp.net webforms app to windows azure and now have problems with membership provider. 我想将我的asp.net Webforms应用程序转移到Windows Azure,现在会员提供程序有问题。 I installed universal providers as Scott mentioned here . 我安装了通用提供程序,如Scott在这里提到的。 As soon as i want to register or login a user i am getting the following error: 我要注册或登录用户后,立即收到以下错误消息:

Description: An error occurred during the processing of a configuration file required to service this request. 说明:在处理服务于此请求所需的配置文件期间发生错误。 Please review the specific error details below and modify your configuration file appropriately. 请查看下面的特定错误详细信息,并适当修改您的配置文件。

Parser Error Message: Unrecognized attribute 'defaultprovider'. 解析器错误消息:无法识别的属性'defaultprovider'。 Note that attribute names are case-sensitive. 请注意,属性名称区分大小写。

Line 59: Line 60: Line 61: Line 62: 第59行:第60行:第61行:第62行:
Line 63: 第63行:

this is my web.config 这是我的web.config

<?xml version="1.0" encoding="utf-8"?>

<configuration>

<configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
</configSections>

    <connectionStrings>

        [...]
</connectionStrings>

      <appSettings>
    <add key="ChartImageHandler" value="storage=session;timeout=20;" />
  </appSettings>

    <system.web>
        <customErrors mode="Off" />

        <globalization uiCulture="de" culture="de-DE" />

        <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
            </assemblies>
        </compilation>

        <authentication mode="Forms">
            <forms loginUrl="~/Default.aspx" timeout="2880" />
        </authentication>


        <profile>
            <providers>
          <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider" connectionstringname="ApplicationServices" applicationname="/">
        </add>
        </providers>
    </profile>


      <membership defaultprovider="DefaultMembershipProvider">
        <providers>
           <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider" connectionstringname="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
             maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
             applicationName="/" >
        </add></providers>
      </membership>

    <pages controlRenderingCompatibilityVersion="3.5" maintainScrollPositionOnPostBack="true" clientIDMode="AutoID">
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>
    </system.web>

    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
    </system.webServer>
</configuration>

Don't know how you ended up with lowercase defaultprovider , but according to this documentation , it should be with capital "P" - defaultProvider . 不知道如何以小写的defaultprovider结尾,但是根据此文档 ,它应该使用大写的“ P” defaultProvider Pay attention to the error message which suggests that the attribute names are case-sensitive! 请注意错误消息,提示该属性名称区分大小写!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM