Security Error attempting to access SQL Database
From: sakieboy (sakieboy_at_discussions.microsoft.com)
Date: 02/11/05
- Next message: sakieboy: "RE: Security Error attempting to access SQL Database"
- Previous message: John Bell: "Re: NT scheduled tasks"
- Next in thread: sakieboy: "RE: Security Error attempting to access SQL Database"
- Reply: sakieboy: "RE: Security Error attempting to access SQL Database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 11 Feb 2005 05:47:02 -0800
My server has Sharepoint installed on it and SQL. When attempting to run my
aspx page I receive the following error.
[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, String srcTable) +36
JJGApplication.JJGApplication.GetDropDownType(Object DLOrLST) in
JJGApplication.aspx.vb:486
This is the main part so I didn't copy the rest...
I can aleviate this error by removing the
"Inherits=MyApplication.MyApplication" from the 1st line in the ASPX page but
it still cannot seem to find the database. When I run an ASP page, I can get
access to the database.
I'm using the same connection string except that the one for the ASP file
comes from an include file and the one for the ASPX file is in the
Global.aspx.vb file.
Is there a quick test page that I can use to verify that my ASPX page is in
touch with the database. It appears that my ASPX page is reading the BIN
file and displaying the error.
Thanks
Please email all replies to sakieboy@hotmail.com, because I'm not a frequent
visitor to this site.
- Next message: sakieboy: "RE: Security Error attempting to access SQL Database"
- Previous message: John Bell: "Re: NT scheduled tasks"
- Next in thread: sakieboy: "RE: Security Error attempting to access SQL Database"
- Reply: sakieboy: "RE: Security Error attempting to access SQL Database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|