Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remote file system access under .Net

0 views
Skip to first unread message

Sam Critchley

unread,
Feb 25, 2001, 10:29:56 PM2/25/01
to
G'Day folks,
I'm trying to a run of the mill file transfer from one w2000 box to a win NT box.
I've written a script that runs successfully under asp (ext .asp) but any script
I write in an aspx using .Nets objects fails 100% of the time with
UnauthorisedAccessException or something like that. If anyone knows the secret to
this puzzle please reply.

The target machine has full access for both the sources IUSR and IWAM accounts
but I'm not sure how to redefine the sources box to use the global IWAM account i
created.

I'm pretty sure there is something programmatic I have to do to allow the
application to access remote files.

I found this, but I dont' really know what it does and It definately hasn't helped

FileIOPermission f = new FileIOPermission
(FileIOPermissionAccess.AllAccess, "H:\\client-websites\\");
f.AllFiles = FileIOPermissionAccess.AllAccess;

Nine ppl on experts exchange couldn't figure this puppy out, and I'm quickly
running out asprin. GL weary challenger.

Willy.D

unread,
Feb 26, 2001, 6:07:54 AM2/26/01
to
Sam,

Check your global (or application) config.web file -Security settings-, set
impersonation enable to true (false is the default).
...
<security>
<authentication mode="Windows" />
<identity>
<impersonation enable="true" />
</identity>
</security>
....

or:

....
<security>
<authentication mode="Windows" />
<identity>
<impersonation enable="true" name="machine\user"
password="samspwd"/>
</identity>
</security>
....
- if you want to impersonate a specific user.

Note that ASP.NET doesn't use IWAM_......, but only IUSR_xxxxxxx for
unauthenticated clients.
In order to allow unauthenticated clients you should create an account on
the file server with the same IUSR_xxxxxx user ID and password as on the ASP
server.
For local authenticated clients you should create the same user on both
machines with the same password.
Domain members get authenticated by the DC.

Willy.

"Sam Critchley" <sam.cr...@iconmedialab.com.au> wrote in message
news:434f01c09fa4$6416e990$a5e62ecf@tkmsftngxa07...

0 new messages