.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

SSRS custom assembly failure

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Sql Server
I've got a  DLL that (is supposed to) connect to a web service to obtain a value for presentation on my report.  The DLL method always fails when used within an SSRS report, but works fine when utilized within a windows form application running in debug mode.  I know the DLL is installed correctly because if I comment out my web service call and return a static value, it works fine.

Does anyone know why this would fail given the code and config below?  The IIS and SSRS log files do not show any error messages that could help me out.  I'm sure I'm missing a config step somewhere, but I don't know where.

I've added the web service config information to the web.config file for the ReportServer website.

DLL code:

More Related Resource Links

Slow load time of custom assembly on x64 compared to x86.

I am developing an application that automatically generates assemblies using the CSharpCodeProvider (.Net Framework 3.5).  These assemblies contain a single class with a very large number of local variables and methods.  After compilation I create an instance of this class (using Activator.CreateInstance) to be used elsewhere in the application.  When the application is deployed on a 32-bit system (tested on Win 7 Prof 32-bit and on Win XP) the CreateInstance method returns after 1 or 2 seconds, i.e. it first JITs the assembly before creating the instance.  However, on a 64-bit system (tested on Win 7 Home 64-bit, Win Server 2003 64-bit and Win Server 2008 64-bit) CreateInstance takes up to 5 minutes to return. Is there any reason why it would be that much slower on a 64-bit machine? I have tried many different options when compiling, such as setting the platform to x64, using the /optimize flag, etc, but none of these have made a difference. I also tried calling PrepareMethod on all the method in the class.  When I do this in the 32-bit environment, it takes approximately 10 seconds.  In the 64-bit environment it takes more than 3 minutes. As a last resort I tried ngen before constructing the object, but this made no difference in the execution time.

"Mixed mode assembly is built against version 'v2.0.50727'.... " issue and use custom config file

Hi, My Winform applilcation has used Microsoft.SqlServer.Management.Common namespace(assembly :Microsoft.Sqlserver.smo.dll/Microsoft.Sqlserver.ConnectionInfo.dll) and developed in .NET 4.0. Problem:Application is throw an exception when it tries to use above assembly reference methods. Full error text is shown below, "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. " Error is resolved when we include "app.config" file with below code, <?xml version="1.0"?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> </configuration> But, I need to keep configuration file as "renamed.config" and not to include app.config file as of the project requirement.I have set configuration file as "renamed.config" file using below code, //AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "d:\\reanmed.config" ); I have also included <Startup> element in this "renamed.config" configuration file and removed the app.config file.But it raise me below error, it always expect app.config file with <Startup> element to resolve this iss

How do you add duplicate fields to a SSRS custom report and receive differtent output values.

I have built a custom report in SSRS 2008 using fields for supplier and customer.   I have added a Parent Row Group using the Supplier field for the group expression and used the Customer Details as my child details group. This returns a list of all customers for each supplier.   (Supplier | = Customer details ( Name, Dob etc.)   How would I add an additional Supplier field to the customer details returning only values for other Suppliers used by a customer, not the value of the Supplier listed in the Parent Group?

Cannot get the right permission for a Custom Assembly

Has anyone managed to deploy a custom assembly that involves calls to System.Data.SqlClient and System.Configuration (to get the connection string for the database)? I've been fighting this one for a day or two and know that the answer means finding the right mix of asserting permissions in the assembly and granting them in config files. It seems that MS have tied down the security aspects of this so as to make the facility almost unusable! I'm using Windows 7 Professional 64, SQL Server 2008 R2 (Express) and Visual Studio 2010 for development. Yet the documentation is sparse - to say the least. Does anyone know of a document that will tell me what to do?

custom 401/login failure error messages

I have a req to display a custom error message when a user fails to log in 3 times.  The default behavior seem to be for a redirect to something like this http://server/_layouts/AccessDenied.aspx?loginasanotheruser=true&Source=http%3A%2F%2Fserver2k7%2FPages%2FDefault%2Easpx after the third login attempt.  The resulting page just comes up as blank...I'm guessing because it failed auth.  My initial thoughts were to create a custom error page, and redirect with an http module.  That solution (while it does redirect) puts me right back to the initial problem of just a blank page being displayed after the failed auth.  I've been struggling with this for a while now, ANY thoughts or advice would be greaty appreciated.  Is it even possible? 

SSRS 2008 Custom Authentication works when using ReportServer url but not when report manager url is

Hi, I am using SSRS 2008 with Custom security extension for authentication. The extension is developed in c#. I have placed the dll under report server bin and report manager bin directory and the logon,login pages under appropriate directory. My reports manager url is http://localhost:port/Reports and my reports server url is http://localhost:port/ReportServer. When I try to login through reports manager url, I am getting 'login failed' error message from the dll. But when I try to login using reports server url, it works. I have also set 'FullTrust' named permission set in RSMgrPolicy.config . <CodeGroup class="FirstMatchCodeGroup" version="1" PermissionSetName="FullTrust" Description="This code group grants MyComputer code Execution permission. "> < IMembershipCondition class = " ZoneMembershipCondition " version = " 1 " Zone = " MyComputer " /> Any suggestions please!   Thanks!

Shell + WPF Designer + custom assembly

Hello! We try to use VS 2010 Shell to make admin workplace for our application framework. We want to use VS WPF designer to make and edit XAML markup. Markup only, not codebehind or something other. If we create xaml with controls from .NET Framework assemblies, it works right way. But we can't use our custom control libraries. Can you please tell if there is some way to make designer know about our assemblies and allow us to edit xaml-files with controls placed in those assemblies. Thankl you!

VS 2010 Isolated Shell, WPF Designer & Custom Controls produces some assembly reference errors

Hello, i currently try to use the VS 2010 isolated shell for providing a custom WPF editor.As described in the headline the WPF designer is 'partly' not able to find all assemblies (details below). After some research the only similar problem description i found here . Unfortunately I could not find any solution for my problem there. These are the steps i have successfully finished: - create a vs isolated shell application with some basic extensions (some tool windows) - create a Custom Project template based upon the MPFProj project (as describe at: here ) - Add the needed reference for custom control in project template - Create and edit XAML markup (no code behind, only markup) - Compile and run XAML Now, the following problem occurred (as a step by step description): - I add a custom control to the toolbox using the context menu "Choose Items..." (ok ) - I drag this custom control from the toolbox into the WPF designer view (ok ) - The custom control is rendered correctly and no assembly reference errors occurred (ok ) - I hit the F5 button in order to execute the XAML markup -> The application is starting correct and looks as exspected (ok ) - I close the running application (window) -> Now the WPF designer view seems to refresh and 'tells' me that an assembly (the one of the custom control) could not be found (error!!! ): There error text is: "Th

SSRS custom security extension behind a router fire wall not working

I have a instance of SSRS 2008 installed (we are not using IIS) with custom security extension which accepts a application user ID and password and sends back a sql authorization cookie back to client for logging into SSRS.  The (SSRS) server is behind a router,  SSRS is configured on port 81,  Port 81 in router if forwarded to the SSRS server. Here is the problem If I am inside the router firewall (RDP'ed to the machine) I am able to access report server (http://xx.xxx.xxx.xx:81/ReportServer) and reports manager (http://xx.xxx.xxx.xx:81/Reports) without any issues. If  am outside the firewall and try to go to report server page (http://xx.xxx.xxx.xx:81/ReportServer) from browser and try to login it works (I am getting the cookie back and authentication goes through fine).   But if I try to access reports manager (http://xx.xxx.xxx.xx:81/Reports) the login page shows up when I enter user ID and password and hit enter to authenticate it comes back to the login screen (I am not gettint the cookie back from SSRS). Any help is highly appreciated on how to debug /fix this issue. Note : if I first login to Reportserver (which sends the cookie back) and in the same session I login to Reports Manager I am able to get into Reports Manager page since I got the cookie when I logged in to reports server page already.  When I

Character spacing issue SSRS 2005 custom font

Hello together, we are facing a strange character spacing issue in SSRS 2005 SP3 (Version 9.00.4035.00). As we export the report to a pdf file, we get unwanted spaces between each character. The report uses custom fonts. Is there any known issue related to this? I appreciate your help. Thanks!  Kind regards Moritz Mars

Getting "Provider load failure" from SSRS Configuration Manager (SQL 2008 R2 Hot Fix CU3 did not fix

After upgrading our SQL 2008 cluster to R2, SSRS on one node works fine, but the second node will not allow connection via the Configuration Manager (getting "Provider load failure").  We've done re-installs, repairs and applied Hot Fix CU3, but the issue remains. NOTE: It's understood that SSRS is not a clustered resource.  We have it installed as separate instances on each of the two cluster nodes.

requirePermission - please help - assembly problem (SSRS 2008)

*SSRS 2008 Hi All My report has custom code, the code references Oracle.DataAccess.dll for accessing an Oracle Database. The report works fine in the Designer, when I deploy it to the Report Server, I always get #Error in the column referencing the custom code. I caught the exception, the error is: ============================================== System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> System.Security.SecurityException: Request for ConfigurationPermission failed while attempting to access configuration section 'oracle.dataaccess.client'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. ---> System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) The action that failed was: Demand The type of

Reference Custom Assembly on Report Server

I have built the Custom Assembly and asked System Admin to deploy it on Report Server in the ReportServer/bin folder. Now System Admin has deployed this Cusomt Assembloy on Rpeort Server and sent me an URL http://mycompany/. But I am not sure how to reference this Custom Assembly using a URL in Reporting Services 2008. Please help!!!    

Reflection.Assembly Load Failure on GAC Deployed DLL From Layouts Directory

So, I've got the oddest thing going on with a web part project that I'm working on for our MOSS '07 server farm.I created a web part that connects to our Active Directory as a sort of company directory thing.  Permission requirements seem to be such that I have to deploy the DLL to the GAC, which I've configured my setup package (WSP Builder) to do.  Everything seems to be working just fine.Then, I add an ASPX page to the Layouts directory in the 12 hive which is supposed to display all the contact details for the domain user by accessing the same DLL that the web part uses.  However, the ASPX page can't find the DLL in the GAC.  I get the following error message in my popup window:File Not Found.   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)    at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)    at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)    at System.Reflection.Assembly.Load(String assemblyString)    at System.Web.Configuration.CompilationSection.LoadAssembly(String assemblyName, Boolean throwOnFail

Can I change the location SSRS 2008 uses for custom assemblies?

According to all the documentation or articles I've read, in order for an SSRS 2008 report to use a custom assembly the DLL must be copied to 1) For local development on my box:  C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies 2) For server deployment: C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER2008\Reporting Services\ReportServer\bin  I've got this all working just fine. However, I have a need to put this DLL file in a different location.  Is this possible?  Is there a way to reconfigure the server installation so that it looks for custom assemblies in a different location?  Is there something I can do in the SSRS report itself to force it to look for the custom assembly in a different location?

How to deploy custom assembly to Sharepoint and invoke it from Silverlight or WPF client?


I apologize upfront because my questions are probably trivial, but I don’t even know the correct wording to search for solution. We have C# assembly which performs some OpenXML processing and now we need to “plant” it to Sharepoint 2010 server, so that it can be invoked from the client to work on server documents.


1.     How (in what form) do we deploy it to the server, so that it is accessible (invocable) from the client code? We use VS 2010 for development.


SSRS 2005 to 2008R2 custom code migration issue


We have an SSRS 2005 report that we upgraded to 2008R2 with custom code in the report properties code tab that no longer works.  We checked permission setting in the report server config files, checked if the data set was passig nulls and it is not, looked to see if we ignored the error if the report would render the correct value anyway despite the error and it did not, tried different code variations and referencing different system libraries without luck....we are truly baffled.  The only thing that does work is setting the total to 0 and removing the loop through the jsColl to compute the total.  Here is the code that used to work on 2005.  Any ideas why it does not work on 2008R2?  We call it in an expression =Code.getTotal()



jsColl As Microsoft.VisualBasic.Collection


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend