Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
File.Exist或GetUserStoreForApplication.FileExist无法在Silverlight中工作_Silverlight_File Io - Fatal编程技术网

File.Exist或GetUserStoreForApplication.FileExist无法在Silverlight中工作

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

我尝试了以下代码,但没有成功。银光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.ini")))
    {
        MessageBox.Show("File does not exist ");
    }
}
我认为问题与权限有关

有人知道如何读取文件或检查silverlight 4应用程序中是否存在文件吗

我们将不胜感激。
谢谢

升级到Silverlight 5,并在项目属性中选中“在浏览器中运行时需要提升信任度”选项