1

I have 1 service app(asp.net) that will upload txt file. I would like to upload the file to network share drive. example of network mapped drive: Z:\HR\hr\t\clock. If i run the web page throught visual web developer, it can successfully save the file. but if i run the web page directly via IE, it cannot save. I already set the network folder for everyone is full control right. it throw an exception System.IO.DirectoryNotFoundException: Could not find a part of the path 'Z:\HR\t\clock102528122011113418.txt'.

Thanks

user1129492
  • 11
  • 1
  • 2
  • 1
    When you map a network drive, this drive is mapped pr user. If you are logged in as "admin" then the IIS user (or applicationpool user) wont be able to use that share. I don't know how you can fix this but I think that is your problem.. – stian.net Jan 04 '12 at 08:47

1 Answers1

2

That will be because of Security Contexts I would think.

Running it from VWD runs under your security context, running "directly from IE" will run under a different context (Traditionally, IUSR_MachineName)

One scenario you have an account that has permissions, the other you do not.

I would recommend creating a service account to do the work and give that the least permissions possible and go from there.

SpaceBison
  • 3,704
  • 1
  • 30
  • 44