【解決方法】Godaddyホスティングでのasp.net認証の問題


Godaddy でホストされている asp.net アプリケーションがあります。 ASP.net 認証を使用しています。 アプリをローカルで実行すると、ログインに問題はありません.Godaddyサーバーで実行すると、数回ログインできますが、突然ログインが受け入れられず、ログインページに戻ってきます.エラーメッセージは一切ありません。 その後、20 分間ログインできず、その後再びログインできます。 Godaddy で、私のアプリ プールがいっぱいになっていると言われました。 アプリ プールをリセットすると、再度ログインできます。 私には理由がわかりませんし、彼らもそうします-特に私が使用しているSQL Serverを使用して、asp.netアプリケーションをサポートする方法がわかりません。 私はこの問題で DAYS を無駄にしました。 誰か助けてください!?!

これが私のWeb設定です:

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

<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
   <remove name="LocalSqlServer"/>
   <add name="LocalSqlServer" connectionString="Data Source=*****;Initial Catalog=****;Integrated Security=False;User Id=****; Password=*****" providerName="System.Data.SqlClient" />

<remove name="DefaultConnection"/>  
<add name="DefaultConnection" connectionString="Data Source=*****;Initial Catalog=****;Integrated Security=False;User Id=****; Password=*****" providerName="System.Data.SqlClient" />
 
  </connectionStrings>
  <system.web>
 <machineKey   validationKey="2A654FDADFA3C3A40F59130E44D92E369AED5E4A929AE5F74DC418CFA2D3045BF5B4384F893F90B317E2CD0CC4389A18F2194287689ED64445939C1262801E63" decryptionKey="548F73940555EBCB50A8169CDA0131CBC2675C70165BBDC382AA9F06AFD8119F" validation="SHA1" decryption="AES" />
  <globalization uiCulture="en-US" culture="he-IL" />
    <customErrors mode="Off" />
    <trust level="Full" />
     <authentication mode="Forms">
       <forms name="Aveida" path="/" loginUrl="Account/Login.aspx" protection="All" timeout="30" />
    </authentication>
    <compilation debug="false" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <pages>
      <namespaces>
        <add namespace="System.Web.Optimization" />
        <add namespace="Microsoft.AspNet.Identity" />
      </namespaces>
      <controls>
        <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
      <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls>
    </pages>
    <membership>
      <providers>
        <!--
	      ASP.NET Membership is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
        -->
        <clear />
<add name="AspNetSqlMembershipProvider"

                    type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

                    connectionStringName="LocalSqlServer"

                    enablePasswordRetrieval="false"

                    enablePasswordReset="false"

                    requiresQuestionAndAnswer="false"

  requiresUniqueEmail="false"

                    passwordFormat="Hashed"

                    maxInvalidPasswordAttempts="5"

                    minRequiredPasswordLength="5"

                    minRequiredNonalphanumericCharacters="1"

                    passwordAttemptWindow="10"

                    passwordStrengthRegularExpression=""

                    applicationName="/****"

                />
      </providers>
    </membership>
    <profile>
      <providers>
        <!--
	      ASP.NET Membership Profile is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
        -->
        <clear />
      </providers>
    </profile>
    <roleManager>
      <!--
	        ASP.NET Membership Role is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
        -->
      <providers>
        <clear />
      </providers>
    </roleManager>
    <!--
            If you are deploying to a cloud environment that has multiple web server instances,
            you should change session state mode from "InProc" to "Custom". In addition,
            change the connection string named "DefaultConnection" to connect to an instance
            of SQL Server (including SQL Azure and SQL  Compact) instead of to SQL Server Express.
      -->
    <!--<sessionState mode="Custom" customProvider="DefaultSessionProvider">-->
     <sessionState mode="InProc">
 
      <!--<providers>
        <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="LocalSqlServer" />
      </providers>-->
    </sessionState>
 
     

  </system.web>
  <system.webServer>
    <modules>
      <remove name="FormsAuthenticationModule" />
    </modules>
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>

<location path="SearchLost.aspx">
    <system.web>
      <authorization>
        <allow roles="member,manager" />
        <deny users="*" />

       </authorization>
    </system.web>
  </location>
  <location path="Account/Register.aspx">
    <system.web>
      <authorization>
        <allow roles="manager" />
        <deny users="*" />
       </authorization>
    </system.web>
  </location>
<location path="Categories.aspx">
    <system.web>
      <authorization>
        <allow roles="manager" />
        <deny users="*" />
       
      </authorization>
    </system.web>
  </location>
   <location path="Items.aspx">
    <system.web>
      <authorization>
        <allow roles="manager" />
        <deny users="*" />
       
      </authorization>
    </system.web>
  </location>
  <location path="Cities.aspx">
    <system.web>
      <authorization>
        <allow roles="manager" />
        <deny users="*" />
       
      </authorization>
    </system.web>
  </location>
  <location path="Neighborhoods.aspx">
    <system.web>
      <authorization>
        <allow roles="manager" />
        <deny users="*" />
       
      </authorization>
    </system.web>
  </location>
</configuration>

解決策 1

やあ、

Godaddy で Web アプリケーションをホストしました。 ユーザーコードを使用して、N 個のサプライヤーがこのアプリケーションにログインできます。 私のローカルで同じコードを実行している間、ユーザーはユーザーコードに従って正常にログインしました..しかし、サーバー側で使用すると、正常に機能しません。 たとえば、100001 ユーザーがアプリケーションにログインした場合、アプリケーションはユーザー コードが 200061 であることを示しています。別のユーザーがログインすると、セッションが適切にクリアされないと思います。

この問題を解決するために私を親切にサポートしてください

コメント

タイトルとURLをコピーしました