Friday, February 17, 2012

Custom Assembly #Error For Repoting Services 2005

Hi,
I have written an simple class in C# code for retrieving data from SQL 2005,
I could not solve the problem at run time (showed #Error) although I have :-
a) Include the assert statement as below :-
System.Data.SqlClient.SqlClientPermission oPerm = new
System.Data.SqlClient.SqlClientPermission(System.Security.Permissions.PermissionState.Unrestricted);
oPerm.Assert();
b) Adding code group as below :-
<CodeGroup
class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Copy
of TestCodeGroup" Description="Why didn't
work?"> <IMembershipCondition
class="UrlMembershipCondition" version="1.0.0.0" Url="C:\Program
Files\Microsoft SQL Server\MSSQL.4\Reporting
Services\ReportServer\bin\prj_RptLib.dll" />
</CodeGroup>
I tried the position of the code group, created strong name but still could
not make get the problem solved.
I really appreciate if anyone could help to provide any information or
solution.
Regards,Hi,
Do you deploy to a Windows 2003 Server? Then try to use SQL-Server
Authentication. This worked for us. No idea why Integrated Security only
worked on XP.
Regards,
"chlow" <chlow@.discussions.microsoft.com> schrieb im Newsbeitrag
news:EE2DC3D3-1FCF-4A00-9FBF-585B83651EDD@.microsoft.com...
> Hi,
> I have written an simple class in C# code for retrieving data from SQL
> 2005,
> I could not solve the problem at run time (showed #Error) although I have
> :-
> a) Include the assert statement as below :-
> System.Data.SqlClient.SqlClientPermission oPerm = new
> System.Data.SqlClient.SqlClientPermission(System.Security.Permissions.PermissionState.Unrestricted);
> oPerm.Assert();
> b) Adding code group as below :-
> <CodeGroup
> class="UnionCodeGroup" version="1" PermissionSetName="FullTrust"
> Name="Copy
> of TestCodeGroup" Description="Why didn't
> work?"> <IMembershipCondition
> class="UrlMembershipCondition" version="1.0.0.0" Url="C:\Program
> Files\Microsoft SQL Server\MSSQL.4\Reporting
> Services\ReportServer\bin\prj_RptLib.dll" />
> </CodeGroup>
> I tried the position of the code group, created strong name but still
> could
> not make get the problem solved.
> I really appreciate if anyone could help to provide any information or
> solution.
> Regards,|||Hi Ralph,
Thanks for your assistance. I have tried to compile the code in Visual
Studio 2003 with some minor modifications due to certain assembly not
available in 2003 and it worked, not sure why. By the way, the
authentication that you referred to is the C# code (my class library) where I
used it to connect to SQL server ? If yes, in fact, I tried both SQL and
Window authentication in my code but still encounter the same error.
Thanks,
chlow
"Ralph Watermann" wrote:
> Hi,
>
> Do you deploy to a Windows 2003 Server? Then try to use SQL-Server
> Authentication. This worked for us. No idea why Integrated Security only
> worked on XP.
>
> Regards,
>
>
> "chlow" <chlow@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:EE2DC3D3-1FCF-4A00-9FBF-585B83651EDD@.microsoft.com...
> > Hi,
> >
> > I have written an simple class in C# code for retrieving data from SQL
> > 2005,
> > I could not solve the problem at run time (showed #Error) although I have
> > :-
> >
> > a) Include the assert statement as below :-
> > System.Data.SqlClient.SqlClientPermission oPerm = new
> > System.Data.SqlClient.SqlClientPermission(System.Security.Permissions.PermissionState.Unrestricted);
> > oPerm.Assert();
> >
> > b) Adding code group as below :-
> > <CodeGroup
> > class="UnionCodeGroup" version="1" PermissionSetName="FullTrust"
> > Name="Copy
> > of TestCodeGroup" Description="Why didn't
> > work?"> <IMembershipCondition
> > class="UrlMembershipCondition" version="1.0.0.0" Url="C:\Program
> > Files\Microsoft SQL Server\MSSQL.4\Reporting
> > Services\ReportServer\bin\prj_RptLib.dll" />
> > </CodeGroup>
> >
> > I tried the position of the code group, created strong name but still
> > could
> > not make get the problem solved.
> >
> > I really appreciate if anyone could help to provide any information or
> > solution.
> >
> > Regards,
>
>

No comments:

Post a Comment