Put this in your web.config:
<customErrors defaultRedirect="Error.aspx" mode="Off" />
Error 500 is too generic to diagnose.
Once you do that, it will give you the precise locatoion that is causing your site to misbehave, and from that point, you can probably identify the problem and fix it.
From the looks of it though, it seems that
wResp
might be
null
, or the returned value from
wResp.GetResponseStream
might be
null
. Putting a
try/catch
block around the code would be a good idea...