I'm trying to reference a custom assembly from an RDLC in a web
application and, eventually, managed to get it to work.
It required signing the assembly and deploying it to the GAC before the
ReportViewer control could find and load the assembly, with
ExecuteReportInCurrentAppDomain() and
AddTrustedCodeModuleInCurrentAppDomain() being called on the
LocalReport for it to render successfully.
Is there no way to get the RDLC to find and load the .dll already in
the Bin directory, without requiring each new version to be signed and
deployed to the GAC?
Thanks for any response.
What I find strange is why .NET cannot bind to your private assembly in the
app bin folder. Have you tried Fuslogvw to get more insight into the binding
issue?
--
HTH,
----------------------------------------------
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
----------------------------------------------
<vija...@gmail.com> wrote in message
news:1133203908....@g43g2000cwa.googlegroups.com...
The following were the differences in the pre-bind state information,
as a result of which the assembly was loaded successfully by the web
application from Bin/, but not by the ReportViewer:
[Web application loading of assembly]
The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.
=== Pre-bind state information ===
LOG: DisplayName = DataLib, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=995882a1f6986c17 (Fully-specified)
LOG: Appbase = file:///C:/projects/Test/TestWebSite/
LOG: Initial PrivatePath = C:\projects\Test\TestWebSite\bin
LOG: Dynamic Base =
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\testwebsite\12ac5c57
LOG: Cache Base =
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\testwebsite\12ac5c57
LOG: AppName = ecc6c861
Calling assembly : System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a.
[ReportViewer loading of assembly]
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file
specified.
=== Pre-bind state information ===
LOG: DisplayName = DataLib, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=995882a1f6986c17 (Fully-specified)
LOG: Appbase = file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : Microsoft.ReportViewer.Common, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
--
HTH,
----------------------------------------------
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
----------------------------------------------
"vijayan" <vija...@gmail.com> wrote in message
news:1133258854.8...@g49g2000cwa.googlegroups.com...
In the case of WinForms apps, custom assemblies can be in the same directory
as the application's .EXE file; no need to copy to GAC.
--
HTH,
----------------------------------------------
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
----------------------------------------------
"Teo Lachev [MVP]" <teo.l...@nospam.prologika.com> wrote in message
news:%23KwW6KV...@TK2MSFTNGP09.phx.gbl...
I received similar confirmation from the MS forum:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=151829&SiteID=1
/vijayan