FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
Arguments: << path >> Debugging resource
strings are unavailable. Often the key
and arguments provide sufficient
information to diagnose the problem.
See
http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.41108.0&File=mscorlib.dll&Key=FileSecurityState_OperationNotPermitted
The line of code above has an error [FileSecurityState_OperationNotPermitted]
It sounds like your application is running in partial trust. To use a FileStream, you’ll need to request elevated trust:
From the Silverlight 4 FileStream documentation (emphasis mine):
EDIT: You can set an application to require elevated trust by setting the “Require elevated trust when running outside the browser” in your Silverlight project settings.