Security Exception
-
Hi Friends, I have made a SQL DB Wrapper for my project. It is working perfect on my machine dure to local settings.But I am using a shared server on wich it is giving the following error :
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.CodeAccessPermission.Demand() +59 System.Environment.GetEnvironmentVariable(String variable) +66 Something.DataProvider.SQLDBFactory..ctor(Provider strProvider) +108 Something.DataProvider.SQLDBAccess.ExecuteDataset(IDbConnection cnn, CommandType enumCommandType, String strCommandTxt, IDataParameter[] objCommandParameters) +126 Something.DataProvider.BaseDataProcess.SP_ExecuteDataSet(String text, IDataParameter[] param) +119 ..... ....
Please help me to resolve the problem. Thanks in Advance.Deepak Surana
-
Hi Friends, I have made a SQL DB Wrapper for my project. It is working perfect on my machine dure to local settings.But I am using a shared server on wich it is giving the following error :
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.CodeAccessPermission.Demand() +59 System.Environment.GetEnvironmentVariable(String variable) +66 Something.DataProvider.SQLDBFactory..ctor(Provider strProvider) +108 Something.DataProvider.SQLDBAccess.ExecuteDataset(IDbConnection cnn, CommandType enumCommandType, String strCommandTxt, IDataParameter[] objCommandParameters) +126 Something.DataProvider.BaseDataProcess.SP_ExecuteDataSet(String text, IDataParameter[] param) +119 ..... ....
Please help me to resolve the problem. Thanks in Advance.Deepak Surana
Hello, Have you check that the database login has the appropriate permissions?
-
Hello, Have you check that the database login has the appropriate permissions?