By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,285 Members | 2,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,285 IT Pros & Developers. It's quick & easy.

Copy files from Novell with ASP.NET

P: n/a
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.d oc)

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.d oc)

But this still returns False.

I'm uncertain how to proceed. What else should I try?
May 16 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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 wrote:
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.d oc)

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.d oc)

But this still returns False.

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

May 16 '06 #2

P: n/a
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.d oc)

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" <pc*****@yahoo.com> wrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
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 wrote:
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.d oc)

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.d oc)

But this still returns False.

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

May 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.