Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

System.IO.File.Exists And set IIS

$
0
0

Hi all.

I want Check file exists in SharePoint webpart.

So I found class the System.IO.File.Exists.

---source---

string path = @"\\nar-cla500s3\memo\test\skill\print-001.xls";  <-- return only false
            try
            {
                if (System.IO.File.Exists(path))
                    Label.Text = "true";
                else
                    Label.Text = "false";
            }
            catch { }

----source-----

If i wirte LocalPath(@"C:\memo\test\skill\print-001.xls), I Can get True.

My all APP's processID is win\lx13040020, And win\lx13040020 can access <\\nar-cla500s3\memo\test\skill\print-001.xls>

But I got only false...

is this double hope problem? I want check exists from file server.

I need your help, Thank you.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>