File.Exist或GetUserStoreForApplication.FileExist无法在Silverlight中工作
我尝试了以下代码,但没有成功。银光4号File.Exist或GetUserStoreForApplication.FileExist无法在Silverlight中工作,silverlight,file-io,Silverlight,File Io,我尝试了以下代码,但没有成功。银光4号 if (!(File.Exists(@"C:\sybase\ini\sql.ini"))) { Log("Not able to find ini file"); return false; } or using (var store = IsolatedStorageFile.GetUserStoreForApplication()) { if (!(store.FileExists(@"c:\sybase\ini\sql.i
if (!(File.Exists(@"C:\sybase\ini\sql.ini")))
{
Log("Not able to find ini file");
return false;
}
or
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
if (!(store.FileExists(@"c:\sybase\ini\sql.ini")))
{
MessageBox.Show("File does not exist ");
}
}
我认为问题与权限有关
有人知道如何读取文件或检查silverlight 4应用程序中是否存在文件吗
我们将不胜感激。
谢谢升级到Silverlight 5,并在项目属性中选中“在浏览器中运行时需要提升信任度”选项