Directory.Move = Lost Session

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

I'm porting an old Coldfusion based content and asset management system to
ASP.NET (and oh, how good it feels to write REAL code again - was a C++ hack
for 10 years, started doing coldfusion about 4 years ago - moving to .NET at
the moment - C# rocks a fat one - it's real code :-)).

Anyway, I've hit a bit of a problem which I don't quite know how to solve.
Part of the system I'm porting lets users view/rename/delete/upload
"assets" - these can be gif's, jpeg's, doc's, pdf's or whatever, and the
interface just presents a "windows-explorer-like" treeview interface showing
the contents of the ~/assets/ directory and it's sub-directories. Anyway, it
is almost working a treat, but the problem comes when I let a user create a
sub-directory, or, rename a sub-directory.

The directory structure of the app is like this:

admin/modules/assetManager/ - holds the interface webforms etc
admin/secure/login/ - holds the authentication form
assets/ holds the physical files themselves and any user created
sub-directories
bin/ obvious what this is for

If a user selects "create folder", the system creates the folder correctly
(inside the assets directory, or whichever sub-directory it was actioned
on), but then the next thing is the user is automatically logged out and
presented with the login credentials form again....

I can see what's happening - for some reason the creation (or rename) of a
directory is forcing the application to restart entirely (perhaps to check
and recompile stuff - I don't know), which in turn causes the session
variables to be cleared and therefore my app thinks the user isn't logged in
and redirects them to the login details webform....

Anyone know why this is happening and how I can resolve it so the user
doesn't have to log back in every time they rename or create a directory ?
It must be pretty common to need this sort of functionality in document or
content management systems surely - and I'm thinking there MUST be a
workaround for this problem, or I'm being extremely dumb!! ;-)

My dev system is WinXP Pro, .NET 1.1 and IIS5 - if this makes any
difference.

As ever, any help greatly appreciated
Cheers
Tony
 
Just noticed something new - I said it's during creation or renaming - I was
wrong with that - it's actually only if I rename a folder that this
behaviour occurs! :-(
 
Back
Top