CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.getting_started Tags:
Item Type: Date Entered: 1/2/2007 5:03:52 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 8 Views: 20 Favorited: 0 Favorite
9 Items, 1 Pages 1 |< << Go >> >|
"amardilo" <>
NewsGroup User
Rereading a textfile1/2/2007 5:03:52 PM

0

Hi,

I have a ASP.NET 1.1 web application that reads in values from a text file and enters them into a hashtable which is later display on screen. If I change the text file (the keys/index stay the same) the text displayed is still the old text. But if I restart IIS then the pages display the correct text.

Is this part of the functionality of a hash table?

I need to be able to change the text file a lot without having to restart IIS. Is this possible?

 

Any help would be great


 

"Curt_C" <>
NewsGroup User
Re: Rereading a textfile1/2/2007 7:08:18 PM

0

amardilo:

I have a ASP.NET 1.1 web application that reads in values from a text file and enters them into a hashtable  

 When? And yes... you will probably have to check for changes and update the hashtable.


Curt Christianson
Chief Architect, df-Software.com
df-Software.com | StarterKits.org | Darkfalz.com | WebHost4Life | Microsoft MVP
"MajorCats" <>
NewsGroup User
Re: Rereading a textfile1/2/2007 10:11:24 PM

0

I had something similar so what I did was setup a filesystemwatcher on the file and when that was triggered, it ran a function to reload the cache.  Then on my page, I would read the cache for my data.  So, you could create your hashtable and load it into the cache.  This is from the global.asax file
MajorCats
"amardilo" <>
NewsGroup User
Re: Rereading a textfile1/3/2007 9:17:21 AM

0

Thanks for your help.

So I would just write a bit of code inside global.aspx that has a file systemwatcher in it?

 

Thanks again 

"amardilo" <>
NewsGroup User
Re: Rereading a textfile1/3/2007 10:18:33 AM

0

Sorry to double post but does anyone have an example I can look at as well?
"Curt_C" <>
NewsGroup User
Re: Rereading a textfile1/3/2007 4:07:22 PM

0

the system/file watcher would have to be an outside app that is running in the system tray of the box where the file is located....
Curt Christianson
Chief Architect, df-Software.com
df-Software.com | StarterKits.org | Darkfalz.com | WebHost4Life | Microsoft MVP
"amardilo" <>
NewsGroup User
Re: Rereading a textfile1/3/2007 4:18:49 PM

0

Oh right so it would be something like an installed C# app that would sit and look through my folder. How would I then refresh my hashtable as the code for that is part of my website?

I can change the application that generates the text files (very old application) to fire off a message to my website. Would it be easy to just add something to my websites web service that would refresh the hashtable when a certain web method has been called?

Would that work? Is there a way to empty a hash table and then repopulate it?

"Curt_C" <>
NewsGroup User
Re: Rereading a textfile1/3/2007 8:04:05 PM

0

You'd have to have something in your site that checks a db entry (or something similar) to indiace the change and then re-read the file into the hashtable
Curt Christianson
Chief Architect, df-Software.com
df-Software.com | StarterKits.org | Darkfalz.com | WebHost4Life | Microsoft MVP
"amardilo" <>
NewsGroup User
Re: Rereading a textfile1/4/2007 9:15:11 AM

0

Thanks for your help guys. I think I have enough info now to try and atempt to make the changes I need to.
9 Items, 1 Pages 1 |< << Go >> >|


Free Download:













backgroundworker for asp.net app

still trying to get installed ....

smart client ffline application block

no overload for method 'add' takes '3' arguments

is the sample working ok?

enterprise application block-- how to configure debug category in logging

logging in entlib3.1

alert box has to be display when exception occured in entlib 2.0

updater application block ver2 -> proxy authentication required - error 407

build enterprise library in vs 2005 got an error

anyone using this in production?

multiple tables in one dataset via data application block?

has anyone used exception management...

typed dataset always empty - version 3

performance counters not working after restore

tree view

logging block does not log using local time zone

enterpriselibrary and sybase

question in data access component

dbcommandwrapper for enterprise library 2006

extending the msdaab

can i reuse loggingconfiguration.config?

caching through enterprize library

problem with the stored procedure..

"object must implement iconvertible" error

oraclehelper

.aspx page html cache disable doesnot works

strongly typed dataset question

does the dab close connections even with a datareader?

simple problem? cmab xml

e2.0 - the type initializer for 'microsoft.practices.enterpriselibrary.exceptionhandling.exceptionpolicy' threw an exception

enterprise library 3.1 (daab) and tableadapters

security exception in enterprise library

enterpriselibrary.logging.xml file

user interface process application block with .net 2.0

very urgent: can anybody tell how to solve download error for manifest when using updater application block

caching examples and/or articles wanted

how to use exception and log application block to log errors and exception in database in asp.net application

can logging application block listen to and log system.diagnostics.trace.write*() statements

caching application block and sql 2005 sqldependency

email tradelistener encodes message body?

configuration management application block in the use?

eventlog error!

data application block

system.security.securityexception: requested registry access is not allowed

putting arraylist inside the configurationsettings.config file

webformview event question, why?

helper for entlibrary data block (ver 4.1)

dot matrix printing

uip in web farm senario

   
  Privacy | Contact Us
All Times Are GMT