0
constantemnte while browsing the site the user is being redirected to the login screen. I myself keep browsing several screens by clicking on the menus and randomly the system goes to login. I have already put the session timeout with quite a high time and could not find out. I have several weeks working on it and no solution. Can you help? Follow my webconfig.
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,
EntityFramework, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="DefaultConnection"
connectionString="xxxxxxxxxxxxxxx" providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="3.0.0.0"/>
<add key="webpages:Enabled" value="false"/>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
</appSettings>
<system.web>
<httpCookies httpOnlyCookies="true" requireSSL="true"/>
<globalization culture="pt-BR" uiCulture="pt-BR" enableClientBasedCulture="false"/>
<customErrors mode="Off"/>
<authentication mode="None"></authentication>
<compilation debug="true" targetFramework="4.7.2"/>
<sessionState mode="InProc" timeout="60" />
<httpRuntime requestValidationMode="2.0" targetFramework="4.7.2"/>
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
</httpModules>
Already solved the problem? You don’t have any settings that when playing an exception the logoff is performed?
– Leandro Angelo
I haven’t solved, I have little experience with Asp.net published on site, usually use intentionally and have no problems. I don’t know how to make the exception you say. Is there a link that can help me? I suspect the problem is where the application is hosted
– Roberto Luiz Teixeira Rocha
SOLVED, the problem was the machine key on the web.config. As I was using farm type hosting, the application lost the token, I just added the line below and solved. <system.web> <machineKey validationKey="83BDD6F29FEF43C0256106B322F775DE77D8704CC3A5E07B9D2BD2253337374A3A64DD466D6A2CA81C6FBF27F6BFF637FC24CE8C17BB0540BB191E07B90CB5DC0" decryptionKey="4411595512AD6A65D5C09842DB764FA1BAAC047FD6C7E4827D42DE8FC496E" validation="SHA1" decryption="AES" />
– Roberto Luiz Teixeira Rocha