I have silverlight application in asp.net web. In web application i have folder which contains XPS file. Now In silverlight on button click event I am opening a popup box which contains XPS Viewer.
On button click event i’am sending URI to public function of Popup control.
and i am trying to create filestream from that uri path but getting error
File operation not permitted Access to path “” denied ?
Using AbsolutePath m trying to creat file stream
From which property of URI object i should try to create FileStream or how do i achieve it?
Creating a filestream from there will not be permissible as silverlight is in a sandboxed environment. If you need a stream open the the file first with webclient and OpenReadAsync and then use the stream from the result.
Have a look at the answer here to see more or less how to do it.
You might also be interested in this link.