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: 12 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:













making dll for aspnet

problem installing visual studio 2005 pro

sharing vb code

grid view updating using gridview_updating in asp.net 2.0

asp.net development server not automatically starting

open website in visual studio 2005

importing a website

how to script out my .mdf database i have in visual studio?

upgrade from vs.net 1.1 to 2.0

not refreshing .js source code

control can't seem to be renamed

localization in vs2005 using satellite assemblies

assembly references in vs2005 web project pangs

have to click twice on asp.net menu control

regular expression bugs caused by sp1?

64bit debugging on 32bit windows xp os

use of code directory

process.start problem

problem publlish project and include xml-files

vs2005 - cannot access public class?

can't add microsoft sql server from visual studio

i could not debug my web application in vs 2005

create versioned assemblies for precompiled web sites

using the debugger

send email to different domain

unable to open server explorer

code directory and modifiers

how to make letter with reportviewer

difference between public and shared variable

placing the controls after drag & droping the controls at the right position in asp.net

data provider for ole db doesn't work in vs2005

sharepoint webparts with visual studio 2005?

my tableadapter doesn't show up on the toolbox

unable to attach.the binding handle is invalid

problem renaming project folder containing an asp.net web application project

web deployment projects: when? where?!?

french text for a menu item

visual studio config: how do i set code styles?

any manual uninstall for vs 2005

building http://localhost:3336/ vs http://localhost:3336/projecta

insert checkbox in datagrid on windows forms with vb.net

xsd schema generation

web deployment project: error msb6006

web service problem - plz help

vs 2005 team project management

connecting through frontpage extensions causing account lock out - i think

appdata folder

login control - creating new user questions

vs.net 2005 web forms designer changes

change to masterpage not building client page correctly?

   
  Privacy | Contact Us
All Times Are GMT