-2

I know this question has already been already many times,but doesn't help me tackle my equation.

I currently have a Folder shared for the respective users to be zipped when the user calls the service. I get Access to the path \\IP\FolderName is denied. On research, I found out several solutions for this issue, but none worked.

I tested by trying to zip the files inside the folder and was able to do it successfully. I do not know what might be the issue! I even tried going the bad way by giving permission for Everyone for the folder (out of frustration though) and still was not successful.

My Anonymous, Asp.Net Impersonate and Windows Authentication were enabled.I do not know what might be the issue.

PS: Could I know in what identity the IIS is accessing the folder, so that I can give permissions only to that User.

Christoph Fink
  • 22,727
  • 9
  • 68
  • 113
Sandeep
  • 278
  • 1
  • 6
  • 21

2 Answers2

0

I can not help you with your main problem, but for the following:

Could I know in what identity the IIS is accessing the folder, so that I can give permissions only to that User.

You need to check what Application Pool is assigned to your application in IIS. Then go to the application pools section and there the user is listed:
IIS Identity

Christoph Fink
  • 22,727
  • 9
  • 68
  • 113
  • Hi chrfin, I have added DefaultAppPool also in my list of permissible users for Read/Write access to the folder and the same issue remains. What else might be going wrong? – Sandeep Jun 27 '14 at 07:20
0

As mentioned by Chrfin you need to first find out the Application pool used by your application(Ex: DefaultAppPool, ASP.NET v4.0 etc). Right click on the relevant App pool and go to Advanced Settings there you should see the Identity.

But best way is to go for impersonation, Check this thread for more details. With impersonation what you do is, Giving required folder access permission to an admin user on the web server and whenever you try to access these folder from within your code, you impersonate particular code block,

Using(Impersonator impersonator = new Impersonator())
{
  //Write the folder accessing logic here
}

enter image description here

Community
  • 1
  • 1
Kurubaran
  • 8,696
  • 5
  • 43
  • 65
  • Checked the identity. Can I add this in ApplicationPoolIdentity in my folder permission or The just adding the AppPool does it? – Sandeep Jun 27 '14 at 07:32