Solved

IIS Could not find a part of the path

Posted on 2015-01-08
5
692 Views
Last Modified: 2015-01-14
Calling this code from C# web app:
                            return File(path, "application/msexcel",trimmedPath);

Open in new window

If I run in Visual studio the command works and the file is downloaded.  If I run on the server I get this error
Could not find a part of the path 'r:\results\19262\19262-BA-T1\19262-BA-T1-19262-BA-T1-2_12_11_2014_32C_CST_8870.xlsx'.

Open in new window

If I copy that path into explorer it opens on the server
In IIS I have set Physical path credentials to my userID
0
Comment
Question by:Lab Guy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 23

Expert Comment

by:Michael74
ID: 40539151
I am assuming that r is a mapped network drive. Try using the network path instead eg \\server\....
0
 

Author Comment

by:Lab Guy
ID: 40540186
Tried that as well, get this error:
Access to the path '\\servername\rts\results\19262\19262-BA-T1\19262-BA-T1-19262-BA-T1-2_12_11_2014_32C_CST_8870.xlsx' is denied.

Open in new window

0
 

Author Comment

by:Lab Guy
ID: 40540265
With the UNC method, here is the Proc Mon info:Process Mon
0
 

Accepted Solution

by:
Lab Guy earned 0 total points
ID: 40541421
Resolved it.  Issue was that the process was running under the application pool user credentials. Switched it to the NETWORK SERVICE user and it worked.
0
 

Author Closing Comment

by:Lab Guy
ID: 40548535
Figured it out with help from another source
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question