Request for the permission of type System.Net.WebPermission

if you get any exception like “ Request for the permission of typeSystem.Net.WebPermissionSystemVersion=2.0.0.0Culture=neutral,PublicKeyToken=b77a5c561934e089‘ …”
then check for the trust your application is having.

Even my application WPF browser application when trying to consume a web serice had this problem and finally found that the project ( wpf) should have the full trust.
to make your application full strust follow the instructions.

1. select the project —> right click and select properties
2. you will get all the properties listed. select  — > security tab from left panel.
3. now select/ check the radio button that says ” This is full trust application”

4. save and run ur application. this should solve ur problem.

source : original source

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

*

Şu HTML etiketlerini ve özelliklerini kullanabilirsiniz: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>