esri.config.defaults.io.proxyUrl = "../proxy.ashx";
But, how do I do this in .NET? I am very new to the GIS space.
Please read the following information.
In the "ASP.NET" section, there is the instruction for IIS, and also you can download "proxypage_net.zip" which include proxy.ashx.
Hope this helps you.