Rate this article :
This article was useful to you ?
Yes
No
Vous avez noté 0 étoile(s)
Procédure
In programming, a session is a group of data stored temporarily on the server side for a specific use by a connected user.
Sessions are generally used to store user identification information, such as a username or user ID, as well as application status information, such as items in an online shopping basket.
Sessions are usually associated with a unique session identifier that is stored on the client side, usually in the form of a cookie, to enable the server to retrieve the appropriate session data for each user request.
The problem essentially lies in the elements stored in RAM over time. Once the RAM is saturated, the system launches a reboot that will delete the stored elements and therefore potentially the sessions on your site. This may explain why a visitor may find themselves disconnected while visiting your site.
To avoid this, here is the procedure to follow:
1. Generate a key on Machine Key
To do this, go to the machineKey site and click on the "GENERATE" button.
Then copy the generated code into a corner
2. Configuring the web.config file
Go to the administration of your Plesk from the management of your service on the LWS Panel.
Once in Plesk, select "Websites and domains" from the left-hand menu.
On the page that appears, open the drop-down menu for your domain.
Click on "File manager".
In the file manager, you will arrive at the root of your service where the files for your site are located. Look to see if you have a file called web.config.
If so, we'll edit it, otherwise we'll create it by copying all the code I'll give below.
In this file, the content of which is XML, we will add the following to the
At the level of the third line starting with "<machineKey", replace this entire line with the one you retrieved from Machine Key in step 1.</p> <p> </p> <p>Starting from the base file, which is at the root of your service during delivery, here's the code it would give by adding these few extra lines.</p> <p>If you didn't have the file web.config file, create it by copying all the code without forgetting to modify the part indicated above concerning the code generated by Machine Key</p> <pre> <code class="language-xml"><?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpErrors> <remove statusCode="400" /> <error statusCode="400" path="D:\www\jetestuneformuleasp.site\error_docs\bad_request.html" /> <remove statusCode="401" /> <error statusCode="401" path="D:\www\jetestuneformuleasp.site\error_docs\unauthorized.html" /> <remove statusCode="403" /> <error statusCode="403" path="D:\www\jetestuneformuleasp.site\error_docs\forbidden.html" /> <remove statusCode="404" /> <error statusCode="404" path="D:\www\jetestuneformuleasp.site\error_docs\not_found.html" /> <remove statusCode="405" /> <error statusCode="405" path="D:\www\jetestuneformuleasp.site\error_docs\method_not_allowed.html" /> <remove statusCode="406" /> <error statusCode="406" path="D:\www\jetestuneformuleasp.site\error_docs\not_acceptable.html" /> <remove statusCode="407" /> <error statusCode="407" path="D:\www\jetestuneformuleasp.site\error_docs\proxy_authentication_required.html" /> <remove statusCode="412" /> <error statusCode="412" path="D:\www\jetestuneformuleasp.site\error_docs\precondition_failed.html" /> <remove statusCode="414" /> <error statusCode="414" path="D:\www\jetestuneformuleasp.site\error_docs\request-uri_too_long.html" /> <remove statusCode="415" /> <error statusCode="415" path="D:\www\jetestuneformuleasp.site\error_docs\unsupported_media_type.html" /> <remove statusCode="500" /> <error statusCode="500" path="D:\www\jetestuneformuleasp.site\error_docs\internal_server_error.html" /> <remove statusCode="501" /> <error statusCode="501" path="D:\www\jetestuneformuleasp.site\error_docs\not_implemented.html" /> <remove statusCode="502" /> <error statusCode="502" path="D:\www\jetestuneformuleasp.site\error_docs\bad_gateway.html" /> <remove statusCode="503" /> <error statusCode="503" path="D:\www\jetestuneformuleasp.site\error_docs\maintenance.html" /> </httpErrors> <tracing> <traceFailedRequests> <clear /> </traceFailedRequests> </tracing> </system.webServer> <system.web> <compilation tempDirectory="D:\www\jetestuneformuleasp.site\tmp" /> <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="20" /> <machineKey decryption="AES" validation="SHA1" decryptionKey="7ucKOvWBqXrsVMBl" validationKey="ZT6ikp0oQdfQT59F" /> </system.web> </configuration></code></pre> <p> </p> <p>Save your file and you're protected from the session problem.</p>
Rate this article :
This article was useful to you ?
Yes
No
1mn reading
How can I access the Plesk panel with LWS hosting?
0mn reading
How do I create a subdomain in Plesk?
0mn reading
How can I access site statistics in Plesk?
3mn reading
CHMOD rights management
Bonjour,
Je vous remercie pour votre message.
Je me suis permis de me connecter à votre formule d'hébergement pour voir la présence de la balise machinekey.
Ne constatant pas la présence de cette balise, j'ai effectué son ajout comme indiqué dans cette documentation sur votre fichier web.config.
Je n'ai pas constaté d'erreur 500 après avoir effectué cet ajout. Aussi, je vous invite à vérifier le bon fonctionnement de votre site et la résolution de votre problème de session.
Il est important lors de l'ajout de cette balise de bien la mettre entre les balises <system.web> et </system.web>
Vous ne devez pas dupliquer ces balises si elles existent déjà dans votre fichier web.config, mais simplement ajouter la balise machinkey entre ces deux balises déjà existante.
La duplication des balises <system.web> peut être la cause de l'erreur 500 que vous avez obtenu en effectuant l'opération.
Cordialement, L'équipe LWS