Debugging ASP.net Framework outside of Localhost or from a WAN connection

In .NET core, Microsoft recently released DevTunnels which creates an outgoing connection to a centralized service which receives request from an external provided URL when subscribing to the service, sadly there is no equivalent solution for .NET Framework. As a quick fix I threw together a proxy that resolves this issue exposing the self-hosted debug session externally to any address you prefer. Assuming you code in user (non-admin) mode which is recommended, you may have to add the ACL to netsh to allow hosting at a particular IP/HOSTNAME.

The result of this post is that port 8080 will be forwarded to port 4858. Set port 4858 to the default port used by your IIS Debug session within visual studio.

My recommended firewall configurations for proxmox

My explanation of the default rules below, add additional restrictions as needed but for starters this is a decent baseline for security to build off of.

0: Accept SSH for Linux host from your local network

1: Allow RDP from a VPN to Window boxes

2: Allow RDP from your local network

3: Allow VM’s to use DNS

4: Allow VM’s to browse via HTTPS

5: Disallow VM’s from accessing the gateways configuration (set this to your routers address) NOTE: If your router uses HTTPS, add a rule for that as well.

6: Allow VM’s to browse HTTP externally or on the local network.

7-12: Drop all incoming TCP and UDP packets that do not match the rules above and do not allow VM’s to connect to any Services anywhere (SMB, SMTP, etc etc)

13: Allow all other protocols that are not blocked in 7-12 to the gateway (If any are listening above port 1024)

14: Drop all other packages being sent out from the VM to the local network (including the gateway).

Debugging a Windows VM in Proxmox Windows 8+

Open command prompt as Administrator

“bcdedit /dbgsettings NET HOSTIP:192.168.x.x PORT:55555 nodhcp”

Note the Key

Apply these firewall rules to Proxmox for the VM

(OUT) Src and (IN)Dst UDP on port 55555 on firewall

Start WinDbg on your client machine and select “Attach to kernel”, target the assigned IP, port and key.

Sample response:

Using NET for debugging
Opened WinSock 2.0
Using IPv4 only.
Waiting to reconnect...
WARNING: Received data from 169.254.51.18 while still connected to target 192.168.0.189.
Connected to target 169.254.51.18 on port 55555 on local IP 192.168.0.189.
You can get the target MAC address by running .kdtargetmac command.
Connected to target 169.254.51.18 on port 55555 on local IP 192.168.0.189.
You can get the target MAC address by running .kdtargetmac command.
Connected to Windows 10 26100 x64 target at (Sat May 17 23:36:45.490 2025 (UTC - 7:00)), ptr64 TRUE
Kernel Debugger connection established.

Once connected, hit break | |

Run “.sympath srvC:\MyServerSymbolshttps://msdl.microsoft.com/download/symbols”

Then “.reload”

https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/-kill–kill-process-
How to kill a process
1: kd> !process 0 0 notepad.exe
PROCESS ffffd288361ce080
SessionId: none Cid: 2bfc Peb: 7984d36000 ParentCid: 19b0
DirBase: 114303002 ObjectTable: ffff848cdf583b40 HandleCount: 865.
Image: Notepad.exe

1: kd> .kill ffffd288361ce080
You need to continue execution (press 'g' <enter>) for the kill attempt to occur.
1: kd> g

To load into the context of the process use

||0:1: kd> .process /i ffffd28837458080
||0:1: kd> g
||0:5: kd> .reload
You will want to reload the symbols after swapping context. I will note I believe the .process command allows to automate the reloading of symbols after swapping context.
I was sadly unable to get .create or | to work correctly which may have something to do with using kdnet.

Resolve oodle shader error in Zombieville and Call of Duty crashing with error code 1338 (0x00001338)

For months I’ve been facing issues since a recent patch lead to COD to continuously crash. Moving the Performance Core Ratio from 57x->54x appears to fully have resolved the issue. The problem appears to be narrowed to Intel’s P cores with my 14900KF processor. Hours of time burned but with this setting it appears everything is working once again!

MCP Server written for ASP.net 4.7.2 without external dependencies

I am currently working on throwing together a MCP server for ASP.net to create invoice integration with a large language model. I tested this implementation with Cursor and was able to run successful test making this an all in one .ashx.cs solution to implementing into your own project.

I have attached a VB.net version as well. My VB.net version required two additional lines within HandleSseHandshake. It may be due to my .NET web.config setup which may result in compression being automatically appended in my response. Adding these two lines corrected the issue.

    response.Headers.Remove("Content-Encoding")
    response.AppendHeader("Content-Encoding", "identity")