473,799 Members | 3,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help regarding webresponse.

Hi all.
i am having problem at a time of validatiang url.
I am using webrequest and webresponse class to get content of
particular url.
My problem is after using webrequest and webresponse class i want to
remove memory allocated by this object. am using close method and after
that i am setting it to null.
My pronlem is that at a time of setting webrequest to null sometimes it
is taking more than 10 minutes.
similary at a time of closing webresponse object it is taking large
amount of time.
This problem is not coming continouously.

This problem is coming especially when i am continuously running my
application for 2 to 3 days.

Can some one tell me why this is happening.
any help will be appreciated.
thanks in advance.

Nov 17 '05 #1
2 1587
I don't understand what the issue here is really. WebResponse
implements IDisposable and as long as you call Dispose (which should be the
same as calling Close), you don't have anything to worry about. The garbage
collector will take care of the object on the heap when it determines it
needs to be.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

<tr************ **@yahoo.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Hi all.
i am having problem at a time of validatiang url.
I am using webrequest and webresponse class to get content of
particular url.
My problem is after using webrequest and webresponse class i want to
remove memory allocated by this object. am using close method and after
that i am setting it to null.
My pronlem is that at a time of setting webrequest to null sometimes it
is taking more than 10 minutes.
similary at a time of closing webresponse object it is taking large
amount of time.
This problem is not coming continouously.

This problem is coming especially when i am continuously running my
application for 2 to 3 days.

Can some one tell me why this is happening.
any help will be appreciated.
thanks in advance.

Nov 17 '05 #2
Hi
thanks for your reply.
But i am facing problem at a time of closing webresponse by using
webresponse.clo se.
My program is blocking at this statement.
Can u tell me why this is happening.
thanks in advance.

Nov 17 '05 #3

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

Similar topics

0
1482
by: amine | last post by:
I really need help on this please. I am writing an application for an Ipaq and I am trying to enable the application to connect to a DAV server which can is basically an HTTP server that acts like an FTP server. I used the following code WebRequest req = WebRequest.Create (url); req.Credentials = new NetworkCredential (username, pass); WebResponse res = req.GetResponse();
6
4607
by: No_Excuses | last post by:
All, I am interested in reading the text of a web page and parsing it. After searching on this newgroup I decided to use the following: ******************************* START OF CODE ************************ String sTemp = "http://cgi3.igl.net/cgi-bin/ladder/teamsql/team_view.cgi?ladd=teamknights&num=238&showall=1"; WebRequest myWebRequest = WebRequest.Create(sTemp); WebResponse myWebResponse = myWebRequest.GetResponse();
0
2766
by: Johann Blake | last post by:
In my need to decode a JPEG 2000 file, I discovered like many that there was no functionality for this in the .NET Framework. Instead of forking out a pile of cash to do this, I came up with the idea that costs nothing and it is inheritently built into the Framework. So here is the solution... When you use the WebRequest and WebResponse classes to obtain graphics from a web site, these classes have built-in decoding for JPEG 2000 files....
2
9706
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); WebResponse webResponse = webRequest.GetResponse(); beginStr = new StreamReader(webResponse.GetResponseStream(),
3
1447
by: trialproduct2004 | last post by:
Hi all i am having C# application which is processing 5 urls asychronously using webrequest and webresponse classes. What i want is as soon as any url request processing is completed i want to decrement one counter and increment another count. How should i do this in call back. Do i need to use monitor so that no two calls can modified that counter at the same time or without using any sychronous object i can do this. Because when i am...
2
5977
by: kkb | last post by:
Hello! First, I'm sorry because of my english... I'll try to be understandable! I've got a strange problem using .NET 2003 C# and I haven't figured it out for a long time. I'm implementing an application to download images using System.NET classes (webclient, webrequest) asynchronously behind proxy server. The reading method works like this: System.Net.WebClient client=new System.Net.WebClient();
1
3142
by: Shashank | last post by:
Hi all, I am a new member of this community. I am making a http request to a html file placed on a Apache server. On this page there is an embeded perl statement which requires reading environment variables from the server. When I am typing the url of the html page in my browser, I am able to read the Environment variables from the server and getting the desired results. But, when I am making Http request through my window application,...
0
2444
by: nomad | last post by:
Hi, I am using HTTPWebRequest to add a client certificate. I am then using HTTPWebRequest to POST xml to a web service which requires the attached client certificate to authenticate with their server certificate. However, I keep getting an error "Unable to connect to remote server". I know I am able to connect to their server and retrieve an XML response as we were able to do this using our old solution (WinHTTP in Visual Basic 6). ...
4
2132
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 what is going on. I'm not getting any errors right now, but code is not working either - not reading the post in second form or else the first form is not sending it correctly....
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10252
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9073
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.