Hi,
ich habe ein kleines Programm geschrieben welches natürlich auch ein Logfile benutzt.
Wenn ich das Programm in einer lokalen Umgebung ausführe funktioniert alles bestens.
Ich muss das aber im Netzwerk starten, also das Logfile wird folgendermaßen erstellt:
Beim Erstellen des Logfiles gibt es anscheinend ein Problem.. Hier die Exception:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Obj ect demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at ImportVP.Program.Main(String[] args)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The Zone of the assembly that failed was:
Internet
Wenn ich manuell am
\\n5200 files anlegen möchte und bearbeiten, dann habe ich die Berechtigung.
Was kann hier die Lösung sein?
Bitte um Hilfe, ich weis absolut nicht mehr weiter :-(
Vielen Dank schonmal!