Hi Everyone, I deployed an app this week that allows admins to upload .csv files and then preview them. Though whenever I try to preview I get the following error: System.Security.SecurityException: Request for the permission of type 'System.Data.Odbc.OdbcPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.PermissionSet.Demand() at System.Data.Common.DbConnectionOptions.DemandPermission() at System.Data.Odbc.OdbcConnection.PermissionDemand() at System.Data.Odbc.OdbcConnectionFactory.PermissionDemand(DbConnection outerConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.Odbc.OdbcConnection.Open() at Admin_parse.ODBCOPEN(String Path, BinaryTableRow binaryObjectRows) The action that failed was: Demand The type of the first permission that failed was: System.Data.Odbc.OdbcPermission The Zone of the assembly that failed was: MyComputer It seems pretty straightforward but I can't figure it out :/ Below is my connectionstrings. I had to modify it, remove "localsqlserver" and name the ASPNTDB to "localsqlserver" or the app won't run at all. <connectionStrings> <remove name="LocalSqlServer" /> <add name="LocalSqlServer" connectionString="Data Source=tcp:s02.Winhost.com;Initial Catalog=*****;User ID=*****;Password=*****;Integrated Security=false;" providerName="System.Data.SqlClient" /> <remove name="TheCo-OpetitionGroupSQL2005ConnectionString" /> <add name="TheCo-OpetitionGroupSQL2005ConnectionString" connectionString="Data Source=tcp:s02.Winhost.com;Initial Catalog=*******;User ID=******;Password=*****;Integrated Security=false;" providerName="System.Data.SqlClient" /> </connectionStrings>
glad you had figured it out, changing trust level is well documented in our KB article too http://support.Winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx
Now this time I visit many website and found many information but I think this is very important information all of us.I will sharing this information some other people.Thanks for published this information… roof shingles