Solved

IIS Could not find a part of the path

Posted on 2015-01-08
5
517 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
  • 4
5 Comments
 
LVL 23

Expert Comment

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

Author Comment

by:Lab Guy
Comment Utility
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
Comment Utility
With the UNC method, here is the Proc Mon info:Process Mon
0
 

Accepted Solution

by:
Lab Guy earned 0 total points
Comment Utility
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
Comment Utility
Figured it out with help from another source
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now