Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:


I have the following problem :
i want to copy an excel file from a remote server on my web server.
the network path is for example \\max71\excelmodels\file1.xls
From web server i see this directory.
when i run my application in asp.net i get the error could not find file \\max71\excelmodels\file1.xls.
I have read that this can be a security problem (but in other question i see error denied access for example).
in my web.config file i have already add identiy impersonate="true" but nothing change.
  • 2
1 Solution
ok, first try mapping a network drive to \\max71\excelmodels...  just to make sure you can access that directory...

don't use impersonation, just give asp.net and IUSR_machinename user full (or read) permissions on the \\max71\excelmodels folder. now, when you give the file path to copy, use full UNC path \\max71\excelmodels\file1.xls..

i hope \\max71 has .net installed on it with IIS otherwise those users won't exist on max71.  if not, you may have to use impersonation with a specific account which has access to \\max71\excelmodels.
<identity impersonate= "true" userName="User" password="password"/>

when you try to map a network path with a user that doens't have the permissions, you might have noticed "path not found/directory doesn't exist" message..
NUCLEAREAuthor Commented:
i have give permission to my folder excelmodels to asp.net and iusr_machinename.
In remote server there is IIS and .net framework.
I my web.config file on web server i have delete identity impersonate.
From web server if i run \\max71\excelmodels i see the directory(note that i have to enter a password, perhaps
can be this the problem)
I get always the same error in my asp.net from web server.
you said you have to enter a username/password to see the directory on \\max71 ...

can you try putting this line in web.config with that credentials and try.

<identity impersonate= "true" userName="User" password="password"/>

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now