Re: problems reading network file from ASP .NET

From: Steve C. Orr [MVP, MCSD] (Steve_at_Orr.net)
Date: 02/09/05


Date: Wed, 9 Feb 2005 14:32:52 -0800

The ASPNET user account that ASP.NET uses by default does not have network
permissions. Either give the account such network permissions (likely with
the help of your network administrator) or use impersonation to have it run
under a different user account that does have such permissions.
For testing purposes you can have it run under your personal user account.
Here's more info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaspnetimpersonation.asp

-- 
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"zxkuqyb" <zxkuqyb@discussions.microsoft.com> wrote in message 
news:C6DB0A87-8B02-4ED3-B5CE-360609D99E7A@microsoft.com...
> I've written a simple ASP .NET web application that reads a text file and
> displays it in the web browser.  Works fine when reading a local path; but
> fails with "can not find a part of the path", or "can not access network
> file" when attemting to access a UNC network path.  I am using IIS 6.0 on
> Server 2003.  SharePoint Portal Server is also installed on this server. 
> I
> have granted full access to 'everyone' on the network file.  An equivalent
> .NET desktop application reads the file fine.
>
> This seems like a trival task.  What am I missing? 


Relevant Pages

  • Re: How do I add a network user to the security permissions on a shared XP folder?
    ... can't figure out what way to setup the permissions. ... user account on the fileserver computer with the same name as my own ... allowed them to list folder contents only. ... Next I allowed the NETWORK ...
    (microsoft.public.windows.server.networking)
  • Re: Access Denied to share with anonymous access disabled
    ... > Integrated Windows authentication, then you are looking at the classic ... > server, why should the server automatically be able to use your ... > to access some other network resource? ... > ASPNet local user account full access to the share. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Can not use network shares on Server 2003 standard edition wit
    ... Okay, I think that it is a permissions and or security issue, although I can ... The physical network topology, is working fine. ... are getting DCHP internal IP addresses, the Server has 2 NIC's which are ... passwords currently match the server's Users and passwords ...
    (microsoft.public.windowsxp.network_web)
  • Re: using Access database on network share?
    ... The default ASPNET user account doesn't have network permissions. ... > Exception Details: System.Data.OleDb.OleDbException: Unspecified error ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Users cant log in to sharted directory
    ... is a security issue as well, as the network is at a school for disruptive ... Apologies if this is going over old ground, but this server admin stuff is ... The shared directory has ... Permissions for the users directories is set as user/Administrator/full ...
    (microsoft.public.win2000.networking)