I have an application that is designed to manage a small company at http://www.example.com. We also have a demo site that potential clients can go to see how the system works at http://www.example.com/demo. The example.com site works flawlessly, but when trying to read/write a file that is located at http://www.example.com/demo/fileHere through the demo system, I keep receiving this error:
[SecurityException: Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
I have tried changing the app.config app settings to:
<appSettings file="./demo" />
…but this did not fix it.
Any solutions or help would be greatly appreciated.
I’m trying to avoid giving the demo site its own domain.
You are receiving that exception because your executing assembly does not have permission to read/write at the desired location.