Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Security / June 2005

Tip: Looking for answers? Try searching our database.

read and write file from network drive (NAS)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
oceandeep - 27 Jun 2005 03:07 GMT
I have a NAS machine within the dmzone with IP 192.168.11.xxx
where i want to write and read file from a designated location

I have created 2 folders "source" and "target" in the NAS, which i can
access through explorer
from the Web Server Machine by UNC path "\\192.168.11.xxx\source" and
"\\192.168.11.xxx\target" respectively.

However, in ASP.net (VB) code when i tried to read the file by the same UNC
path "\\192.168.11.xxx\source" , it returns error message "Logon failure:
unknown user name or bad password"

I have tried to allow full control of ASPNET user in the NAS and put ASPNET
user in the webserver side to the group "administrators" but still doesnt
help.

I searched through the web and found some results about i have to
"impersonate" the ASP.NET instance and assign a valid username and password
of the NAS. I have followed this article
http://support.microsoft.com/default.aspx?scid=kb;EN-US;306158#2 and
implemented the code to impersonate a different user.

my webserver platform is Win 2003, VS.net 2003 , .Net Framework 1.1

thanks!
Tony Bukres - 27 Jun 2005 16:55 GMT
> I have a NAS machine within the dmzone with IP 192.168.11.xxx
> where i want to write and read file from a designated location
[quoted text clipped - 21 lines]
>
> thanks!

Are you using Active Directory? If yes, you need to set up delegation in
the domain controller.

Tony
Signature

http://www.dotnet-hosting.com
Free web hosting with ASP.NET & SQL Server
No ads  - Innovative features

oceandeep - 28 Jun 2005 03:46 GMT
Hi,
Thanks for reply, i am not using active directory, those machinese are just
on the same workgroup.

> > I have a NAS machine within the dmzone with IP 192.168.11.xxx
> > where i want to write and read file from a designated location
[quoted text clipped - 26 lines]
>
> Tony
Paul Clement - 28 Jun 2005 15:33 GMT
¤ I have a NAS machine within the dmzone with IP 192.168.11.xxx
¤ where i want to write and read file from a designated location
¤
¤ I have created 2 folders "source" and "target" in the NAS, which i can
¤ access through explorer
¤ from the Web Server Machine by UNC path "\\192.168.11.xxx\source" and
¤ "\\192.168.11.xxx\target" respectively.
¤
¤ However, in ASP.net (VB) code when i tried to read the file by the same UNC
¤ path "\\192.168.11.xxx\source" , it returns error message "Logon failure:
¤ unknown user name or bad password"
¤
¤ I have tried to allow full control of ASPNET user in the NAS and put ASPNET
¤ user in the webserver side to the group "administrators" but still doesnt
¤ help.
¤
¤ I searched through the web and found some results about i have to
¤ "impersonate" the ASP.NET instance and assign a valid username and password
¤ of the NAS. I have followed this article
¤ http://support.microsoft.com/default.aspx?scid=kb;EN-US;306158#2 and
¤ implemented the code to impersonate a different user.
¤
¤ my webserver platform is Win 2003, VS.net 2003 , .Net Framework 1.1

If you're using Anonymous (no) authentication (w/o impersonation) then the local ASPNET account must
have the same credentials (password) on both machines in order to delegate security.

If you're using Basic authentication (w/impersonation) then you can use a domain account to delegate
security. If you're using local accounts in a workgroup environment then user credentials must be
the same on both computers in order to delegate security.

Credentials cannot be delegated when using Integrated Windows NT authentication unless you implement
Kerberos, which doesn't sound possible in your network configuration.

Paul
~~~~
Microsoft MVP (Visual Basic)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.