Showing posts with label ssrs2005. Show all posts
Showing posts with label ssrs2005. Show all posts

Wednesday, March 28, 2012

Problem with AuthenticationExtension

Hi,

I got SSRS2005 with FormsAuthentication working for a while now without any problems. I decided to create some kind of 'Account Enabled' functionality and therefore I modified my AuthenticationExtension.cs. But what happened, the new functionality does not work. After adding some logging stuff to this file nothing changed. So it looks as if AuthenticationExtension.css is not being used at all in my security extension. I verified this by removing the file from the project and still...no changes! Other files in my security extension module are being used however. When I make a change to AuthenticationUtilities I can see it in my results.

Does anyone know how this can happen? Why is my extended IAuthenticationExtension not been used?

Thanks,

Hans

I assume you've redeployed the dll to the report server / manager bin directory. Have you tried debugging and stepping into the code?|||...thanks. This brougth me to the solution. I replaced the security dll in my customized application's bin directory but not in the RS-server and RS-manager bin's. After doing this it worked as expected. Obviously only dll's in these bin directories are relevant.|||Hey i have a huge problem, right now my machine has installed SQL 2005 and .NET 2005, but my example for custom security needs SQL 2000.

Could you give the address where you found the FormsSecurity solution, please?
|||Hi, there's in fact no big difference with the extensions you're using with SQL2000. The security extensions should be there when you installed SQL2005. I know that a couple of extra methods came with the Security extension 2005, that you have to override in your own code, but you'll notice soon enough. What error message do you get?sql

Problem with AuthenticationExtension

Hi,

I got SSRS2005 with FormsAuthentication working for a while now without any problems. I decided to create some kind of 'Account Enabled' functionality and therefore I modified my AuthenticationExtension.cs. But what happened, the new functionality does not work. After adding some logging stuff to this file nothing changed. So it looks as if AuthenticationExtension.css is not being used at all in my security extension. I verified this by removing the file from the project and still...no changes! Other files in my security extension module are being used however. When I make a change to AuthenticationUtilities I can see it in my results.

Does anyone know how this can happen? Why is my extended IAuthenticationExtension not been used?

Thanks,

Hans

I assume you've redeployed the dll to the report server / manager bin directory. Have you tried debugging and stepping into the code?|||...thanks. This brougth me to the solution. I replaced the security dll in my customized application's bin directory but not in the RS-server and RS-manager bin's. After doing this it worked as expected. Obviously only dll's in these bin directories are relevant.|||Hey i have a huge problem, right now my machine has installed SQL 2005 and .NET 2005, but my example for custom security needs SQL 2000.

Could you give the address where you found the FormsSecurity solution, please?|||Hi, there's in fact no big difference with the extensions you're using with SQL2000. The security extensions should be there when you installed SQL2005. I know that a couple of extra methods came with the Security extension 2005, that you have to override in your own code, but you'll notice soon enough. What error message do you get?

Problem with AuthenticationExtension

Hi,

I got SSRS2005 with FormsAuthentication working for a while now without any problems. I decided to create some kind of 'Account Enabled' functionality and therefore I modified my AuthenticationExtension.cs. But what happened, the new functionality does not work. After adding some logging stuff to this file nothing changed. So it looks as if AuthenticationExtension.css is not being used at all in my security extension. I verified this by removing the file from the project and still...no changes! Other files in my security extension module are being used however. When I make a change to AuthenticationUtilities I can see it in my results.

Does anyone know how this can happen? Why is my extended IAuthenticationExtension not been used?

Thanks,

Hans

I assume you've redeployed the dll to the report server / manager bin directory. Have you tried debugging and stepping into the code?|||...thanks. This brougth me to the solution. I replaced the security dll in my customized application's bin directory but not in the RS-server and RS-manager bin's. After doing this it worked as expected. Obviously only dll's in these bin directories are relevant.|||Hey i have a huge problem, right now my machine has installed SQL 2005 and .NET 2005, but my example for custom security needs SQL 2000.

Could you give the address where you found the FormsSecurity solution, please?|||Hi, there's in fact no big difference with the extensions you're using with SQL2000. The security extensions should be there when you installed SQL2005. I know that a couple of extra methods came with the Security extension 2005, that you have to override in your own code, but you'll notice soon enough. What error message do you get?

Monday, February 20, 2012

Problem using custom assemblies in SSRS2005

I've created a custom assembly (in VB (VS-2005)) for use in some SSRS2005
reports.
project: ReportsLibrary
Public Class ReportsCodeLibrary
Public Shared Function ReturnXML(MVList as Object, Root As String, Node As
String, Element As String) As String
Dim ReturnString = ""
Dim sParamItem As Object
ReturnString = "<" & Root & ">"
For Each sParamItem In MultiValueList
ReturnString &= "<" & Node & "><" & Element & ">" & sParamItem & "</"
& Element & "></" & Node & ">"
Next
ReturnString &= "</" & Root & ">"
Return (ReturnString)
End Function
Public Shared Function Format(s As String) As String
Format = left(s,4) & "-" & mid(s,5,2) & "-" & mid(s,7,3) & "-" &
right(s,4)
End Function
End Class
Each of these functions work properly if I put them in the Code section. But
since they are being used in multiple reports, I want to have the code in one
place and use that assembly.
The project is compiled in "Release" configuration.
I attach this compiled dll (ReportsLibrary.dll) to the report in the
Report's properties "Reference" section. Since these are Shared functions, I
don't need to define individual classes on that sheet.
When I get this working, I'll copy the dll to the SSRS ReportServer\bin
directory on the SSRS computer.
On the TextBox's (txtTableField2) Value property, I enter the expression
"=ReportsLibrary.ReportsCodeLibrary.Format(Fields!fieldName.Value)"
When I preview the report in Visual Studio, I get these errors:
[rsErrorLoadingCodeModule] Error while loading code module: â'ReportsLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullâ'. Details: Could not
load file or assembly 'ReportsLibrary, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. The system cannot find the
file specified.
[rsCompilerErrorInExpression] The Value expression for the textbox
â'txtTableField2â' contains an error: [BC30451] Name 'ReportsLibrary' is not
declared.
So, what am I missing? What do I need to do to get this assembly to work
with SSRS?
Thanks,
WayneIs the .dll copied to the following folder on your development machine:
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"?
--
Matt
"Wayne" wrote:
> I've created a custom assembly (in VB (VS-2005)) for use in some SSRS2005
> reports.
> project: ReportsLibrary
> Public Class ReportsCodeLibrary
> Public Shared Function ReturnXML(MVList as Object, Root As String, Node As
> String, Element As String) As String
> Dim ReturnString = ""
> Dim sParamItem As Object
> ReturnString = "<" & Root & ">"
> For Each sParamItem In MultiValueList
> ReturnString &= "<" & Node & "><" & Element & ">" & sParamItem & "</"
> & Element & "></" & Node & ">"
> Next
> ReturnString &= "</" & Root & ">"
> Return (ReturnString)
> End Function
> Public Shared Function Format(s As String) As String
> Format = left(s,4) & "-" & mid(s,5,2) & "-" & mid(s,7,3) & "-" &
> right(s,4)
> End Function
> End Class
> Each of these functions work properly if I put them in the Code section. But
> since they are being used in multiple reports, I want to have the code in one
> place and use that assembly.
> The project is compiled in "Release" configuration.
> I attach this compiled dll (ReportsLibrary.dll) to the report in the
> Report's properties "Reference" section. Since these are Shared functions, I
> don't need to define individual classes on that sheet.
> When I get this working, I'll copy the dll to the SSRS ReportServer\bin
> directory on the SSRS computer.
> On the TextBox's (txtTableField2) Value property, I enter the expression
> "=ReportsLibrary.ReportsCodeLibrary.Format(Fields!fieldName.Value)"
> When I preview the report in Visual Studio, I get these errors:
> [rsErrorLoadingCodeModule] Error while loading code module: â'ReportsLibrary,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullâ'. Details: Could not
> load file or assembly 'ReportsLibrary, Version=1.0.0.0, Culture=neutral,
> PublicKeyToken=null' or one of its dependencies. The system cannot find the
> file specified.
> [rsCompilerErrorInExpression] The Value expression for the textbox
> â'txtTableField2â' contains an error: [BC30451] Name 'ReportsLibrary' is not
> declared.
> So, what am I missing? What do I need to do to get this assembly to work
> with SSRS?
> Thanks,
> Wayne|||Matt,
Thanks! this took care of it. If only I had found this documented somewhere...
"Matt" wrote:
> Is the .dll copied to the following folder on your development machine:
> "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"?
> --
> Matt
>
> "Wayne" wrote:
> > I've created a custom assembly (in VB (VS-2005)) for use in some SSRS2005
> > reports.
> >
> > project: ReportsLibrary
> > Public Class ReportsCodeLibrary
> > Public Shared Function ReturnXML(MVList as Object, Root As String, Node As
> > String, Element As String) As String
> > Dim ReturnString = ""
> > Dim sParamItem As Object
> > ReturnString = "<" & Root & ">"
> > For Each sParamItem In MultiValueList
> > ReturnString &= "<" & Node & "><" & Element & ">" & sParamItem & "</"
> > & Element & "></" & Node & ">"
> > Next
> > ReturnString &= "</" & Root & ">"
> > Return (ReturnString)
> > End Function
> >
> > Public Shared Function Format(s As String) As String
> > Format = left(s,4) & "-" & mid(s,5,2) & "-" & mid(s,7,3) & "-" &
> > right(s,4)
> > End Function
> > End Class
> >
> > Each of these functions work properly if I put them in the Code section. But
> > since they are being used in multiple reports, I want to have the code in one
> > place and use that assembly.
> >
> > The project is compiled in "Release" configuration.
> > I attach this compiled dll (ReportsLibrary.dll) to the report in the
> > Report's properties "Reference" section. Since these are Shared functions, I
> > don't need to define individual classes on that sheet.
> > When I get this working, I'll copy the dll to the SSRS ReportServer\bin
> > directory on the SSRS computer.
> >
> > On the TextBox's (txtTableField2) Value property, I enter the expression
> > "=ReportsLibrary.ReportsCodeLibrary.Format(Fields!fieldName.Value)"
> > When I preview the report in Visual Studio, I get these errors:
> > [rsErrorLoadingCodeModule] Error while loading code module: â'ReportsLibrary,
> > Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullâ'. Details: Could not
> > load file or assembly 'ReportsLibrary, Version=1.0.0.0, Culture=neutral,
> > PublicKeyToken=null' or one of its dependencies. The system cannot find the
> > file specified.
> > [rsCompilerErrorInExpression] The Value expression for the textbox
> > â'txtTableField2â' contains an error: [BC30451] Name 'ReportsLibrary' is not
> > declared.
> >
> > So, what am I missing? What do I need to do to get this assembly to work
> > with SSRS?
> >
> > Thanks,
> > Wayne|||Hi Wayne,
You're right - I had to dig around in samples to find it. Difficult to
search on unless one knows to look for "Custom Report Item" in BOL.
Cheers,
Matt
"Wayne" wrote:
> Matt,
> Thanks! this took care of it. If only I had found this documented somewhere...
> "Matt" wrote:
> > Is the .dll copied to the following folder on your development machine:
> > "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"?
> > --
> > Matt
> >
> >
> > "Wayne" wrote:
> >
> > > I've created a custom assembly (in VB (VS-2005)) for use in some SSRS2005
> > > reports.
> > >
> > > project: ReportsLibrary
> > > Public Class ReportsCodeLibrary
> > > Public Shared Function ReturnXML(MVList as Object, Root As String, Node As
> > > String, Element As String) As String
> > > Dim ReturnString = ""
> > > Dim sParamItem As Object
> > > ReturnString = "<" & Root & ">"
> > > For Each sParamItem In MultiValueList
> > > ReturnString &= "<" & Node & "><" & Element & ">" & sParamItem & "</"
> > > & Element & "></" & Node & ">"
> > > Next
> > > ReturnString &= "</" & Root & ">"
> > > Return (ReturnString)
> > > End Function
> > >
> > > Public Shared Function Format(s As String) As String
> > > Format = left(s,4) & "-" & mid(s,5,2) & "-" & mid(s,7,3) & "-" &
> > > right(s,4)
> > > End Function
> > > End Class
> > >
> > > Each of these functions work properly if I put them in the Code section. But
> > > since they are being used in multiple reports, I want to have the code in one
> > > place and use that assembly.
> > >
> > > The project is compiled in "Release" configuration.
> > > I attach this compiled dll (ReportsLibrary.dll) to the report in the
> > > Report's properties "Reference" section. Since these are Shared functions, I
> > > don't need to define individual classes on that sheet.
> > > When I get this working, I'll copy the dll to the SSRS ReportServer\bin
> > > directory on the SSRS computer.
> > >
> > > On the TextBox's (txtTableField2) Value property, I enter the expression
> > > "=ReportsLibrary.ReportsCodeLibrary.Format(Fields!fieldName.Value)"
> > > When I preview the report in Visual Studio, I get these errors:
> > > [rsErrorLoadingCodeModule] Error while loading code module: â'ReportsLibrary,
> > > Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullâ'. Details: Could not
> > > load file or assembly 'ReportsLibrary, Version=1.0.0.0, Culture=neutral,
> > > PublicKeyToken=null' or one of its dependencies. The system cannot find the
> > > file specified.
> > > [rsCompilerErrorInExpression] The Value expression for the textbox
> > > â'txtTableField2â' contains an error: [BC30451] Name 'ReportsLibrary' is not
> > > declared.
> > >
> > > So, what am I missing? What do I need to do to get this assembly to work
> > > with SSRS?
> > >
> > > Thanks,
> > > Wayne