November Happy Hour will be moved to Thursday December 5th.

Physical path to Unified file in EPiServer 4.62

Vote:
 

In a site, the Unified file system folder for ~/upload sits outside the web root, say root is c:\inetpub\myweb and upload is c:\inetpub\upload_myweb. I need access to a file in the UFS physically (i want to use ADO.NET to read from an excel file), but Server.MapPath gives me c:\inetpub\myweb\upload\myfile when I want to get c:\inetpub\upload_myweb\myfile which is the actual location. Can I do this?

#25362
Oct 22, 2008 14:44
Vote:
 
#25378
Oct 23, 2008 8:45
Vote:
 
Thanks! I solved this an other way (not as elegant) by checking if the UFS of the file has the CustomProperty PhysicalPath set, and in that case build the physical path from this instead of using Server.MapPath (which is the fallback if the PhysicalPath property is not set).
#25424
Oct 24, 2008 11:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.