简体   繁体   English

即使文件位于物理位置,文件也不存在

[英]File doesn't exist even it is there at Physical Location

Our Hosting server recently shifted from Microsoft server 2003 to 2008 and Accordingly we we Configured IIS 7.0 In one of our module we are Checking if file exist from a perticular physical path for example 我们的托管服务器最近从Microsoft server 2003转移到2008,因此我们配置了IIS 7.0在我们的一个模块中,我们正在检查文件是否存在于特定的物理路径中,例如

 if (File.Exists(@"C:\logo.jpg"))
        {
            // some logic
        }

Actually when I go to that Physical path for logo.jpg file do exist but from code perspective It doesn't exist What I am doing wrong here,It all working in my older server with IIS 6 实际上,当我去logo.jpg文件的物理路径确实存在,但从代码角度来看它不存在我在这里做错了,它都在我的旧服务器与IIS 6工作

Note: I am matching from Physical path because i have plenty of such *.jpg file (more than 10000) 注意:我从物理路径匹配,因为我有足够的* .jpg文件(超过10000)

Please Suggest if have any clue 如果有任何线索,请建议

Many Thanks 非常感谢

将您的徽标移动到IIS用户可以读取的位置,例如项目目录或该目录的子目录,并更新代码以从那里读取徽标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM