Classic ASP Requires Chilkat v11.6.0+
Classic ASP
Configure MCP Connection Settings
See more MCP Client Examples
Demonstrates Mcp.SetConnectionSettings, which copies connection settings -- such as an HTTP proxy, SOCKS proxy, bind IP address, and TLS options -- from a Socket and applies them before connecting.
Background. This is optional; if not used, a direct connection is made. It is useful when the MCP server must be reached through a proxy or with specific TLS settings.
Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
set mcp = Server.CreateObject("Chilkat.Mcp")
' Configure connection settings on a Socket -- such as an HTTP proxy, SOCKS proxy, bind IP address,
' or TLS options -- and apply them to the MCP client before connecting. This is optional; if not
' used, a direct connection is made.
set sock = Server.CreateObject("Chilkat.Socket")
sock.HttpProxyHostname = "proxy.example.com"
sock.HttpProxyPort = 8080
success = mcp.SetConnectionSettings(sock)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( mcp.LastErrorText) & "</pre>"
Response.End
End If
success = mcp.Connect("https://learn.microsoft.com/api/mcp")
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( mcp.LastErrorText) & "</pre>"
Response.End
End If
Response.Write "<pre>" & Server.HTMLEncode( "Connected using the configured connection settings.") & "</pre>"
%>
</body>
</html>