MOSS SQL SqlClient Request for the permission type
If you found the following problem when you try to execute an ASPX that its referenced inside MOSS you should follow the following instructions to correct it.
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
First, change the settings to run with medium trust, but I don’t recommend this if you aren't on a safe environment.
The other way is change the minimaltrust.config file (found at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG, the file is named wss_minimaltrust.config) and add the SQL Client Assembly.
SecurityClass Name="SqlClientPermission" Description="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
in the security classes section and then
IPermission
class="SqlClientPermission"
version="1"
Unrestricted="true"
on the named permissions set.
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
First, change the settings to run with medium trust, but I don’t recommend this if you aren't on a safe environment.
The other way is change the minimaltrust.config file (found at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG, the file is named wss_minimaltrust.config) and add the SQL Client Assembly.
SecurityClass Name="SqlClientPermission" Description="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
in the security classes section and then
IPermission
class="SqlClientPermission"
version="1"
Unrestricted="true"
on the named permissions set.
Comments