Re: Access a Network Share From ASP.NET

From: Matjaz Ladava (matjaz_at__nospam_ladava.com)
Date: 05/22/03


Date: Thu, 22 May 2003 14:35:33 +0200


If you have correctly followed instructions on creating custom ASPNET
password and hardcoded it into machine.config, then it should work. Is the
server also your development machine ?
Normaly i use following procedure to test this.

1. Go into command prompt on the server, that is hosting application which
is trying to acces another share
2. execute runas /user:ASPNET cmd.exe
3. System will prompt you for a password. Enter password, that was set for
local ASPNET account
4. You should now have command prompt window running as ASPNET account
5. Try net view \\otherserver or dir\\otherserver\sharename
6. If you het access denied, then you have problem with ACL/SHARE settings
on remote server.
7. Go there and check share permissions and file permissions
8. That is all
9. You can try runas allso on remote server to verify that you can logon and
do stuff there.

Hope this helps a little.

Regards

Matjaz Ladava

"silvano paxia" <silvano@dexelop.com> wrote in message
news:O%232NOpFIDHA.3604@tk2msftngp13.phx.gbl...
> Sorry Matjaz if i bother you again
> using the runas commad the aspnet user
> does not have permissions to open notepad
> to open the computer manager etc.
>
> How can i estend the permissions?
>
> Also i want to tell you that i'm using the mirrored accounts
> (created an ASPNET account in the server with the same
> password) but nothing.
>
> Thanks again for your help.
>
> --silvano
>
> "Matjaz Ladava" <matjaz@_nospam_ladava.com> ha scritto nel messaggio
> news:um6cGDFIDHA.2216@TK2MSFTNGP11.phx.gbl...
> > one way would be to log on as ASPNET account and try to access the
share.
> > You can use runas command to try this.
> >
> > Regards
> >
> > Matjaz Ladava
> >
> > "silvano paxia" <silvano@dexelop.com> wrote in message
> > news:usVma7EIDHA.1572@tk2msftngp13.phx.gbl...
> > > Thanks MatJaz!
> > >
> > > How can i check if the .Net Account has permission
> > > to access the share?
> > >
> > > Many Thanks
> > >
> > > --silvano
> > >
> > > "Matjaz Ladava" <matjaz@_nospam_ladava.com> ha scritto nel messaggio
> > > news:eXs$r2EIDHA.1608@tk2msftngp13.phx.gbl...
> > > > This means, that your .NET account doesn't have permission to acess
> the
> > > > share. Are you in domain enviroment ? If yes try with impersonation.
> If
> > > no,
> > > > then you must doublecheck your mirrored accounts.
> > > >
> > > > Allso read
> > > >
> > >
> >
>
http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetch08.asp?frame=t
> > > rue
> > > > which has info about how to acieve that.
> > > >
> > > > Regards
> > > >
> > > > Matjaz Ladava
> > > >
> > > > "silvano paxia" <silvano@dexelop.com> wrote in message
> > > > news:%23gUwsnEIDHA.2080@tk2msftngp13.phx.gbl...
> > > > > Thank Matjaz,
> > > > >
> > > > > I change to the UNC path and know the message is
> > > > >
> > > > > Access Denied!
> > > > >
> > > > > Please Help
> > > > >
> > > > > thanks
> > > > >
> > > > > --silvano
> > > > >
> > > > > "Matjaz Ladava" <matjaz@_nospam_ladava.com> ha scritto nel
messaggio
> > > > > news:#681H68HDHA.2068@TK2MSFTNGP10.phx.gbl...
> > > > > > ASP account knows nothing about drive T, you have to use UNC
paths
> > in
> > > > the
> > > > > > form of \\servername\sharename\....
> > > > > >
> > > > > > Regards
> > > > > >
> > > > > > Matjaz Ladava
> > > > > >
> > > > > > "silvano paxia" <silvano@dexelop.com> wrote in message
> > > > > > news:eV$3Q18HDHA.3260@tk2msftngp13.phx.gbl...
> > > > > > > Hi,
> > > > > > >
> > > > > > > i need to access (read/write) a file server from
> > > > > > > my asp.net application.
> > > > > > >
> > > > > > > The two machines are not in a domain but
> > > > > > > a workgroup.
> > > > > > >
> > > > > > > Even if i followed the msdn instructions creating
> > > > > > > the mirrored accounts:
> > > > > > >
> > > > > > > 1) Set password for ASPNET
> > > > > > >
> > > > > > > 2) Hardcoded password in machine.config
> > > > > > >
> > > > > > > 3) created an ASPNET account in the file server having
> > > > > > > the same password as 1)
> > > > > > >
> > > > > > > Nothing...
> > > > > > >
> > > > > > > Always the same error message:
> > > > > > >
> > > > > > > Could not find a part of the path for "T:\banners\banner1.jpg"
> > > > > > >
> > > > > > > Please Help
> > > > > > >
> > > > > > > --silvano
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: ASP.NET process identity does not have read permissions to the global assembly cache.
    ... make sure that the ASPNET account ... The User profile directory is used by the GAC cache lock files and the security ... review the necessary permissions list found at this page: ... "Server Application Unavailable ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Access a Network Share From ASP.NET
    ... > If you have correctly followed instructions on creating custom ASPNET ... > server also your development machine? ... Go there and check share permissions and file permissions ... You can try runas allso on remote server to verify that you can logon ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Problems with authenticated users accessing asps
    ... the ASPNET user (or more accurately as the user that is running the ASPNET ... So even if the site is NT auth and the user logs in, ... actual file access for read and write is as the aspnet account. ... > I have IIS serving static content and asp's from IIS6 on Win2003 Server. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Web Service Security problem
    ... the server. ... the failed logon attempt was ASPNET. ... >Allowin that account access to lan resources would be a large security risk. ... >> Another possible issue is the ASPNET account on the server. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Windows Identity and IIS6.0
    ... Please undo your permission changes to ISA_User and ASPNET account -- they ... On IIS6, ASP.Net is configured to not impersonate, and the Application Pool ... My operating system is Win 2003, Framework is 1.1 and Web Server is IIS 6.0 ... I have give Full permission to the ISA_User account and ASPNET Account. ...
    (microsoft.public.inetserver.iis)