Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Read file from ASP.NET on the mapped network drive

Reply
Thread Tools

Read file from ASP.NET on the mapped network drive

 
 
Michal Valent
Guest
Posts: n/a
 
      11-24-2003
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



 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      11-24-2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?cmVpbmhhcmQ=?=
Guest
Posts: n/a
 
      11-27-2003


----- 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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>>>



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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read file from mapped drive ? dkultasev@gmail.com ASP .Net 1 06-19-2008 03:49 PM
Is there any module to map a network drive and remove a mapped network drive in perl king Perl Misc 1 10-22-2007 05:25 PM
How to read the server host name from a mapped network drive? John Java 1 12-01-2006 02:45 PM
Mapped drive over WiFi network =?Utf-8?B?Q2hhbWJlcnM=?= Wireless Networking 2 12-04-2004 04:35 AM
Problems with file upload on a network drive mapped on the web server Hrvoje Vrbanc ASP .Net 1 12-01-2003 03:09 PM



Advertisments