Read file from ASP.NET on the mapped network drive

M

Michal Valent

Hello,
if I try to read a file on the mapped network drive,
this error apears:

Logon failure: unknown user name or bad password.

How to set up permissions for IUSR_MACHINENAME
on the mapped network drive?

Thaks

Miso
 
C

Cowboy \(Gregory A. Beamer\)

You are better served to pull the file under another identity. This can be
done in a variety of ways.

1. Create an assembly that will sit in COM+ and set identity there
2. Spawn a new thread and set it under an identity that has access

If, however, you want to go the way you are heading, the easiest manner is
to set up the password for the IUSR_ account and create an identical
account, with the same password, on the other machine. This works well on
many installs. The only other suggestion is to have the IUSR_ account as a
domain account, but this would require a lot of registry tweaking, if it
works at all.

Of all of the suggestions, the first section contains the better options, as
it adds a layer of protection from hacks.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
G

Guest

----- Cowboy (Gregory A. Beamer) wrote: -----

You are better served to pull the file under another identity. This can be
done in a variety of ways.

1. Create an assembly that will sit in COM+ and set identity there
2. Spawn a new thread and set it under an identity that has access

If, however, you want to go the way you are heading, the easiest manner is
to set up the password for the IUSR_ account and create an identical
account, with the same password, on the other machine. This works well on
many installs. The only other suggestion is to have the IUSR_ account as a
domain account, but this would require a lot of registry tweaking, if it
works at all.

Of all of the suggestions, the first section contains the better options, as
it adds a layer of protection from hacks.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
Michal Valent said:
Hello,
if I try to read a file on the mapped network drive,
this error apears:


Hi Gregory ,
I do have the same problem but i need to do a context switch but I don'know how to do this.


Test on:
----------------
WebServer Windows 2000 Server sp4, IIS 5.0
FileServer Windows 2000 Server sp4

Problem:
-------------
aspx page is unable to read/write files that are located on a network share

SetUp:
----------
The WebServer has a share to the FileServer drive which is granted to
the WebServer Administrator only and can not be granted to any other user!!

changed:
-------------
Server Setup (Windows 2000 server only!)
- Logon to the server as an administrator
- Open up the machines local security policy (start>run>secpol.msc)
- Expand Security Settings, Local Policies, User Rights Assignment
Double click Act as part of the operating system
Click Add User or Group, enter the worker process account name (ASPNET) and click OK, and OK again

In order for this change to become effective, the web server will have to be rebooted.

my application web.config
<identity impersonate="true" userName="Administrator" password="enter_Your_PASSWORD_here"/>


if you like I can send you the project file as well
what ever I tried nothing worked, I can check for FileExist but OpenRead will give access denied

thanks in advanced
reinhard
 

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,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top