Showing posts with label debug. Show all posts
Showing posts with label debug. Show all posts

Monday, March 26, 2012

System.Net.Mail.SmtpClient Send method causing an Application popu

Peter,
thanks for your response. I checked my web.config and debug is set to
false. I did some searching on google for the proper reg key to modify
to disable this behavior, but was unsuccessful. Aside from needing to
figure out how to fix this, I'd love to also know *why* it's happening.
All other exceptions thrown in my web app get caught by exception
handlers except this one.
: (There is some unmanaged code stuff going on at the lower levels. My
experience with smtp and the .net controls led me to test locally and I had
to use devmail.net's product to get my sends to work. Even with a detail
trace on what was going on at the port level, I never could sort out my
issue. -greg
<ticketdirector@.gmail.com> wrote in message
news:1145937326.974099.280800@.i40g2000cwc.googlegroups.com...
> Peter,
> thanks for your response. I checked my web.config and debug is set to
> false. I did some searching on google for the proper reg key to modify
> to disable this behavior, but was unsuccessful. Aside from needing to
> figure out how to fix this, I'd love to also know *why* it's happening.
> All other exceptions thrown in my web app get caught by exception
> handlers except this one.
> : (
>

Saturday, March 24, 2012

System.Net.WebException and server committed a protocol violation

Hi there,

Does anyone knows what causes the System.Net.WebException and server committed a protocol violation and how do I debug it? Sometimes when I send the url request string to the web brower by using theHttpWebRequest andHttpWebResponseand it doesn't have any System.Net.WebException or server committed a protocol violation, but after a couple request sending, I get that error at theHttpWebResponse ,at first I thought because there are too many request sending at once, that's why it causes the System.Net.WebException and the server committed a protocol violation, but after a few minutes waiting and I re-send it again and still have the same error. Does anyone have the same problem that I have? This is the HTTPHandler Class and sending the request string by the url

I google some search and found some article saying that you can create a function to disable thewebRequest.KeepAlive = false;to solve that problem, but I got an error at 'HandlerLibrary.WebRequest(string)': no suitable method found to override, Can someone shows me the right way to fix this issue, thanks

protected override WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest webRequest = (HttpWebRequest)base.GetWebRequest(uri);

webRequest.KeepAlive = false;
return webRequest;
}