I have Framework 3.5, Windows 7 Premium edition.
Use VS 2008, C#.
I want to use a OpenFileDialog in my web site (now tested on my own computer).
Also using files.
When I had just assigning filename to the class of OpenFileDialog, I have got an exception :
request for the permission of type 'system.security.permissions.fileiopermission,mscorlib, version = 188.8.131.52, Culture = neutral,PublicTokenKey=b77a5c561934e089' failed.
I see some solution, that lead me to insert on top of my method :
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")]
(I don't know whether following on top of my method is also ok :
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert, Unrestricted = true)])
Also on assemblyinfo.cs :
[assembly: FileIOPermission(SecurityAction.RequestMinimum, Unrestricted = false, Write = "c:\\MyFolder"
But the above make me access the web-page, but I can see nothing
(I think there is an exception, but don't know how to check that).
I want to know, whether I can configure something in web.config,
and put there my own permission-set (I don't know whether permission-set object give me an answer).
I need also a full tutorial for web.cofig.