473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

webparts & sqlclientpermission

Hi,

I have a big problem with an webpart/assembly. i'm trying to connect to sql
server but i get the error "Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.". i've searched for
it and can't find a clear answer. but one thing i'm sure: permissions. if i
change the trust level in the web.config of the sharepoint portal that i
created to full, everything works fine.

can someone help me?

TIA
code of the assembly, web.config, wss_minimaltrust_Custom.config

webpart/assembly

protected override void RenderWebPart(HtmlTextWriter output)
{
String strConn =
"server=myserver;database=mydb;uid=myuser;password =mypwd;";
SqlClientPermission permission = new
SqlClientPermission(PermissionState.Unrestricted);

try
{
permission.Demand();
permission.Assert();

SqlConnection Conn = new SqlConnection(strConn);
Conn.Open();
Conn.Close();
Conn.Dispose();
}
catch (Exception ex)
{
output.Write(ex.Message);
}
finally
{
output.Write(" the end");
};
}
web.config

<configuration>
<configSections>
<sectionGroup name="SharePoint">
<section name="SafeControls"
type="Microsoft.SharePoint.ApplicationRuntime.Safe ControlsConfigurationHandl
er, Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" />
<section name="RuntimeFilter"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartLimits"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartCache"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartWorkItem"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartControls"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="SafeMode"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="OnlineLibrary"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
</configSections>
<SharePoint>
<SafeMode MaxControls="50" CallStack="false" />
<WebPartLimits MaxZoneParts="50" PropertySize="1048576" />
<WebPartCache Storage="CacheObject" />
<WebPartWorkItem Timeout="7000" />
<WebPartControls
DatasheetControlGuid="65BCBEE4-7728-41a0-97BE-14E1CAE36AAE" />
<!--
SafeControl Attributes:
Assembly="[Assembly]" - The .NET assembly in which the control is
contained. This attribute can also contain version, culture, and public key
token information.
Namespace="[Namespace]" - The .NET namespace in which the control
is defined.
TypeName="[Typename]" - The .NET class name of the control. You
can type an asterisk (*) wildcard character to indicate all TypeNames in a
Namespace.
Safe="[True|False]" - Specifies whether a Web Part or Web Form
Control is safe and can be displayed on a Web Parts Page. This attribute is
True by default.
-->
<SafeControls>
<SafeControl Assembly="System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" />
<SafeControl Assembly="System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="System.Web.UI.HtmlControls" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.WebPartPages" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.WebControls" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.ApplicationPages" TypeName="*" Safe="True"
/>
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.SoapServer" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Meetings" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint.Portal, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Portal.WebControls " TypeName="*" />
<SafeControl Assembly="Microsoft.SharePoint.Portal, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Portal.WebControls .Alerts" TypeName="*" />
<SafeControl Assembly="WebPartLibrary1, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=819bece51b5870e7"
Namespace="WebPartLibrary1" TypeName="*" Safe="True" />
</SafeControls>
<!--<OnlineLibrary Url="http://r.office.microsoft.com/r/hlidAwsGallery"
/>-->
<RuntimeFilter Assembly="Microsoft.SharePoint.Portal, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Class="Microsoft.SharePoint.Portal.Audience.Audien ceManager"
BuilderURL="audience_chooser.aspx" />
</SharePoint>
<system.web>
<securityPolicy>
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_mediumtrust.config" />
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_minimaltrust.config" />
<trustLevel name="WSS_Minimal_Custom" policyFile="C:\Program
Files\Common Files\Microsoft Shared\Web Server
Extensions\60\config\wss_minimaltrust_Custom.confi g" />
</securityPolicy>
<httpHandlers>
<add verb="*" path="/_vti_bin/*.aspx"
type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx"
type="Microsoft.SharePoint.ApplicationRuntime.Shar ePointHandlerFactory,
Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" />
</httpHandlers>
<customErrors mode="On" />
<httpRuntime maxRequestLength="51200" />
<authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>

wss_minimaltrust_Custom.config

<configuration>
<mscorlib>
<security>
<policy>
<PolicyLevel version="1">
<SecurityClasses>
<SecurityClass Name="AllMembershipCondition"
Description="System.Security.Policy.AllMembershipC ondition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="AspNetHostingPermission"
Description="System.Web.AspNetHostingPermission, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="FirstMatchCodeGroup"
Description="System.Security.Policy.FirstMatchCode Group, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="NamedPermissionSet"
Description="System.Security.NamedPermissionSet"/>
<SecurityClass Name="SecurityPermission"
Description="System.Security.Permissions.SecurityP ermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="StrongNameMembershipCondition"
Description="System.Security.Policy.StrongNameMemb ershipCondition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="UnionCodeGroup"
Description="System.Security.Policy.UnionCodeGroup , mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="UrlMembershipCondition"
Description="System.Security.Policy.UrlMembershipC ondition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="WebPartPermission"
Description="Microsoft.SharePoint.Security.WebPart Permission,
Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"/>
<SecurityClass Name="ZoneMembershipCondition"
Description="System.Security.Policy.ZoneMembership Condition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="SqlClientPermission"
Description="System.Data.SqlClient.SqlClientPermis sion, System.Data,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</SecurityClasses>
<NamedPermissionSets>
<PermissionSet
class="NamedPermissionSet"
version="1"
Unrestricted="true"
Name="FullTrust"
Description="Allows full access to all
resources"
/>
<PermissionSet
class="NamedPermissionSet"
version="1"
Name="Nothing"
Description="Denies all resources, including
the right to execute"
/>
<PermissionSet
class="NamedPermissionSet"
version="1"
Name="ASP.Net">
<IPermission
class="AspNetHostingPermission"
version="1"
Level="Minimal"
/>
<IPermission
class="SecurityPermission"
version="1"
Flags="Execution"
/>
<IPermission class="WebPartPermission"
version="1"
Connections="True"
/>
</PermissionSet>
<PermissionSet class="NamedPermissionSet"
version="1" Name="WebPartLibrary1PermissionSet">
<IPermission class="AspNetHostingPermission" version="1" Level="Medium"
/>
<IPermission class="SecurityPermission" version="1" Flags="Assertion,
Execution, ControlThread, ControlPrincipal, RemotingConfiguration,
UnmanagedCode" />
<IPermission class="WebPartPermission" version="1" Connections="True" />
<IPermission class="SqlClientPermission" version="1"
AllowBlankPassword="False" />
</PermissionSet>
</NamedPermissionSets>
<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="Nothing">
<IMembershipCondition
class="AllMembershipCondition"
version="1"
/>
<CodeGroup
class="UnionCodeGroup" version="1"
PermissionSetName="WebPartLibrary1PermissionSet">
<IMembershipCondition
class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00240000048000009400000006020000002 40000525341310004000001000
100B791C96EBFCD6E192C8998945A628B4E3F466EC49BFA4C8 12BCE256F6CB8BB734D2EAC64F
6D0C3CFC52135C321B21C12476512369A0D5BCAD0ED80587C2 655A34C6811D353219C680E955
E47871281302233AFF8A0D4009F59299B3867DF61823E36FEA A55A5DB0ABDEE2EC39745068C5
8BF32E13F2709EC147890FD33B847D5" />
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="ASP.Net">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$AppDirUrl$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
Url="$Gac$/*"
version="1"
/>
</CodeGroup>
<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="Nothing">
<IMembershipCondition
class="ZoneMembershipCondition"
version="1"
Zone="MyComputer" />
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Microsoft_Strong_Name"
Description="This code group grants code
signed with the Microsoft strong name full trust. ">
<IMembershipCondition

class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00240000048000009400000006020000002 40000525341310004000001000
10007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87F B03766C834C99921EB23BE79AD
9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC60 7774F29E8320E92EA05ECE4E82
1C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D7 45D6F2DE5F17E5EAF0FC4963D2
61C8A12436518206DC093344D5AD293"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Ecma_Strong_Name"
Description="This code group grants code
signed with the ECMA strong name full trust. ">
<IMembershipCondition

class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00000000000000000400000000000000"
/>
</CodeGroup>
</CodeGroup>
</CodeGroup>
</PolicyLevel>
</policy>
</security>
</mscorlib>
</configuration>

Nov 18 '05 #1
4 1853
Try to add in web.config the SQL Assembly in the SAFE section:

<SafeControls>
<SafeControl Assembly="System.Data.SqlClient, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" />
of course IISReset - don't forget where you are :-)
MD

"António Pinho" <aj******@hotmail.com> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...
Hi,

I have a big problem with an webpart/assembly. i'm trying to connect to sql server but i get the error "Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.". i've searched for it and can't find a clear answer. but one thing i'm sure: permissions. if i change the trust level in the web.config of the sharepoint portal that i
created to full, everything works fine.

can someone help me?

TIA
code of the assembly, web.config, wss_minimaltrust_Custom.config

webpart/assembly

protected override void RenderWebPart(HtmlTextWriter output)
{
String strConn =
"server=myserver;database=mydb;uid=myuser;password =mypwd;";
SqlClientPermission permission = new
SqlClientPermission(PermissionState.Unrestricted);

try
{
permission.Demand();
permission.Assert();

SqlConnection Conn = new SqlConnection(strConn);
Conn.Open();
Conn.Close();
Conn.Dispose();
}
catch (Exception ex)
{
output.Write(ex.Message);
}
finally
{
output.Write(" the end");
};
}
web.config

<configuration>
<configSections>
<sectionGroup name="SharePoint">
<section name="SafeControls"
type="Microsoft.SharePoint.ApplicationRuntime.Safe ControlsConfigurationHandl er, Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" />
<section name="RuntimeFilter"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartLimits"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartCache"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartWorkItem"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartControls"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="SafeMode"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="OnlineLibrary"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
</configSections>
<SharePoint>
<SafeMode MaxControls="50" CallStack="false" />
<WebPartLimits MaxZoneParts="50" PropertySize="1048576" />
<WebPartCache Storage="CacheObject" />
<WebPartWorkItem Timeout="7000" />
<WebPartControls
DatasheetControlGuid="65BCBEE4-7728-41a0-97BE-14E1CAE36AAE" />
<!--
SafeControl Attributes:
Assembly="[Assembly]" - The .NET assembly in which the control is contained. This attribute can also contain version, culture, and public key token information.
Namespace="[Namespace]" - The .NET namespace in which the control is defined.
TypeName="[Typename]" - The .NET class name of the control. You
can type an asterisk (*) wildcard character to indicate all TypeNames in a
Namespace.
Safe="[True|False]" - Specifies whether a Web Part or Web Form
Control is safe and can be displayed on a Web Parts Page. This attribute is True by default.
-->
<SafeControls>
<SafeControl Assembly="System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" />
<SafeControl Assembly="System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="System.Web.UI.HtmlControls" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.WebPartPages" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.WebControls" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.ApplicationPages" TypeName="*" Safe="True"
/>
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.SoapServer" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Meetings" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint.Portal, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Portal.WebControls " TypeName="*" />
<SafeControl Assembly="Microsoft.SharePoint.Portal, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Portal.WebControls .Alerts" TypeName="*" />
<SafeControl Assembly="WebPartLibrary1, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=819bece51b5870e7"
Namespace="WebPartLibrary1" TypeName="*" Safe="True" />
</SafeControls>
<!--<OnlineLibrary Url="http://r.office.microsoft.com/r/hlidAwsGallery" />-->
<RuntimeFilter Assembly="Microsoft.SharePoint.Portal, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Class="Microsoft.SharePoint.Portal.Audience.Audien ceManager"
BuilderURL="audience_chooser.aspx" />
</SharePoint>
<system.web>
<securityPolicy>
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_mediumtrust.config" />
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_minimaltrust.config" />
<trustLevel name="WSS_Minimal_Custom" policyFile="C:\Program
Files\Common Files\Microsoft Shared\Web Server
Extensions\60\config\wss_minimaltrust_Custom.confi g" />
</securityPolicy>
<httpHandlers>
<add verb="*" path="/_vti_bin/*.aspx"
type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx"
type="Microsoft.SharePoint.ApplicationRuntime.Shar ePointHandlerFactory,
Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" />
</httpHandlers>
<customErrors mode="On" />
<httpRuntime maxRequestLength="51200" />
<authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>

wss_minimaltrust_Custom.config

<configuration>
<mscorlib>
<security>
<policy>
<PolicyLevel version="1">
<SecurityClasses>
<SecurityClass Name="AllMembershipCondition"
Description="System.Security.Policy.AllMembershipC ondition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="AspNetHostingPermission"
Description="System.Web.AspNetHostingPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="FirstMatchCodeGroup"
Description="System.Security.Policy.FirstMatchCode Group, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="NamedPermissionSet"
Description="System.Security.NamedPermissionSet"/>
<SecurityClass Name="SecurityPermission"
Description="System.Security.Permissions.SecurityP ermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="StrongNameMembershipCondition" Description="System.Security.Policy.StrongNameMemb ershipCondition, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="UnionCodeGroup"
Description="System.Security.Policy.UnionCodeGroup , mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="UrlMembershipCondition"
Description="System.Security.Policy.UrlMembershipC ondition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="WebPartPermission"
Description="Microsoft.SharePoint.Security.WebPart Permission,
Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"/>
<SecurityClass Name="ZoneMembershipCondition"
Description="System.Security.Policy.ZoneMembership Condition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="SqlClientPermission"
Description="System.Data.SqlClient.SqlClientPermis sion, System.Data,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</SecurityClasses>
<NamedPermissionSets>
<PermissionSet
class="NamedPermissionSet"
version="1"
Unrestricted="true"
Name="FullTrust"
Description="Allows full access to all
resources"
/>
<PermissionSet
class="NamedPermissionSet"
version="1"
Name="Nothing"
Description="Denies all resources, including the right to execute"
/>
<PermissionSet
class="NamedPermissionSet"
version="1"
Name="ASP.Net">
<IPermission
class="AspNetHostingPermission"
version="1"
Level="Minimal"
/>
<IPermission
class="SecurityPermission"
version="1"
Flags="Execution"
/>
<IPermission class="WebPartPermission"
version="1"
Connections="True"
/>
</PermissionSet>
<PermissionSet class="NamedPermissionSet"
version="1" Name="WebPartLibrary1PermissionSet">
<IPermission class="AspNetHostingPermission" version="1" Level="Medium" />
<IPermission class="SecurityPermission" version="1" Flags="Assertion,
Execution, ControlThread, ControlPrincipal, RemotingConfiguration,
UnmanagedCode" />
<IPermission class="WebPartPermission" version="1" Connections="True" /> <IPermission class="SqlClientPermission" version="1"
AllowBlankPassword="False" />
</PermissionSet>
</NamedPermissionSets>
<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="Nothing">
<IMembershipCondition
class="AllMembershipCondition"
version="1"
/>
<CodeGroup
class="UnionCodeGroup" version="1"
PermissionSetName="WebPartLibrary1PermissionSet">
<IMembershipCondition
class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00240000048000009400000006020000002 40000525341310004000001000 100B791C96EBFCD6E192C8998945A628B4E3F466EC49BFA4C8 12BCE256F6CB8BB734D2EAC64F 6D0C3CFC52135C321B21C12476512369A0D5BCAD0ED80587C2 655A34C6811D353219C680E955 E47871281302233AFF8A0D4009F59299B3867DF61823E36FEA A55A5DB0ABDEE2EC39745068C5 8BF32E13F2709EC147890FD33B847D5" />
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="ASP.Net">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$AppDirUrl$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
Url="$Gac$/*"
version="1"
/>
</CodeGroup>
<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="Nothing">
<IMembershipCondition
class="ZoneMembershipCondition"
version="1"
Zone="MyComputer" />
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Microsoft_Strong_Name"
Description="This code group grants code signed with the Microsoft strong name full trust. ">
<IMembershipCondition

class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00240000048000009400000006020000002 40000525341310004000001000 10007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87F B03766C834C99921EB23BE79AD 9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC60 7774F29E8320E92EA05ECE4E82 1C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D7 45D6F2DE5F17E5EAF0FC4963D2 61C8A12436518206DC093344D5AD293"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Ecma_Strong_Name"
Description="This code group grants code signed with the ECMA strong name full trust. ">
<IMembershipCondition

class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00000000000000000400000000000000"
/>
</CodeGroup>
</CodeGroup>
</CodeGroup>
</PolicyLevel>
</policy>
</security>
</mscorlib>
</configuration>


Nov 18 '05 #2
Hi Mihai,

Thanks for your reply, but it didn't work. The error message is still there.
This is a default sharepoint installation, and a portal with just one site
(a blank site) on it. Any other suggestion?

Isn't there anyone that uses webparts with sql server, without raising the
trust level to full?

TIA


"Mihai Durcau" <md*****@mdsi.ca> wrote in message
news:e%****************@TK2MSFTNGP09.phx.gbl...
Try to add in web.config the SQL Assembly in the SAFE section:

<SafeControls>
<SafeControl Assembly="System.Data.SqlClient, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" />
of course IISReset - don't forget where you are :-)
MD

"António Pinho" <aj******@hotmail.com> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...
Hi,

I have a big problem with an webpart/assembly. i'm trying to connect to sql
server but i get the error "Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data,

Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.". i've searched

for
it and can't find a clear answer. but one thing i'm sure: permissions. if i
change the trust level in the web.config of the sharepoint portal that i
created to full, everything works fine.

can someone help me?

TIA
code of the assembly, web.config, wss_minimaltrust_Custom.config

webpart/assembly

protected override void RenderWebPart(HtmlTextWriter output)
{
String strConn =
"server=myserver;database=mydb;uid=myuser;password =mypwd;";
SqlClientPermission permission = new
SqlClientPermission(PermissionState.Unrestricted);

try
{
permission.Demand();
permission.Assert();

SqlConnection Conn = new SqlConnection(strConn);
Conn.Open();
Conn.Close();
Conn.Dispose();
}
catch (Exception ex)
{
output.Write(ex.Message);
}
finally
{
output.Write(" the end");
};
}
web.config

<configuration>
<configSections>
<sectionGroup name="SharePoint">
<section name="SafeControls"

type="Microsoft.SharePoint.ApplicationRuntime.Safe ControlsConfigurationHandl er, Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" />
<section name="RuntimeFilter"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartLimits"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartCache"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartWorkItem"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="WebPartControls"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="SafeMode"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="OnlineLibrary"
type="System.Configuration.SingleTagSectionHandler , System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
</configSections>
<SharePoint>
<SafeMode MaxControls="50" CallStack="false" />
<WebPartLimits MaxZoneParts="50" PropertySize="1048576" />
<WebPartCache Storage="CacheObject" />
<WebPartWorkItem Timeout="7000" />
<WebPartControls
DatasheetControlGuid="65BCBEE4-7728-41a0-97BE-14E1CAE36AAE" />
<!--
SafeControl Attributes:
Assembly="[Assembly]" - The .NET assembly in which the control

is
contained. This attribute can also contain version, culture, and public

key
token information.
Namespace="[Namespace]" - The .NET namespace in which the

control
is defined.
TypeName="[Typename]" - The .NET class name of the control. You can type an asterisk (*) wildcard character to indicate all TypeNames in a Namespace.
Safe="[True|False]" - Specifies whether a Web Part or Web Form
Control is safe and can be displayed on a Web Parts Page. This attribute

is
True by default.
-->
<SafeControls>
<SafeControl Assembly="System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" />
<SafeControl Assembly="System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="System.Web.UI.HtmlControls" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.WebPartPages" TypeName="*" Safe="True" /> <SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.WebControls" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.ApplicationPages" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.SoapServer" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Meetings" TypeName="*" Safe="True" />
<SafeControl Assembly="Microsoft.SharePoint.Portal,

Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Portal.WebControls " TypeName="*" />
<SafeControl Assembly="Microsoft.SharePoint.Portal,

Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint.Portal.WebControls .Alerts" TypeName="*" /> <SafeControl Assembly="WebPartLibrary1, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=819bece51b5870e7"
Namespace="WebPartLibrary1" TypeName="*" Safe="True" />
</SafeControls>
<!--<OnlineLibrary

Url="http://r.office.microsoft.com/r/hlidAwsGallery"
/>-->
<RuntimeFilter Assembly="Microsoft.SharePoint.Portal,

Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Class="Microsoft.SharePoint.Portal.Audience.Audien ceManager"
BuilderURL="audience_chooser.aspx" />
</SharePoint>
<system.web>
<securityPolicy>
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_mediumtrust.config" />
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_minimaltrust.config" />
<trustLevel name="WSS_Minimal_Custom" policyFile="C:\Program
Files\Common Files\Microsoft Shared\Web Server
Extensions\60\config\wss_minimaltrust_Custom.confi g" />
</securityPolicy>
<httpHandlers>
<add verb="*" path="/_vti_bin/*.aspx"
type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx"
type="Microsoft.SharePoint.ApplicationRuntime.Shar ePointHandlerFactory,
Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" />
</httpHandlers>
<customErrors mode="On" />
<httpRuntime maxRequestLength="51200" />
<authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>

wss_minimaltrust_Custom.config

<configuration>
<mscorlib>
<security>
<policy>
<PolicyLevel version="1">
<SecurityClasses>
<SecurityClass Name="AllMembershipCondition"
Description="System.Security.Policy.AllMembershipC ondition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="AspNetHostingPermission"
Description="System.Web.AspNetHostingPermission, System,

Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="FirstMatchCodeGroup"
Description="System.Security.Policy.FirstMatchCode Group, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="NamedPermissionSet"
Description="System.Security.NamedPermissionSet"/>
<SecurityClass Name="SecurityPermission"
Description="System.Security.Permissions.SecurityP ermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass

Name="StrongNameMembershipCondition"
Description="System.Security.Policy.StrongNameMemb ershipCondition,

mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="UnionCodeGroup"
Description="System.Security.Policy.UnionCodeGroup , mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="UrlMembershipCondition"
Description="System.Security.Policy.UrlMembershipC ondition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="WebPartPermission"
Description="Microsoft.SharePoint.Security.WebPart Permission,
Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"/>
<SecurityClass Name="ZoneMembershipCondition"
Description="System.Security.Policy.ZoneMembership Condition, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="SqlClientPermission"
Description="System.Data.SqlClient.SqlClientPermis sion, System.Data,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</SecurityClasses>
<NamedPermissionSets>
<PermissionSet
class="NamedPermissionSet"
version="1"
Unrestricted="true"
Name="FullTrust"
Description="Allows full access to all
resources"
/>
<PermissionSet
class="NamedPermissionSet"
version="1"
Name="Nothing"
Description="Denies all resources,

including
the right to execute"
/>
<PermissionSet
class="NamedPermissionSet"
version="1"
Name="ASP.Net">
<IPermission
class="AspNetHostingPermission"
version="1"
Level="Minimal"
/>
<IPermission
class="SecurityPermission"
version="1"
Flags="Execution"
/>
<IPermission class="WebPartPermission"
version="1"
Connections="True"
/>
</PermissionSet>
<PermissionSet class="NamedPermissionSet"
version="1" Name="WebPartLibrary1PermissionSet">
<IPermission class="AspNetHostingPermission" version="1"

Level="Medium"
/>
<IPermission class="SecurityPermission" version="1" Flags="Assertion, Execution, ControlThread, ControlPrincipal, RemotingConfiguration,
UnmanagedCode" />
<IPermission class="WebPartPermission" version="1" Connections="True" />
<IPermission class="SqlClientPermission" version="1"
AllowBlankPassword="False" />
</PermissionSet>
</NamedPermissionSets>
<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="Nothing">
<IMembershipCondition
class="AllMembershipCondition"
version="1"
/>
<CodeGroup
class="UnionCodeGroup" version="1"
PermissionSetName="WebPartLibrary1PermissionSet">
<IMembershipCondition
class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00240000048000009400000006020000002 40000525341310004000001000

100B791C96EBFCD6E192C8998945A628B4E3F466EC49BFA4C8 12BCE256F6CB8BB734D2EAC64F

6D0C3CFC52135C321B21C12476512369A0D5BCAD0ED80587C2 655A34C6811D353219C680E955

E47871281302233AFF8A0D4009F59299B3867DF61823E36FEA A55A5DB0ABDEE2EC39745068C5
8BF32E13F2709EC147890FD33B847D5" />
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="ASP.Net">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$AppDirUrl$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
Url="$Gac$/*"
version="1"
/>
</CodeGroup>
<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="Nothing">
<IMembershipCondition
class="ZoneMembershipCondition"
version="1"
Zone="MyComputer" />
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Microsoft_Strong_Name"
Description="This code group grants

code
signed with the Microsoft strong name full trust. ">
<IMembershipCondition

class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00240000048000009400000006020000002 40000525341310004000001000

10007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87F B03766C834C99921EB23BE79AD

9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC60 7774F29E8320E92EA05ECE4E82

1C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D7 45D6F2DE5F17E5EAF0FC4963D2
61C8A12436518206DC093344D5AD293"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Ecma_Strong_Name"
Description="This code group grants

code
signed with the ECMA strong name full trust. ">
<IMembershipCondition

class="StrongNameMembershipCondition"
version="1"

PublicKeyBlob="00000000000000000400000000000000"
/>
</CodeGroup>
</CodeGroup>
</CodeGroup>
</PolicyLevel>
</policy>
</security>
</mscorlib>
</configuration>



Nov 18 '05 #3
"António Pinho" <aj******@hotmail.com> wrote in message news:<Oo**************@tk2msftngp13.phx.gbl>...
Hi Mihai,

Thanks for your reply, but it didn't work. The error message is still there.
This is a default sharepoint installation, and a portal with just one site
(a blank site) on it. Any other suggestion?

Isn't there anyone that uses webparts with sql server, without raising the
trust level to full?


You need to edit the wss_minimaltrust.config file.

Add:

<SecurityClass Name="SqlClientPermission"
Description="System.Data.SqlClient.SqlClientPermis sion, System.Data,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>

to the SecurityClasses section and

<IPermission class="SqlClientPermission" version="1"
Unrestricted="true" />

to the PermissionSet section with the attribute Name="ASP.Net"

If you're still having trouble, look through the
wss_mediumtrust.config for the SqlClientPermissions entries and try to
add them to wss_minimaltrust.config.

Be forewarned that it's possible that later patches to SPS2003 may
blow out your changes. There's a way to use a different file other
than wss_minimaltrust.config but I haven't looked for it yet.

uber1024
Nov 18 '05 #4


Working nice and smooth. Thanks do everyone.

"John" <dj*****@hotmail.com> wrote in message
news:d0**************************@posting.google.c om...
"António Pinho" <aj******@hotmail.com> wrote in message

news:<Oo**************@tk2msftngp13.phx.gbl>...
Hi Mihai,

Thanks for your reply, but it didn't work. The error message is still there. This is a default sharepoint installation, and a portal with just one site (a blank site) on it. Any other suggestion?

Isn't there anyone that uses webparts with sql server, without raising the trust level to full?


You need to edit the wss_minimaltrust.config file.

Add:

<SecurityClass Name="SqlClientPermission"
Description="System.Data.SqlClient.SqlClientPermis sion, System.Data,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>

to the SecurityClasses section and

<IPermission class="SqlClientPermission" version="1"
Unrestricted="true" />

to the PermissionSet section with the attribute Name="ASP.Net"

If you're still having trouble, look through the
wss_mediumtrust.config for the SqlClientPermissions entries and try to
add them to wss_minimaltrust.config.

Be forewarned that it's possible that later patches to SPS2003 may
blow out your changes. There's a way to use a different file other
than wss_minimaltrust.config but I haven't looked for it yet.

uber1024

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mmb | last post by:
hi all i used this below function to connect to sql server 2k private void button1_Click(object sender, System.EventArgs e) { try { SqlClientPermission myPerm = new...
10
by: Barbara Alderton | last post by:
I am working with SharePoint 2003. I am using (using C#) an existing webpart as a child control (server control). I need to access/manipulate the HTML that the control outputs prior to rendering...
4
by: António Pinho | last post by:
Hi, I have a big problem with an webpart/assembly. i'm trying to connect to sql server but i get the error "Request for the permission of type System.Data.SqlClient.SqlClientPermission,...
1
by: Astera | last post by:
I seem to be having a problem using web parts after the beta 2 release. Any time I try to have the WebPartManager on any page, I get the exception listed below. I've gone through the steps listed...
0
by: Alan Silver | last post by:
Hello, Sorry for the long post, but I want to try and explain it clearly... I'm using webparts for (possibly) an unusual scenario, and I'm having problems. This could be because I'm doing...
3
by: Bart Van Hemelen | last post by:
I'm working on a project where the user of a site will receive custom content, depending on a set of parameters. The content will all be contained in UserControls (.ascx), that will be used as...
6
by: brianroisentul | last post by:
Hello, I'd like to know which dll I have to reference when I use the System.Web.UI.WebControls.Webparts namespace. Thanks, Brian
3
by: Q. John Chen | last post by:
I have an INTRAnet site that need to add some content management feature. And I thought that I can use the WebParts. Since this is an internal site, I use Windows authentication so the use don't...
3
by: clintonG | last post by:
Why don't we see more WebParts being used on the web? SharePoint gets all the fun? And what are the prevailing opinions be they what they may about the use of WebParts rather than WPF when the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.