Permissions Error Help

Discussion in 'Databases' started by Rcorrie90, Nov 1, 2011.

  1. 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=, 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.


    <remove name="LocalSqlServer" />

    <add name="LocalSqlServer" connectionString="Data;Initial Catalog=*****;User ID=*****;Password=*****;Integrated Security=false;"
    providerName="System.Data.SqlClient" />
    <remove name="TheCo-OpetitionGroupSQL2005ConnectionString" />
    <add name="TheCo-OpetitionGroupSQL2005ConnectionString"
    connectionString="Data;Initial Catalog=*******;User ID=******;Password=*****;Integrated Security=false;"
    providerName="System.Data.SqlClient" />

    Last edited by a moderator: Oct 14, 2015
  2. solved it:

    just had to insert <trust level="Full" /> in <system.web> in web.config
  3. Last edited by a moderator: Oct 14, 2015
  4. 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

Share This Page