Teach you how to solve the problem of ASP session loss
Maybe many asp developers will encounter this situation: the session is lost for no reason during the session. In other words, if the SessionID is lost, the same session-level variables will also be lost.
Many reasons for session loss are due to incorrect programs or incorrect virtual directory structures.
SessionID changes for the following reasons.
Reason 1:
Netscape's browser will think that "/App/user.asp" and "/app/user.asp" are two different programs. It will automatically start a new session (new session). Therefore, the capitalization of letters must be unified on your website.
Reason two:
The other reason is the value of Session.Timeout.
The Timeout attribute is used to set the Session timeout in units of one minute. If a user does not refresh or request the page within a Timeout, the session ends. When you request the page again, a new session will start.
Make sure the value of Timeout is minutes.
Format: Session.Timeout [= nMinutes]
Reason three:
If the user turns off their browser's cookie, of course the session Just can't keep it. Because session retention depends on cookies.
To maintain the Session's status, the browser must support cookies and be in an open state. Of course you can use other methods
Reason 4:
A common mistake is to create an incorrect directory structure. Like the following directory structure:
root has global.asa
\virtual_root without global.asa
\another_virtual_root without global.asa
Call two A virtual roots page will execute the same global.asa (the one on root)
Another directory structure:
root does not have global.asa
\ virtual puts global.asa
\another_virtual_root and another global.asa
Each global.asa in a different directory will be executed separately. Of course, the executed code will be different. But if the code inside is the same, don't say anything. :)
So when you request pages in different directories, different global.asa will be executed. Different variables are called, different session ids are created...all the previous useful information is destroyed.
The following is a detailed explanation:
When you first browse the page on the child virtual application (child virtual application), and then browse the parent of the child virtual application The page of the virtual program (parent virtual root). Those variables will be lost and destroyed. Look at the Form below :
requested subroutine 1 loss subroutine 2 lost
first requesting ROOT not. Requesting Root before will not happen
Requesting Root only before subroutine 2 will not
Last request Root will do
[Related recommendations]
1.
Free video tutorial on ASPIntroducing the three methods of Session object in ASPDetailed explanation of Session in ASP Usage skills Simple example of ASP sessionDetailed introduction to session in ASPThe above is the detailed content of Teach you how to solve the problem of ASP session loss. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



ASP built-in objects include Request, Response, Session, Application, Server, Session.Contents, Application.Contents, Server.CreateObject, Server.MapPath, Server.Execute, Server.Transfer, etc. Detailed introduction: 1. Request: represents HTTP request object, etc.

ASP development tools include Visual Studio, Dreamweaver, FrontPage, EditPlus, UltraEdit, SQL Server Management Studio, RAD Studio, Delphi, Asp.NET and Oracle SQL Developer.

ASP scanning tool vulnerability detection: 1. Select the appropriate scanning tool; 2. Configure the scanning target in the scanning tool; 3. Configure scanning options as needed; 4. After the configuration is completed, start the scanning tool to start scanning; 5. Scanning tool A report will be generated listing the detected vulnerabilities and security issues; 6. Fix the detected vulnerabilities and security issues according to the recommendations in the report; 7. After fixing the vulnerability, re-run the scanning tool to ensure that the vulnerability has been successfully exploited repair.

ASP manual detection of vulnerabilities: 1. Check the ASP application's verification and filtering mechanism for user input; 2. Check the ASP application's encoding and filtering mechanism for output data; 3. Check the ASP application's authentication and session management mechanism; 4. Check the ASP application's permission control on files and directories; 5. Check the ASP application's handling of errors; 6. Check the ASP application's database security; 7. Check the ASP application's configuration file and server configuration.

Methods include: 1. Use specialized vulnerability scanning tools; 2. Manual testing to discover and verify vulnerabilities in ASP applications; 3. Conduct security audits to check the code and configuration files of ASP applications; 4. Use vulnerability exploitation frameworks; 5. Review the code of the ASP application.

Connection method: 1. Use ADO to connect to the database; 2. Use DSN to connect to the database; 3. Use the connection string to connect to the database.

iPhone average selling price (ASP) achieved double-digit growth last year, growing 14% year-on-year. The popularity of iPhone 13 is a key driver, helping push the global smartphone market as a whole to a record annual revenue of $448B. Despite parts shortages, the smartphone market grew 7% year-on-year, with Apple taking by far the largest share... Market intelligence firm Counterpoint released its latest estimates today. According to the latest research from Counterpoint's MarketMonitorService, the global smartphone market revenue will exceed US$448 billion in 2021. Even as component shortages and COVID-19 restrictions continue to disrupt global supply

ASP security audit vulnerability detection steps: 1. Collect relevant information about the ASP application; 2. Carefully analyze the source code of the ASP application; 3. Check the ASP application's verification and filtering mechanism for user input; 4. Check the application's Encoding and filtering mechanism of output data; 5. Check the application's authentication and session management mechanism; 6. Check the application's permission control on files and directories; 7. Check the application's handling of errors; 8. Check the application's Configuration files and server configuration; 9. Fix vulnerabilities.
