473,386 Members | 1,694 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,386 software developers and data experts.

IE cache class problem

79
Hello,

http://support.microsoft.com/kb/311289

I am using code from the above page to clear IE cache files

it does the job when i click the first time on the button

but after clicking it the second time it just hangs and stops responding :(

I see that the error hangs the app on this line :
Expand|Select|Wrap|Line Numbers
  1. returnValue = ieCacheClass.DeleteUrlCacheEntry(internetCacheEntry.lpszSourceUrlName)
i would really appreciate some one could help me solve this issue

[i'm using VB2005 + VB.net]

Regards,
Zubair
Oct 17 '08 #1
6 1357
kenobewan
4,871 Expert 4TB
How far apart are the clicks? Do you need to disable the button when first called and enable once the deletion has finished?
Oct 17 '08 #2
zubair1
79
Hello

I'm extremely sorry but i dont understand what you mean? :(

The URL i posted above takes to a page on microsoft site which contains a class and module that i am using to clear the Temporary Internet Files

I make a call to this when the button is clicked, when i click that button the first time it clears the cache as it should - But when i click on the button again after clicking once.. Then it stops responding and i have no choice but to terminate the program by force.

I can't figure out what the problem is - it stops responding after i call the function the 2nd time :o but i tried one more thing...

I clicked the button to call the function so that it clears the cache - it does that.
but now i dont click on the button again.. instead i opened up my internet explorer visit another website (www.example.com). now when i check the cache folder it has some cache files again- (please note my app is still running)- because i just browsed to a page again. now after checking i click the button to clear the cache on my app once again, This time the app doesn't stop or hangs - it deletes it as its suppose to. Now i think the problem i am having is because the code couldn't find any more cache files.

But i can't figure out on how i could resolve this issue :(
again in my VB 2005 - it stops responding from this line:
Expand|Select|Wrap|Line Numbers
  1. returnValue = ieCacheClass.DeleteUrlCacheEntry(internetCacheEntr  y.lpszSourceUrlName)
please note the above code is also visible on the URL i post on my 1st post.

I would really really appreciate if some one could help me resolve this issue :(

Thank you!
Kind Regards
Oct 17 '08 #3
Frinavale
9,735 Expert Mod 8TB
Kenobewan was implying that you may be clicking the button too quickly....it may be still processing the first delete cache command when you execute the second call....this may be the reason it crashes.

He suggested disabling the button until your cache is cleared to make sure that this is not happening.
Oct 17 '08 #4
zubair1
79
Kenobewan was implying that you may be clicking the button too quickly....it may be still processing the first delete cache command when you execute the second call....this may be the reason it crashes.

He suggested disabling the button until your cache is cleared to make sure that this is not happening.
Thanks Frinavale for clearing it up for me :)

but unfortunetly thats not the case :(

I'm not clicking the button to early - i let the app delete everything and then try again - i have even waited over 15 mins just to make sure now :(

There is something wrong with that code on MICROSOFT website i guess :( but dont know how to resolve that :(
Oct 17 '08 #5
kenobewan
4,871 Expert 4TB
I'm not clicking the button to early - i let the app delete everything and then try again - i have even waited over 15 mins just to make sure now :(

There is something wrong with that code on MICROSOFT website i guess :( but dont know how to resolve that :(
That's one possibility. Another more likely is that you are not using it correctly.

What you need to now is initiate your debugging procedure. Then if you are still stuck tell us any errors that you are receiving. Insert break points if the code is just hanging to ensure that the code runs ok up until that point. Other things you might try are try/ catch blocks, timeouts and throwing exception.
Oct 18 '08 #6
zubair1
79
Hi Keno

Thanks for your response

I tried everything -

i dont know any extra ordinary ways of debugging a program - i'm quite new to vb.net - just learning my way through it all.

The one thing i notice is that it stops the app on this line Keno
Expand|Select|Wrap|Line Numbers
  1. returnValue = ieCacheClass.DeleteUrlCacheEntry(internetCacheEntr  y.lpszSourceUrlName) 
I'm positive - theres nothing wrong in my code.

If you open up the link to code i posted above from microsoft website - and if you copy / paste the code as is instructed on the site it still does the same thing (have you tried that?).

I opened vb 2005 and made a new win app file
and followed all the instructions as directed on the microsoft website but the end results are the same - it works the first time but the second time it runs it just hangs / stops responding.

I'm pretty sure its something in that code provided by microsoft but not sure what exactly might the cause be :(

can anybody try that code on microsoft and see if it works for them plz ? :(

by the way i'm not sure if this matters but i'm using IE 7.
Oct 18 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ben | last post by:
Hi all, I have written a web server that listens for requests: class MyHandler(BaseHTTPRequestHandler): def do_GET(self): if (self.path)=='/': data=makeList() else:
1
by: Joe Fallon | last post by:
I am trying to setup a cache that refreshes itself every hour. (My sample code is for every minute so I can test it.) I have found some examples that I thought worked but they all seem to fail....
6
by: Adam | last post by:
On an xp machine, the caching works as expected. I have deployed to a win2k server, and an item I add to the cache expires almost immediately some times and in under a minute in other times. The...
0
by: Vivian | last post by:
I know that the data cache is for private use, is there any method to get the cache value from another class? I have a public function to get the cache value and error occurs when I call it from...
5
by: Arjen | last post by:
Hi, I'm using the cache block of the enterprise lib Jan. 2006. There is somethings strange going on. I add a varable to the cache, let's say the string myData. string myData = "1111111";...
3
by: poolieweb | last post by:
I have created a custom user control which creates a ASPxMenu ( Same fucntion as standard menu control) from data retreved from a webservice (Reporting Services) which deals with user access. This...
5
by: Joseph Geretz | last post by:
Of course, I can store a C# class instance to the Server Cache (this.Context.Cache). I've tried it. My question is, will this destroy the scalability of my application? My background is VB6....
1
by: =?Utf-8?B?ZGF2ZQ==?= | last post by:
I have an asp.net project with a business layer (project) that has a class called references. It loads up a data set and stores in cache with the following code. _cached =...
0
by: pmouse | last post by:
Hi Guys, I've written a templated lru cache based on the SGI version of STL. To use the class, simply write: lru_cache<key_type, data_type, cache_length, custom_containercache; cache.insert( key,...
0
by: Hypnotik | last post by:
My program is to simulate cache memory. I read in the info from 2 external files, 1) access 2) data in memory. When I read the information in I display the info...and it is all correct. However...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.