0

I am working with a silverlight application, File.WriteAllText is giving File operation not permitted when trying to write to local desktop. Access to path exception. This code always works on local desktop but, is giving error when code is deployed on server.

Agile
  • 39
  • 6

1 Answers1

0

Silverlight does not have the access priveleges like u expect. If you want to add a file to your Silverlight Application at runtime, you will need to have Silverlight running Out of the Browser with Elevated priveleges. There are certain limitations to this too. You can only access files in Special Folders like My Documents, Pictures, Music etc. For more info, see this and this

Community
  • 1
  • 1
itzmebibin
  • 9,199
  • 8
  • 48
  • 62
  • Yes, that's true. Challenge is same lines of code work when taken from one branch while its not working when taken from another branch of source control – Agile Apr 21 '16 at 06:46