Answered by:
Access to shared folder with an asp.net application using forms authentication

Question
-
User-1307893241 posted
Hi,
We have an ASP.Net application which uses forms authentication. I am trying to access a shared folder using the application and facing access denied errors.
Can you help me understand how to setup correct permissions.
IIS Server and the Server which has the shared folder are not part of a windows domain. Application pool is running with NETWORK SERVICE account and it has full control access on the shared folder.
Thanks.
Thursday, June 9, 2016 6:41 PM
Answers
-
User753101303 posted
Hi,
NETWORK SERVICE is seen as MachineName$ when accessing external resources. So you should likely give access to MachineName$ rather than to NETWORK SERVICE (which is bascially the same as "localhost" ie it is always the machine on which you are).
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, June 17, 2016 8:05 AM
All replies
-
User-359936451 posted
I think you need to provide permission to IUSER_ASP or something like that check the accounts,
Its depend on which version if IIS and Window server you are using.
I think IIS 8 you give the permissions to the APP pool that the site is running under.
UPDATE:
Its IIS_USERS (ServerName\IIS_IUSERS)
Thursday, June 9, 2016 6:44 PM -
User765422875 posted
You should set authorization rules for the folder in the web.config.
Thursday, June 9, 2016 7:07 PM -
User-1307893241 posted
It is Windows 2008 Server R2 and IIS 7.5
IIS_IUSRS has full control permissions on the shared folder but it doesn't work.
Authorization rules are all set correctly.
Monday, June 13, 2016 9:32 AM -
User-359936451 posted
Where is the shared folder? It must be within the web server published folder structure.
you will not be able to access a network share as this is an obvious security issue.
Wednesday, June 15, 2016 6:37 PM -
User753101303 posted
Hi,
NETWORK SERVICE is seen as MachineName$ when accessing external resources. So you should likely give access to MachineName$ rather than to NETWORK SERVICE (which is bascially the same as "localhost" ie it is always the machine on which you are).
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, June 17, 2016 8:05 AM