Security Error

From: Dave (davetichenor_at_hotmail.com)
Date: 02/29/04


Date: Sat, 28 Feb 2004 21:44:02 -0800

I have a ASP.net application that work fine with IIS 5.0. I'm trying to put
it on IIS 6.0.

And getting the following error.

ASP is enable

It is in a virtual directory - I also follow the direction in Microsoft
Knowledge Base Article - 320268

Any help will be appreiciated

Thanks

Dave

Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the
permission of type System.Data.SqlClient.SqlClientPermission, System.Data,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

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.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.]
   System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken) +666
   System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames,
Int32 unrestrictedOverride) +0
   System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap,
StackCrawlMark& stackMark) +88
   System.Security.CodeAccessPermission.Demand() +62
   System.Data.SqlClient.SqlConnectionString.Demand(SqlConnectionString
constr) +34
   System.Data.SqlClient.SqlConnection.Open() +43
   System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
   System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
   Eligibility.WebForm1.Page_Load(Object sender, EventArgs e) in
EligQuery.aspx.vb:83
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +2106
   System.Web.UI.Page.ProcessRequest() +218
   System.Web.UI.Page.ProcessRequest(HttpContext context) +18

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte
p.Execute() +179
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +87



Relevant Pages

  • Security Error
    ... To grant this application the required permission ... Exception Details: System.Security.SecurityException: Request for the ... CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, ... Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior ...
    (microsoft.public.de.inetserver.iis.asp)
  • Security Error attempting to access SQL Database
    ... aspx page I receive the following error. ... Request for the permission of type ... CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, ... Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior ...
    (microsoft.public.sqlserver.security)
  • Elusive randomly occuring exceptions
    ... DataTabledatatables, Int32 startRecord, Int32 maxRecords, String ... srcTable, IDbCommand command, CommandBehavior behavior) +121 ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: An existing connection was forcibly closed by the remote host
    ... It seems that the account under which your asp code is running (in IIS) ... System.Net.Sockets.Socket.Receive(Bytebuffer, Int32 offset, Int32 ...
    (microsoft.public.sqlserver.olap)
  • Re: Request for permission type failed
    ... In order to give your program the permissions you need, go to the .NET Administration applet and add a new permission set that corresponds to your application. ... DataGridView are read and writen to the .XML using DataSet.ReadXml ... StackCrawlMark& stackMark, Boolean isPermSet) ... access, Int32 rights, Boolean useRights, FileShare share, Int32 ...
    (microsoft.public.dotnet.languages.csharp)