tracelistener in app.config causing security permissions error when deployed to server

I am trying to deploy a C# console application to a server. When I copy the .exe, the app.config, and application block.dll over to the server and try to run it I get the following error

Unhandled Exception: System.Configuration.ConfigurationException: Exception in configuration section handler(\\towmfgapp\fgms\FileTransfer\FGMS_File_Transfer.e
xe.config line 10) > System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. > System.Security.SecurityException: Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c5619
34e089 failed.

This runs fine on my local machine

The app.config file looks like this

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ConnectStrProd" value="server=towmfgsql\towmfgsql;User ID=mfgadm;Password=juniper;" />
<add key="ConnectStrTest" value="server=towmfg07\mfgsqltst;User ID=mfgadm;Password=juniper;" />
<add key="ConnectStrDEV" value="server=towmfg08\mfgsqldev;User ID=mfgadm;Password=juniper;" />
<add key="Envir" value="Prod" /> <!-- <add key="Envir" value="Test" /> -->
<add key="hubPath" value="\\towmfgftp\hub\appl\hub\" />
</appSettings>
<system.diagnostics>
<switches>

<add name="loggingSwitch" value="1" />
</switches>

<trace autoflush="true" indentsize="0">
<listeners>
<add name="logListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="\\towmfgapp\fgms\FileTransferLogs.txt"/>
<remove type="System.Diagnostics.DefaultTraceListener"/>
</listeners>
</trace>
-->
</system.diagnostics>
</configuration>

i think this has to do with the tracelistener connecting to the file sitting on the server but i havent been able to fix this at all if anyone has any suggestions please let me know.

THanks

[2120 byte] By [swtpotato183] at [2007-12-16]
# 1
Hello swtpotato183,

Are you running the executable via network share? If so, then the security policy is likely assigning LocalIntranet permissions to the assembly.

FileIOPermission is a fairly high-level permission and is not granted to LocalIntranet or Internet - only IsolatedStoragePermission, by default.

Hope that helps, and please feel free to post back to this forum/thread with further technical details, questions, or followup if you found a solution.

Regards,
Stephen
http://blogs.msdn.com/stfisher

StephenFisher-MS at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified