Push Method
session_transfer.asp<% Dim sActionPageURL, sContent sActionPageURL = "http://localhost/cms/plugins/session_store.aspx" sContent = "?" For Each Item In Session.Contents sContent = sContent & Item & "=" & server.URLencode(Session.Contents(item)) & "&" Next 'Construct POST Object set http_obj=server.CreateObject("MSXML2.ServerXMLHTTP") http_obj.Open "POST", sActionPageURL , false http_obj.setRequestHeader "Content-type", "application/x-www-form-urlencoded" http_obj.send(sContent) 'Display Response 'Response.Write (http_obj.ResponseText) set http_obj=nothing %>
session_store.aspx
<%@ Page language="c#" validateRequest="false"%> <% for(int i=0;i<Request.Form.Count;i++) { Session[Request.Form.GetKey(i)]=Request.Form[i].ToString(); 'Response.Write(Request.Form.GetKey(i)); 'Response.Write("="); 'Response.Write(Session[Request.Form.GetKey(i)]); } Response.Write(Session.Count); %>
Good information about asp to.net session transfer.
ReplyDeletehttps://www.migrateto.net/migrate-asp-to-asp-net/