Removing other test projects

This commit is contained in:
Justin Kotalik 2017-12-27 13:48:49 -08:00
parent 483a8c61a3
commit 3d17a40c0d
39 changed files with 0 additions and 2785 deletions

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\NotExisting.exe" arguments=".\NotExisting.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true" disableStartUpErrorPage="false" />
</system.webServer>
</configuration>

View File

@ -1,25 +0,0 @@
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>URL Rewrite Module Test</title>
</head>
<body>
<h1>URL Rewrite Module Test Page</h1>
<table>
<tr>
<th>Server Variable</th>
<th>Value</th>
</tr>
<tr>
<td>Original URL: </td>
<td><%= Request.ServerVariables["HTTP_X_ORIGINAL_URL"] %></td>
</tr>
<tr>
<td>Final URL: </td>
<td><%= Request.ServerVariables["SCRIPT_NAME"] + "?" + Request.ServerVariables["QUERY_STRING"] %></td>
</tr>
</table>
</body>
</html>

View File

@ -1,11 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>IIS Windows</title>
</style>
</head>
<body>
URLRewrite
</body>
</html>

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite to foo">
<match url="^rewrite/([_.0-9a-z-]+)" />
<action type="Rewrite" url="/{R:1}" />
</rule>
<rule name="Rewrite to foo-bar">
<match url="^rewrite2/([_0-9a-z-]+)/([_.0-9a-z-]+)" />
<action type="Rewrite" url="/{R:1}/{R:2}" />
</rule>
<rule name="Rewrite to EchoHandler.ashx">
<match url="^rewrite3/([_0-9a-z-]+)/([_.0-9a-z-]+)" />
<action type="Rewrite" url="/wsclient/EchoHandler.ashx" />
</rule>
<rule name="Rewrite to article.aspx">
<match url="^rewrite4/([_0-9a-z-]+)/([_.0-9a-z-]+)" />
<action type="Rewrite" url="/URLRewrite/article.aspx?id={R:1}&amp;title={R:2}" />
</rule>
<rule name="RemoveAppName" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<action type="Rewrite" url="/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite to foo">
<match url="^rewrite/([_.0-9a-z-]+)" />
<action type="Rewrite" url="/{R:1}" />
</rule>
<rule name="Rewrite to foo-bar">
<match url="^rewrite2/([_0-9a-z-]+)/([_.0-9a-z-]+)" />
<action type="Rewrite" url="/{R:1}/{R:2}" />
</rule>
<rule name="Rewrite to EchoHandler.ashx">
<match url="^rewrite3/([_0-9a-z-]+)/([_.0-9a-z-]+)" />
<action type="Rewrite" url="/wsclient/EchoHandler.ashx" />
</rule>
<rule name="Rewrite to article.aspx">
<match url="^rewrite4/([_0-9a-z-]+)/([_.0-9a-z-]+)" />
<action type="Rewrite" url="/URLRewrite/article.aspx?id={R:1}&amp;title={R:2}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

View File

@ -1,32 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>IIS Windows</title>
<style type="text/css">
<!--
body {
color:#000000;
background-color:#0072C6;
margin:0;
}
#container {
margin-left:auto;
margin-right:auto;
text-align:center;
}
a img {
border:none;
}
-->
</style>
</head>
<body>
<div id="container">
<a href="http://go.microsoft.com/fwlink/?linkid=66138&amp;clcid=0x409"><img src="iis.png" alt="IIS" width="960" height="600" /></a>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1 +0,0 @@
small

View File

@ -1,13 +0,0 @@
<html>
<body>
<%
if request.form("cars") = "volvo" then
Response.write ("Hello " & Request.form("title") & " " & Request.form("FirstName") & " " & Request.form("LastName"))
Response.write ("<br>How are you today?")
Response.Write("<br>you have a " & Request.form("cars"))
Response.write("<br>comment " & Request.form("textarea"))
end if
%>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<aspNetCore shutdownTimeLimit="1" rapidFailsPerMinute="100" requestTimeout="00:01:00" />
</system.webServer>
</configuration>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<aspNetCore shutdownTimeLimit="1" rapidFailsPerMinute="100" requestTimeout="00:01:00" />
</system.webServer>
</configuration>

View File

@ -1,70 +0,0 @@
<%@ WebHandler Language="C#" Class="ChatStartHandler" %>
using System;
using System.Web;
using System.Net.WebSockets;
using System.Web.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using System.Collections.Generic;
using System.Collections.Concurrent;
public class ChatStartHandler : IHttpHandler
{
static int clientCount=0;
public void ProcessRequest(HttpContext context)
{
context.AcceptWebSocketRequest(async wsContext =>
{
ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[1024]);
WebSocket socket = wsContext.WebSocket;
ChatList.ActiveChatSessions.TryAdd(clientCount++, socket);
// set up the loop
while (true)
{
Thread.Sleep(100);
var input = await socket.ReceiveAsync(buffer, CancellationToken.None);
if (input.CloseStatus != null)
{
await socket.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
break;
}
else
{
foreach (KeyValuePair<int, WebSocket> kvp in ChatList.ActiveChatSessions)
{
WebSocket ws = kvp.Value;
if (ws.State == WebSocketState.Open)
{
var outputBuffer = new ArraySegment<byte>(buffer.Array, 0, input.Count);
await ws.SendAsync(outputBuffer, input.MessageType, input.EndOfMessage, CancellationToken.None);
}
}
}
}
});
//}, new System.Web.WebSockets.AspNetWebSocketOptions { Subprotocol = "ECHO" });
}
public bool IsReusable
{
get
{
return false;
}
}
}
public static class ChatList
{
public static ConcurrentDictionary<int, WebSocket> ActiveChatSessions = new ConcurrentDictionary<int, WebSocket>();
}

View File

@ -1,50 +0,0 @@
<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
using System.Net.WebSockets;
using System.Web.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
public class Handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.AcceptWebSocketRequest(async wsContext =>
{
//ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[1024*1024]);
ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[1024]);
WebSocket socket = wsContext.WebSocket;
// set up the loop
while (true)
{
var input = await socket.ReceiveAsync(buffer, CancellationToken.None);
//Thread.Sleep(100);
if (input.CloseStatus != null)
{
await socket.CloseAsync(input.CloseStatus.Value, input.CloseStatusDescription, CancellationToken.None);
break;
}
else
{
var outputBuffer = new ArraySegment<byte>(buffer.Array, 0, input.Count);
await socket.SendAsync(outputBuffer, input.MessageType, input.EndOfMessage, CancellationToken.None);
}
}
});
}
public bool IsReusable
{
get
{
return false;
}
}
}

View File

@ -1,69 +0,0 @@
<%@ WebHandler Language="C#" Class="ChatStartHandler" %>
using System;
using System.Web;
using System.Net.WebSockets;
using System.Web.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using System.Collections.Generic;
using System.Collections.Concurrent;
public class ChatStartHandler : IHttpHandler
{
static int clientCount=0;
public void ProcessRequest(HttpContext context)
{
context.AcceptWebSocketRequest(async wsContext =>
{
ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[1024]);
WebSocket socket = wsContext.WebSocket;
ChatList.ActiveChatSessions.TryAdd(clientCount++, socket);
// set up the loop
while (true)
{
var input = await socket.ReceiveAsync(buffer, CancellationToken.None);
if (input.CloseStatus != null)
{
await socket.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
break;
}
else
{
foreach (KeyValuePair<int, WebSocket> kvp in ChatList.ActiveChatSessions)
{
WebSocket ws = kvp.Value;
if (ws.State == WebSocketState.Open)
{
var outputBuffer = new ArraySegment<byte>(buffer.Array, 0, input.Count);
await ws.SendAsync(outputBuffer, input.MessageType, input.EndOfMessage, CancellationToken.None);
}
}
}
}
});
//}, new System.Web.WebSockets.AspNetWebSocketOptions { Subprotocol = "ECHO" });
}
public bool IsReusable
{
get
{
return false;
}
}
}
public static class ChatList
{
public static ConcurrentDictionary<int, WebSocket> ActiveChatSessions = new ConcurrentDictionary<int, WebSocket>();
}

View File

@ -1,70 +0,0 @@
<%@ Page Language="C#" AutoEventWireUp="true" %>
<html>
<head>
<h1>#active websocket connection <%= "foo" %></h1>
<h1> Web Socket Echo Demo (run from Minefield!) </h1>
<script type="text/javascript">
var socket;
function initializeWebSocket() {
var host = "wss://ecctest.smartscreen.microsoft.com/Handler.ashx";
try {
socket = new WebSocket(host);
socket.onopen = function(msg){
var s = 'WebSocket Status:: Socket Open';
document.getElementById("serverStatus").innerHTML = s;
};
socket.onmessage = function(msg){
var s = 'Server Reply:: ' + msg.data;
document.getElementById("serverData").innerHTML = s;
};
socket.onclose = function(msg){
var s = 'WebSocket Status:: Socket Closed';
document.getElementById("serverStatus").innerHTML = s;
};
}
catch(ex){ console.log(ex); }
}
function send() {
var e = document.getElementById("msgText");
socket.send(e.value);
}
initializeWebSocket();
</script>
<head>
<body>
<p id="serverStatus"> </p>
This text will be sent on the socket: <input id="msgText" type=text size=30>
<input type=button value="Send" onclick="send()">
<p id="serverData" />
</body>
</html>

View File

@ -1,70 +0,0 @@
<%@ Page Language="C#" AutoEventWireUp="true" %>
<html>
<head>
<h1>#active websocket connection <%= "foo" %></h1>
<h1> Web Socket Echo Demo (run from Minefield!) </h1>
<script type="text/javascript">
var socket;
function initializeWebSocket() {
var host = "ws://<%: Request.Url.Host %>:<%: Request.Url.Port %><%: Response.ApplyAppPathModifier("~/Handler.ashx") %>";
try {
socket = new WebSocket(host);
socket.onopen = function(msg){
var s = 'WebSocket Status:: Socket Open';
document.getElementById("serverStatus").innerHTML = s;
};
socket.onmessage = function(msg){
var s = 'Server Reply:: ' + msg.data;
document.getElementById("serverData").innerHTML = s;
};
socket.onclose = function(msg){
var s = 'WebSocket Status:: Socket Closed';
document.getElementById("serverStatus").innerHTML = s;
};
}
catch(ex){ console.log(ex); }
}
function send() {
var e = document.getElementById("msgText");
socket.send(e.value);
}
initializeWebSocket();
</script>
<head>
<body>
<p id="serverStatus"> </p>
This text will be sent on the socket: <input id="msgText" type=text size=30>
<input type=button value="Send" onclick="send()">
<p id="serverData" />
</body>
</html>

View File

@ -1,112 +0,0 @@
<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
using System.Net.WebSockets;
using System.Web.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using System.Collections.Generic;
using System.Linq;
public class Handler : IHttpHandler
{
const int BUFFER = 1024*5;
bool StopFalg = false;
public void ProcessRequest(HttpContext context)
{
if (!context.IsWebSocketRequest)
{
HttpRequest Request = context.Request;
HttpResponse Response = context.Response;
Response.Write("Simple Http");
return;
}
context.AcceptWebSocketRequest(async wsContext =>
{
// set up the loop
WebSocket socket = wsContext.WebSocket;
WebSocketMessageType responseType = WebSocketMessageType.Text;
int returnSize = 1024*1024;
Thread.Sleep(500);
Task.Run(() =>
{
Recieve(socket);
});
Thread.Sleep(500);
while (socket.State == WebSocketState.Open)
{
int bytesLeft = returnSize;
var tempString = string.Empty;
while (bytesLeft > BUFFER)
{
tempString = RandomString(BUFFER);
bytesLeft -= BUFFER;
await socket.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(tempString)), responseType, false, CancellationToken.None);
Thread.Sleep(500);
}
if (bytesLeft <= BUFFER && bytesLeft >= 0)
{
tempString = RandomString(bytesLeft);
await socket.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(tempString)), responseType, true, CancellationToken.None);
Thread.Sleep(500);
}
if (StopFalg) break;
}
});
}
async Task Recieve(WebSocket webSocket)
{
ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[1024]);
while (webSocket.State == WebSocketState.Open)
{
WebSocketReceiveResult input = await webSocket.ReceiveAsync(buffer, CancellationToken.None);
if (input.CloseStatus == WebSocketCloseStatus.NormalClosure)
{
StopFalg = true;
await webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
break;
}
}
}
public bool IsReusable
{
get
{
return false;
}
}
public string RandomString(int size)
{
if (size < 1)
return string.Empty;
Random random = new Random((int)DateTime.Now.Ticks);
StringBuilder builder = new StringBuilder();
char ch;
for (int i = 0; i < size; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
builder.Append(ch);
}
return builder.ToString();
}
}

View File

@ -1,28 +0,0 @@
<%@ WebHandler Language="C#" Class="GetWebSocketConnectionCount" %>
using System;
using System.Web;
public class GetWebSocketConnectionCount : IHttpHandler {
public void ProcessRequest (HttpContext context) {
System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(@"System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
object mc = assembly.CreateInstance("System.Web.WebSockets.AspNetWebSocketManager");
Type t = mc.GetType();
System.Reflection.BindingFlags bf =System.Reflection.BindingFlags.Static| System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public;
//MethodInfo mi = t.GetProperty
object temp1 = t.GetField("Current", bf).GetValue(null);
object temp2 = t.GetField("_activeSockets", bf).GetValue(temp1);
context.Response.ContentType = "text/plain";
context.Response.Write("Active WebSocket Connections="+((System.Collections.Generic.HashSet<System.Net.WebSockets.WebSocket>)temp2).Count);
}
public bool IsReusable {
get {
return false;
}
}
}

View File

@ -1,166 +0,0 @@
<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
using System.Net.WebSockets;
using System.Web.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using System.Collections.Generic;
using System.Linq;
public class Handler : IHttpHandler
{
const int BUFFER = 1000 * 1000;
public void ProcessRequest(HttpContext context)
{
if (!context.IsWebSocketRequest)
{
HttpRequest Request = context.Request;
HttpResponse Response = context.Response;
Response.Write("Simple Http");
return;
}
context.AcceptWebSocketRequest(async wsContext =>
{
// set up the loop
WebSocket socket = wsContext.WebSocket;
////determine return type
List<string> query = wsContext.SecWebSocketProtocols.ToList();
WebSocketMessageType responseType = WebSocketMessageType.Text;
if (query[0].Split('-')[0] == WebSocketMessageType.Binary.ToString())
{
responseType = WebSocketMessageType.Binary;
}
WebSocketMessageType requestType = WebSocketMessageType.Text;
if (query[0].Split('-')[1] == WebSocketMessageType.Binary.ToString())
{
requestType = WebSocketMessageType.Binary;
}
int returnSize = Int32.Parse(query[0].Split('-')[2]);
int requestSize = Int32.Parse(query[0].Split('-')[3]);
bool canSend = Boolean.Parse(query[0].Split('-')[4]);
bool canReceive = Boolean.Parse(query[0].Split('-')[5]);
if (canSend && !canReceive)
{
await Send(socket, responseType, returnSize);
}
else if (canReceive && !canSend)
{
await Recieve(socket, requestType);
}
else if (canReceive && canSend)
{
Task.Run(() =>
{
Recieve(socket, requestType);
});
while (socket.State == WebSocketState.Open)
{
int bytesLeft = returnSize;
var tempString = string.Empty;
while (bytesLeft > BUFFER)
{
tempString = RandomString(BUFFER);
bytesLeft -= BUFFER;
await socket.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(tempString)), responseType, false, CancellationToken.None);
Thread.Sleep(200);
}
if (bytesLeft <= BUFFER && bytesLeft >= 0)
{
tempString = RandomString(bytesLeft);
await socket.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(tempString)), responseType, true, CancellationToken.None);
Thread.Sleep(500);
}
}
}
else
{
Task.Run(() =>
{
Recieve(socket, requestType);
});
}
});
}
async Task Recieve(WebSocket webSocket, WebSocketMessageType messageType)
{
ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[1024]);
while (webSocket.State == WebSocketState.Open)
{
WebSocketReceiveResult input = await webSocket.ReceiveAsync(buffer, CancellationToken.None);
if (input.CloseStatus == WebSocketCloseStatus.NormalClosure)
{
await webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
break;
}
}
}
async Task Send(WebSocket socket, WebSocketMessageType responseType, int returnSize)
{
while (socket.State == WebSocketState.Open)
{
int bytesLeft = returnSize;
while (bytesLeft > BUFFER)
{
bytesLeft -= BUFFER;
await socket.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(RandomString(BUFFER))), responseType, false, CancellationToken.None);
Thread.Sleep(200);
}
if (bytesLeft <= BUFFER && bytesLeft >= 0)
{
await socket.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(RandomString(bytesLeft))), responseType, true, CancellationToken.None);
Thread.Sleep(500);
}
}
}
public bool IsReusable
{
get
{
return false;
}
}
public string RandomString(int size)
{
if (size < 1)
return string.Empty;
Random random = new Random((int)DateTime.Now.Ticks);
StringBuilder builder = new StringBuilder();
char ch;
for (int i = 0; i < size; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
builder.Append(ch);
}
return builder.ToString();
}
}

View File

@ -1,49 +0,0 @@
<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
using System.Net.WebSockets;
using System.Web.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
public class Handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.AcceptWebSocketRequest(async wsContext =>
{
ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[1024*1024]);
WebSocket socket = wsContext.WebSocket;
// set up the loop
while (true)
{
var input = await socket.ReceiveAsync(buffer, CancellationToken.None);
Thread.Sleep(100);
if (input.CloseStatus != null)
{
await socket.CloseAsync(input.CloseStatus.Value, input.CloseStatusDescription, CancellationToken.None);
break;
}
else
{
var outputBuffer = new ArraySegment<byte>(buffer.Array, 0, input.Count);
await socket.SendAsync(outputBuffer, input.MessageType, input.EndOfMessage, CancellationToken.None);
}
}
});
}
public bool IsReusable
{
get
{
return false;
}
}
}

View File

@ -1,49 +0,0 @@
<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
using System.Net.WebSockets;
using System.Web.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Net;
using System.Collections.Generic;
using System.Linq;
public class Handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.AcceptWebSocketRequest(async wsContext =>
{
// set up the loop
WebSocket socket = wsContext.WebSocket;
ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[1024]);
while (socket.State == WebSocketState.Open)
{
WebSocketReceiveResult input = await socket.ReceiveAsync(buffer, CancellationToken.None);
if (input.CloseStatus == WebSocketCloseStatus.NormalClosure)
{
await socket.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
break;
}
}
});
}
public bool IsReusable
{
get
{
return false;
}
}
}

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
</configuration>

View File

@ -1,62 +0,0 @@
<%@ Page Language="C#" AutoEventWireUp="true" %>
<html>
<head>
<h1>#active websocket connection <%= "foo" %></h1>
<h1> Web Socket Echo Demo (run from Minefield!) </h1>
<script type="text/javascript">
var socket;
var receive_counter = 0;
function initializeWebSocket() {
var host = "ws://localhost:8080/wsclient/ChatHandler.ashx";
try {
socket = new WebSocket(host, "test");
socket.onopen = function(msg){
var s = 'WebSocket Status:: Socket Open';
document.getElementById("serverStatus").innerHTML = s;
};
socket.onmessage = function(msg){
receive_counter++;
var s = 'Server Reply:: ' + receive_counter + ' : ' + msg.data.length + ' : ' + msg.data;
document.getElementById("serverData").innerHTML = s;
};
socket.onclose = function(msg){
var s = 'WebSocket Status:: Socket Closed';
document.getElementById("serverStatus").innerHTML = s;
};
}
catch(ex)
{
console.log(ex);
}
}
function send() {
var e = document.getElementById("msgText");
//var i = 0;
//while (true)
//{
// i++;
//if (i > 100) break;
socket.send(e.value);
//}
}
initializeWebSocket();
</script>
<head>
<body>
<p id="serverStatus"> </p>
This text will be sent on the socket: <input id="msgText" type=text size=30>
<input type=button value="Send" onclick="send()">
<p id="serverData" />
</body>
</html>

View File

@ -1,366 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
table {
border: 0
}
.commslog-data {
font-family: Consolas, Courier New, Courier, monospace;
}
.commslog-server {
background-color: red;
color: white
}
.commslog-client {
background-color: green;
color: white
}
</style>
<style type="text/css">
body {
background-repeat: no-repeat;
padding-top: 85px;
font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
font-size: 0.9em;
line-height: 130%;
}
.selectBoxArrow {
margin-top: 1px;
float: left;
position: absolute;
right: 1px;
}
.selectBoxInput {
border: 0px;
padding-left: 1px;
height: 16px;
position: absolute;
top: 0px;
left: 0px;
width: 600px;
}
.selectBox {
border: 1px solid #7f9db9;
height: 20px;
}
.selectBoxOptionContainer {
position: absolute;
border: 1px solid #7f9db9;
height: 100px;
background-color: #FFF;
left: -1px;
top: 20px;
visibility: hidden;
overflow: auto;
}
.selectBoxAnOption {
font-family: arial;
font-size: 12px;
cursor: default;
margin: 1px;
overflow: hidden;
white-space: nowrap;
}
.selectBoxIframe {
position: absolute;
background-color: #FFF;
border: 0px;
z-index: 999;
}
</style>
<script type="text/javascript">
// Path to arrow images
var arrowImage = './images/select_arrow.gif'; // Regular arrow
var arrowImageOver = './images/select_arrow_over.gif'; // Mouse over
var arrowImageDown = './images/select_arrow_down.gif'; // Mouse down
var selectBoxIds = 0;
var currentlyOpenedOptionBox = false;
var editableSelect_activeArrow = false;
function selectBox_switchImageUrl() {
if (this.src.indexOf(arrowImage) >= 0) {
this.src = this.src.replace(arrowImage, arrowImageOver);
} else {
this.src = this.src.replace(arrowImageOver, arrowImage);
}
}
function selectBox_showOptions() {
if (editableSelect_activeArrow && editableSelect_activeArrow != this) {
editableSelect_activeArrow.src = arrowImage;
}
editableSelect_activeArrow = this;
var numId = this.id.replace(/[^\d]/g, '');
var optionDiv = document.getElementById('selectBoxOptions' + numId);
if (optionDiv.style.display == 'block') {
optionDiv.style.display = 'none';
if (navigator.userAgent.indexOf('MSIE') >= 0) document.getElementById('selectBoxIframe' + numId).style.display = 'none';
this.src = arrowImageOver;
} else {
optionDiv.style.display = 'block';
if (navigator.userAgent.indexOf('MSIE') >= 0) document.getElementById('selectBoxIframe' + numId).style.display = 'block';
this.src = arrowImageDown;
if (currentlyOpenedOptionBox && currentlyOpenedOptionBox != optionDiv) currentlyOpenedOptionBox.style.display = 'none';
currentlyOpenedOptionBox = optionDiv;
}
}
function selectOptionValue() {
var parentNode = this.parentNode.parentNode;
var textInput = parentNode.getElementsByTagName('INPUT')[0];
textInput.value = this.innerHTML;
this.parentNode.style.display = 'none';
document.getElementById('arrowSelectBox' + parentNode.id.replace(/[^\d]/g, '')).src = arrowImageOver;
if (navigator.userAgent.indexOf('MSIE') >= 0) document.getElementById('selectBoxIframe' + parentNode.id.replace(/[^\d]/g, '')).style.display = 'none';
}
var activeOption;
function highlightSelectBoxOption() {
if (this.style.backgroundColor == '#316AC5') {
this.style.backgroundColor = '';
this.style.color = '';
} else {
this.style.backgroundColor = '#316AC5';
this.style.color = '#FFF';
}
if (activeOption) {
activeOption.style.backgroundColor = '';
activeOption.style.color = '';
}
activeOption = this;
}
function createEditableSelect(dest) {
dest.className = 'selectBoxInput';
var div = document.createElement('DIV');
div.style.styleFloat = 'left';
div.style.width = dest.offsetWidth + 16 + 'px';
div.style.position = 'relative';
div.id = 'selectBox' + selectBoxIds;
var parent = dest.parentNode;
parent.insertBefore(div, dest);
div.appendChild(dest);
div.className = 'selectBox';
div.style.zIndex = 10000 - selectBoxIds;
var img = document.createElement('IMG');
img.src = arrowImage;
img.className = 'selectBoxArrow';
img.onmouseover = selectBox_switchImageUrl;
img.onmouseout = selectBox_switchImageUrl;
img.onclick = selectBox_showOptions;
img.id = 'arrowSelectBox' + selectBoxIds;
div.appendChild(img);
var optionDiv = document.createElement('DIV');
optionDiv.id = 'selectBoxOptions' + selectBoxIds;
optionDiv.className = 'selectBoxOptionContainer';
optionDiv.style.width = div.offsetWidth - 2 + 'px';
div.appendChild(optionDiv);
if (navigator.userAgent.indexOf('MSIE') >= 0) {
var iframe = document.createElement('<IFRAME src="about:blank" frameborder=0>');
iframe.style.width = optionDiv.style.width;
iframe.style.height = optionDiv.offsetHeight + 'px';
iframe.style.display = 'none';
iframe.id = 'selectBoxIframe' + selectBoxIds;
div.appendChild(iframe);
}
if (dest.getAttribute('selectBoxOptions')) {
var options = dest.getAttribute('selectBoxOptions').split(';');
var optionsTotalHeight = 0;
var optionArray = new Array();
for (var no = 0; no < options.length; no++) {
var anOption = document.createElement('DIV');
anOption.innerHTML = options[no];
anOption.className = 'selectBoxAnOption';
anOption.onclick = selectOptionValue;
anOption.style.width = optionDiv.style.width.replace('px', '') - 2 + 'px';
anOption.onmouseover = highlightSelectBoxOption;
optionDiv.appendChild(anOption);
optionsTotalHeight = optionsTotalHeight + anOption.offsetHeight;
optionArray.push(anOption);
}
if (optionsTotalHeight > optionDiv.offsetHeight) {
for (var no = 0; no < optionArray.length; no++) {
optionArray[no].style.width = optionDiv.style.width.replace('px', '') - 22 + 'px';
}
}
optionDiv.style.display = 'none';
optionDiv.style.visibility = 'visible';
}
selectBoxIds = selectBoxIds + 1;
}
</script>
</head>
<body>
<h1>WebSocket Sample Application</h1>
<p id="stateLabel">Ready to connect...</p>
<div>
<label for="connectionUrl">WebSocket Server URL:</label>
<input id="connectionUrl" />
<button id="connectButton" type="submit">Connect</button>
</div>
<p></p>
<div>
<label for="sendMessage">Message to send:</label>
<input id="sendMessage" disabled selectBoxOptions="CloseFromServerBugRepro;CloseFromServerWithIgnoringExceptionError" />
<button id="sendButton" type="submit" disabled>Send</button>
<button id="closeButton" disabled>Close Socket</button>
<button id="clearButton">Clear Log</button>
</div>
<h2>Communication Log</h2>
<table style="width: 800px">
<thead>
<tr>
<td style="width: 100px">From</td>
<td style="width: 100px">To</td>
<td>Data</td>
</tr>
</thead>
<tbody id="commsLog"></tbody>
</table>
<script type="text/javascript">
createEditableSelect(document.getElementById("sendMessage"));
</script>
<script>
var connectionForm = document.getElementById("connectionForm");
var connectionUrl = document.getElementById("connectionUrl");
var connectButton = document.getElementById("connectButton");
var stateLabel = document.getElementById("stateLabel");
var sendMessage = document.getElementById("sendMessage");
var sendButton = document.getElementById("sendButton");
var sendForm = document.getElementById("sendForm");
var commsLog = document.getElementById("commsLog");
var socket;
var scheme = document.location.protocol == "https:" ? "wss" : "ws";
var port = document.location.port ? (":" + document.location.port) : "";
connectionUrl.value = scheme + "://" + document.location.hostname + port + "/ws";
function updateState() {
function disable() {
sendMessage.disabled = true;
sendButton.disabled = true;
closeButton.disabled = true;
}
function enable() {
sendMessage.disabled = false;
sendButton.disabled = false;
closeButton.disabled = false;
}
connectionUrl.disabled = true;
connectButton.disabled = true;
if (!socket) {
disable();
} else {
switch (socket.readyState) {
case WebSocket.CLOSED:
stateLabel.innerHTML = "Closed";
disable();
connectionUrl.disabled = false;
connectButton.disabled = false;
break;
case WebSocket.CLOSING:
stateLabel.innerHTML = "Closing...";
disable();
break;
case WebSocket.CONNECTING:
stateLabel.innerHTML = "Connecting...";
disable();
break;
case WebSocket.OPEN:
stateLabel.innerHTML = "Open";
enable();
break;
default:
stateLabel.innerHTML = "Unknown WebSocket State: " + socket.readyState;
disable();
break;
}
}
}
closeButton.onclick = function () {
if (!socket || socket.readyState != WebSocket.OPEN) {
alert("socket not connected");
}
socket.close(1000, "Closing from client");
}
clearButton.onclick = function () {
var table = document.getElementById("commsLog");
table.innerHTML = "";
}
sendButton.onclick = function () {
if (!socket || socket.readyState != WebSocket.OPEN) {
alert("socket not connected");
}
var data = sendMessage.value;
socket.send(data);
//document.getElementById("sendMessage").value = "";
commsLog.innerHTML += '<tr>' +
'<td class="commslog-client">Client</td>' +
'<td class="commslog-server">Server</td>' +
'<td class="commslog-data">' + data + '</td>'
'</tr>';
}
connectButton.onclick = function () {
stateLabel.innerHTML = "Connecting";
socket = new WebSocket(connectionUrl.value);
socket.onopen = function (event) {
updateState();
commsLog.innerHTML += '<tr>' +
'<td colspan="3" class="commslog-data">Connection opened</td>' +
'</tr>';
};
socket.onclose = function (event) {
updateState();
commsLog.innerHTML += '<tr>' +
'<td colspan="3" class="commslog-data">Connection closed. Code: ' + event.code + '. Reason: ' + event.reason + '</td>' +
'</tr>';
};
socket.onerror = updateState;
socket.onmessage = function (event) {
commsLog.innerHTML += '<tr>' +
'<td class="commslog-server">Server</td>' +
'<td class="commslog-client">Client</td>' +
'<td class="commslog-data">' + event.data + '</td>'
'</tr>';
};
};
</script>
</body>
</html>

View File

@ -1,65 +0,0 @@
<%@ Page Language="C#" AutoEventWireUp="true" %>
<html>
<head>
<h1>#active websocket connection <%= "foo" %></h1>
<h1> Web Socket Echo Demo (run from Minefield!) </h1>
<script type="text/javascript">
var socket;
var receive_counter = 0;
function initializeWebSocket() {
var host = "ws://localhost:1234/StandardTestApp/websocket";
//var host = "ws://localhost:1234/webSocket/EchoHandler.ashx";
//var host = "ws://localhost:1234/URLRewrite/rewrite/wsclient/EchoHandler.ashx";
//var host = "ws://localhost:1234/websocketecho/test";
//var host = "ws://localhost:1234/URLRewrite/rewrite/websocketecho/test";
try {
socket = new WebSocket(host, "");
socket.onopen = function(msg){
var s = 'WebSocket Status:: Socket Open';
document.getElementById("serverStatus").innerHTML = s;
};
socket.onmessage = function(msg){
receive_counter++;
var s = 'Server Reply:: ' + receive_counter + ' : ' + msg.data.length + ' : ' + msg.data;
document.getElementById("serverData").innerHTML = s;
};
socket.onclose = function(msg){
var s = 'WebSocket Status:: Socket Closed';
document.getElementById("serverStatus").innerHTML = s;
};
}
catch(ex)
{
console.log(ex);
}
}
function send() {
var e = document.getElementById("msgText");
//var i = 0;
//while (true)
//{
// i++;
//if (i > 100) break;
socket.send(e.value);
//}
}
initializeWebSocket();
</script>
<head>
<body>
<p id="serverStatus"> </p>
This text will be sent on the socket: <input id="msgText" type=text size=30>
<input type=button value="Send" onclick="send()">
<p id="serverData" />
</body>
</html>

View File

@ -1,62 +0,0 @@
<%@ Page Language="C#" AutoEventWireUp="true" %>
<html>
<head>
<h1>#active websocket connection <%= "foo" %></h1>
<h1> Web Socket Echo Demo (run from Minefield!) </h1>
<script type="text/javascript">
var socket;
var receive_counter = 0;
function initializeWebSocket() {
var host = "ws://localhost:8080/websocketecho";
try {
socket = new WebSocket(host, "mywebsocketsubprotocol");
socket.onopen = function(msg){
var s = 'WebSocket Status:: Socket Open';
document.getElementById("serverStatus").innerHTML = s;
};
socket.onmessage = function(msg){
receive_counter++;
var s = 'Server Reply:: ' + receive_counter + ' : ' + msg.data.length + ' : ' + msg.data;
document.getElementById("serverData").innerHTML = s;
};
socket.onclose = function(msg){
var s = 'WebSocket Status:: Socket Closed';
document.getElementById("serverStatus").innerHTML = s;
};
}
catch(ex)
{
console.log(ex);
}
}
function send() {
var e = document.getElementById("msgText");
//var i = 0;
//while (true)
//{
// i++;
//if (i > 100) break;
socket.send(e.value);
//}
}
initializeWebSocket();
</script>
<head>
<body>
<p id="serverStatus"> </p>
This text will be sent on the socket: <input id="msgText" type=text size=30>
<input type=button value="Send" onclick="send()">
<p id="serverData" />
</body>
</html>

View File

@ -1,65 +0,0 @@
<%@ Page Language="C#" AutoEventWireUp="true" %>
<html>
<head>
<h1>#active websocket connection <%= "foo" %></h1>
<h1> Web Socket Echo Demo (run from Minefield!) </h1>
<script type="text/javascript">
var socket;
var receive_counter = 0;
function initializeWebSocket() {
var host = "ws://localhost:1234/StandardTestApp/websocketSubProtocol";
//var host = "ws://localhost:1234/webSocket/EchoHandler.ashx";
//var host = "ws://localhost:1234/URLRewrite/rewrite/wsclient/EchoHandler.ashx";
//var host = "ws://localhost:1234/websocketecho/test";
//var host = "ws://localhost:1234/URLRewrite/rewrite/websocketecho/test";
try {
socket = new WebSocket(host, "mywebsocketsubprotocol");
socket.onopen = function(msg){
var s = 'WebSocket Status:: Socket Open:: ' + socket.protocol;
document.getElementById("serverStatus").innerHTML = s;
};
socket.onmessage = function(msg){
receive_counter++;
var s = 'Server Reply:: ' + receive_counter + ' : ' + msg.data.length + ' : ' + msg.data;
document.getElementById("serverData").innerHTML = s;
};
socket.onclose = function(msg){
var s = 'WebSocket Status:: Socket Closed';
document.getElementById("serverStatus").innerHTML = s;
};
}
catch(ex)
{
console.log(ex);
}
}
function send() {
var e = document.getElementById("msgText");
//var i = 0;
//while (true)
//{
// i++;
//if (i > 100) break;
socket.send(e.value);
//}
}
initializeWebSocket();
</script>
<head>
<body>
<p id="serverStatus"> </p>
This text will be sent on the socket: <input id="msgText" type=text size=30>
<input type=button value="Send" onclick="send()">
<p id="serverData" />
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
</configuration>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
</configuration>

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<appSettings>
<add key="foo" value="bar" />
<add key="foo2" value="bar2" />
</appSettings>
<system.webServer>
<aspNetCore disableStartUpErrorPage="false" />
</system.webServer>
</configuration>
<!--ProjectGuid: 9755f612-a155-4bdd-9e20-37ade0b4b3ba-->

View File

@ -1 +0,0 @@
test

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet.exe" arguments="C:\gitroot\AspNetCoreModule\test\AspNetCoreModule.TestSites.Standard\bin\Debug\netcoreapp1.1\publish\AspNetCoreModule.TestSites.Standard.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true" />
</system.webServer>
</configuration>