Push Method
session_transfer.asp1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <% 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
1 2 3 4 5 6 7 8 9 10 11 12 | <%@ 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/