Copy files from Novell with ASP.NET

1

1388-2/HB

On a W2K3 box running IIS 6 I have a web app that implements Forms
Authentication mixed with AD (the login page autheticates users against AD &
impersonates them with each page request). This means my process identity
varies, and is not necessarily "ASPNET" or "IUSR...". My process identity
for any given page request will be user1, user2, user3, etc. (there's a lot
of them)

This web app needs to copy files (Word documents) from our old Novell 5
server onto the W2K3 box, and I'm encountering what I believe is a
permissions problem. Here's what I've tried doing:

IO.File.Exists(\\NovellServer\volume\folder\file.doc)

This is a valid path to a valid file that does exist, but the query returns
False. I assume the web app doesn't have access this
server/volume/folder/file from within the security context of the currently
executing request. Which does make sense since none of the users typically
logging into the website ever needed or were ever granted logins to the
Novell server.

I do have one Novell login that is "synchronized" with AD (the username and
password are the same). So, I attempted this:

'...code gets to the point where it is ready to play with novell files:

[impersonate as sychronized AD/Novell user]

IO.File.Exists(\\NovellServer\volume\folder\file.doc)

But this still returns False.

I'm uncertain how to proceed. What else should I try?
 
N

NumbLock

If you have permission on the web server box, try mapping a drive to the
novell server and accessing it via it's drive letter. The web server
will have to be running the novell client. If you are unable to map a
drive, your unc path won't work either.

Just a thought...
 
1

1388-2/HB

Well so far I'm testing this on my dev workstation which is an XPSP2 box w/
vs2003. I'm an admin on my workstation (on both win/novell sides) and I'm
always logged into Novell via Novell Client for Windows. On this dev
workstation I can type either a mapped drive or a UNC into windows explorer
or a dos window and get to \\NovellServer\volume\folder\file.doc, or,
K:\folder\file.doc. Either way.

When I run this asp.net application, on this same workstation, and
programmatically ask if either \\NovellServer\volume\folder\file.doc, or,
K:\folder\file.doc exists, it returns False either way.

Which has led me to suspect that the impersonation I'm doing in the website
is entering into a new context that isn't aware of, or doesn't have access
to, the Novell connections that were created created when I logged into my
dev machine in the morning.

I downloaded an ActiveX suite from Novell and have been able to make a
little bit of progress (I think) - I can successfully "login to Novell"
programmatically, for what it's worth:

Dim objNWSession As New NWSessLib.NWSessClass

With objNWSession
.Bindery = False
.PreferredServer = "NovellServer"
.RunScripts = True
bolLogin = .Login("NDS:\\NovellServer\[O]\[OU]", "user", "pwd", False)
End With

And this "works" (bolLogin returns True). And I can proceed to check
objNWSession.DriveMappings, for "user", etc, and everything looks ok there.

However, still after having done this,

IO.File.Exists(\\NovellServer\Volume\Folder\File.doc)

says False.

So... I'm still having a hard time with this. The little Novell activeX
object is aware it's logged in, but the OS isn't being notified and so the
..NET framework can't see the newly acquired network resources. Or
something.

I dunno if I'm going about this the wrong way, but it seems to me my next
step is to somehow inform windows that objNWSession has logged the current
security context into Novell and obtained access to new network resources.

Not sure how/if I can do that tho...

NumbLock said:
If you have permission on the web server box, try mapping a drive to the
novell server and accessing it via it's drive letter. The web server will
have to be running the novell client. If you are unable to map a drive,
your unc path won't work either.

Just a thought...
1388-2/HB said:
On a W2K3 box running IIS 6 I have a web app that implements Forms
Authentication mixed with AD (the login page autheticates users against
AD &
impersonates them with each page request). This means my process
identity
varies, and is not necessarily "ASPNET" or "IUSR...". My process
identity
for any given page request will be user1, user2, user3, etc. (there's a
lot
of them)

This web app needs to copy files (Word documents) from our old Novell 5
server onto the W2K3 box, and I'm encountering what I believe is a
permissions problem. Here's what I've tried doing:

IO.File.Exists(\\NovellServer\volume\folder\file.doc)

This is a valid path to a valid file that does exist, but the query
returns
False. I assume the web app doesn't have access this
server/volume/folder/file from within the security context of the
currently
executing request. Which does make sense since none of the users
typically
logging into the website ever needed or were ever granted logins to the
Novell server.

I do have one Novell login that is "synchronized" with AD (the username
and
password are the same). So, I attempted this:

'...code gets to the point where it is ready to play with novell files:

[impersonate as sychronized AD/Novell user]

IO.File.Exists(\\NovellServer\volume\folder\file.doc)

But this still returns False.

I'm uncertain how to proceed. What else should I try?
 

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,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top