?
Solved

IIS Could not find a part of the path

Posted on 2015-01-08
5
Medium Priority
?
770 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:Michael Fowler
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

800 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