2006-11-26 22:21:38
Large, medium, and small
Cause: the new system will be fully used. NET platform development, the previous two years of work are developed using ASP. if the cost is exceeded, the workload is huge, but the subsequent system implementation on ASP is difficult, in the future security and upgrade packages, Asp.net is much better than ASP, so the subsequent development and conversion are decided. NET platform, first encountered a session value problem. because ASP and Asp.net are completely different, although they can be executed under IIS, ASP is process-oriented development, but it is not actually development. It can only be regarded as VBScript and JavaScript scripting language, the session values are stored in the server memory. Therefore, the more online users, the more sessions are defined, the larger the system memory. Asp.net uses a number of databases for storage. the two session value storage methods are completely different, and direct value transfer is certainly not feasible.
Solution: Find some information on the Internet and ask. net old bird, the answer is not achieved, all said to be overturned and re-use. net. on Saturday evening, I had a headache, but I still couldn't find a solution. I didn't solve the problem. I always thought about it when I went to bed. finally I found a solution on Microsoft's msdn website this afternoon http://www.microsoft.com/china/MSDN/library/enterprisedevelopment/default.mspx? MFR = true. It must be noted that there are some errors here. If you copy them, there will certainly be errors.
The above is a schematic diagram:
Program code download
Step 1: Create a new database named sessiondemodb. (You can change the database name according to the project name)
"Create a sessstate table (osql.exe-e-d sessiondemodb-I session. SQL ).
"Create a new virtual directory named demo.
"Close ASP Session on the ASP Configuration tab.
"Copy web. config, testpage. aspx, global. Asa, testpage. asp, and globalinclude. asp to the virtual directory.
"Update The DSN string settings in global. Asa and web. config. The Session Timeout setting is optional. The default value is 20 minutes .?
"Install sessionutility. DLL to Global Assembly Cache (gacutil/I sessionutility. dll ).
"Use regasm.exe to expose sessionutility. dll as a COM Object (regasm.exe sessionutility. dll/TLB: sessionutility. TLB ).
"Copy sessionmanager. DLL to a local directory and use regsvr32.exe to register the file (regsvr32 sessionmanager. dll ).
"Grant the IUSR _ <machine_name> account the read and execute permissions on sessionmgr. dll.
Summary
ASP. NET represents a new programming model and structure, and has more advantages than the traditional ASP. Although migrating from ASP to ASP. NET is not a simple process, ASP. NET's better programming model and higher performance make the conversion process worthwhile.
# C # column