1
Answer

Error Message in WPF - Attempt by security transparent method

Ask a question
uday shetty

uday shetty

13y
3.6k
1
Hi,
I am writing my first web application in WPF. I just wanted to display one XPS file in document viewer. But I am getting an error in the line :
XpsDocument xpsd = new XpsDocument("D:\abcd.xps",System.IO.FileAccess.Read) ;

Error :
Attempt by security transparent method 'wpf_web.Page1..ctor()' to access security critical method 'System.Windows.Xps.Packaging.XpsDocument..ctor(System.String, System.IO.FileAccess)' failed.

I am not able to understanf this. I am using Framework 4.0

Pl help.

Uday Shetty

Answers (1)