Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Got "InvalidOperationException" when use System.IO.File.GetAccessControl(filePath) to access a network drive offline file

$
0
0

Hi every one,

This is may first time to post a question in MSDN forums here. a little bit nervous. ^^

I got a "InvalidOperationException" when use System.IO.File.GetAccessControl(filePath) to access a network drive offline file.

To reproduce this exception, should create a shared folder on server. and make it can cache in client. and then access this shared folder in client PC. finally shutdown the server which created the shared folder..

Now if you want use File.GetAccessControl(filePath) to check whether this file can be wrote. it will throw an exception.

but, actually this file can be wrote. 

ah, So question is how to check whether file is writeable if a file in a offline shared folder???

Any one can give me some suggestion?

Thank you.


Viewing all articles
Browse latest Browse all 8156

Trending Articles



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