Deploying Custom assembly in SqlReport2000

Hello Experts,
Need urgent help.......
I created a custom assembly in vb.net

Imports System
Imports System.Security

Public Class CustomUserId
    Public Shared Function GetUserId() As String
        Dim sName As String = (Principal.WindowsIdentity.GetCurrent).Name
        sName = LTrim(sName)
        sName = RTrim(sName)
        Return LCase(sName)
        'Return "Test"
    End Function
End Class

I added the reference to this DLL in my report. Then I added textbox in my report. Added an expression:=CustomCodeHPCBM.CustomUserId.GetUserId()
Then Put the DLL in C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer(on my local machine)
Then I previewed the report. It works fine.Textbox showed the userId.
Next I put the DLL in
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin(In the report server)
I deployed the report.Then when I start the report,Textbox shows #Error.

Any idea why this is happening?

justin11Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ABaruhCommented:
It's probably a permissions setting

change the PermissionSet for Report_Expressions_Default_Permissions in
rssrvpolicy.config to FullTrust
0
justin11Author Commented:
Thanks,
Is it under configuration?
0
ABaruhCommented:
Rssrvpolicy.config is in c:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer

Open it in notepad and do a search on the phrase Report_Expressions_Default_Permissions

The PermissionSetName should be FullTrust
0
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

justin11Author Commented:
Hello,
That worked...

But is there a way I can only give permission to this specific application instead of all the application
0
ABaruhCommented:
what kind of permission?  Specifically, what are you trying to do?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
justin11Author Commented:
instead of setting the default permission to Full trust can I do something like this: I think this is for the specific report
right?

<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCustomAssemblyCodeGroup"
Description="A special code group for my custom assembly.">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\Simple.dll"/>
</CodeGroup>            
0
ABaruhCommented:
yep, you can do that
0
justin11Author Commented:
What should I specify in class and name:

My project name is: CustomCodeHPCBM
Class Name is:CustomUserId
Method: GetUserId()
Will it be something like this:

<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="CustomCodeHPCBM"
Description="A special code group for my custom assembly.">
<IMembershipCondition
class="CustomUserId"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\CustomCodeHPCBM.dll"/>
</CodeGroup>  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Reporting Tools

From novice to tech pro — start learning today.