0

I'm considering using XBAP for an intranet application and I'd like to avoid setting the entire application to Full Trust.

Essentially, I have a few method calls that I'll need to make that will require Full Trust (e.g. DriveInfo.GetDrives), but I want to run the rest of the app in partial trust because it doesn't need full trust for 99% of the app.

Is there a way to have full trust on specific method calls and/or to break out the pieces that need full trust permission into a different assembly so I can keep the bulk of the app at partial trust?

Thanks!

1 Answers1

-1

Short answer: you can, .Net lets you decorate a method for an specific right level. But (and this is a big but), EACH USER have to give you that right no matter you requested the right. Maybe a click-once deployment help you more. In a click-once deployment your application inherits your user's rights.

NestorArturo
  • 2,476
  • 1
  • 18
  • 21
  • Sorry for that. With an XBAP deployment your users have to trust you. You cannot bypass the sandbox security so easy... unless they are in your domain and you ask your domain administrator to centrally configure the clients to somehow trust your app. – NestorArturo Feb 08 '12 at 19:43