473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

implementating idispose of webresponse.

hi all
can some one tell me how to call dispose method of webresponse.
I am currently using close method.
But this is creating problem. So i want to use dispose method of
webresponse.
Can some one tell me how to do this.

Any help will be appreciated.
thanks in advance.

Nov 17 '05 #1
3 1629
Hi,

What's the exact problem with using the Close method (use of which is
recommended by Microsoft in the MSDN docs)?

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
<tr**************@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
hi all
can some one tell me how to call dispose method of webresponse.
I am currently using close method.
But this is creating problem. So i want to use dispose method of
webresponse.
Can some one tell me how to do this.

Any help will be appreciated.
thanks in advance.


Nov 17 '05 #2
hi
problem is at a time of calling close on webresponse,sometime my
program is blocking.
it is not throwing exception not executing next statement.
Because of which my whole application is collapsing.
This is vary serious problem for me.
In one link i read that close ia blocking program.
I don't know why this is happening.
So i though that may be dispose will solve my problem.

Thanks.

Nov 17 '05 #3
<tr**************@yahoo.com> wrote:
can some one tell me how to call dispose method of webresponse.
I am currently using close method.
But this is creating problem. So i want to use dispose method of
webresponse.
Can some one tell me how to do this.


Well, if you're always calling Close, it should be okay. However, you
should just be able to do:

using (WebResponse resp = ...)
{
...
}

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Sam Sungshik Kong | last post by:
Hello! A disposable object's Dispose() method can be called either explicitly by the programmer or implicitly during finalization. If you call Dispose, the unmanaged resources are released...
2
by: gizmo | last post by:
Hi, I'm using the following code to request the html source from the quoted site. ...... string url = "http://www1.soccerstand.com/"; WebRequest webRequest = WebRequest.Create(url);...
2
by: Jeff G. | last post by:
Hello everyone, I have read through the newsgroups (thank God for 'em!) extensively looking for an example of how to pass a file (PDF) from a webresponse stream down to a web client. Here's the...
4
by: CindyH | last post by:
Hi - hope someone can help with this - this code was working for a while in the 'real' code and then suddenly stopped - not sure what happen. I made two simple forms on localhost to try to test...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.