Directory.Move = Lost Session

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
 
T

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! :-(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top