Null Reference Error When Using A Custom Assembly That Uses An App.config File

Apr 7, 2008

I have a custom assembly that uses a config file to obtain database connection settings. This dll is then used by my sql report. I have added refrerenced to all the required dll's in my report and added the required code groups to all the necessary files. I have also placed my app.config file in C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServer and C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies
However when I actually run the report in the designer (vs2005) I am receiving Null reference exceptions when my code tries to read my config file because it is reading the machine.config file and not my app.config file. If I hard code my connection string everything works fine.

Can anyone tell me why the machine.config file would be referenced instead of my app.config file and how I can stop it from doing this?

View 6 Replies


ADVERTISEMENT

Reference Report Items Within A Custom Assembly?

Mar 14, 2007

How do I reference report items (such as textboxes, datasets, tables, etc...) from within a custom assembly?

Thanks!

View 3 Replies View Related

Reporting Services :: Could Not Load File Or Assembly Error On Adding Custom Libraries In SSRS Reports

Sep 21, 2015

I have created a custom library(CodeLibrary) which internally references the dlls Microsoft.TeamFoundation.Client and Microsoft.TeamFoundation.WorkItemTracking.Client.

I added this custom Dll codelibrary.dll to my SSRS report. and the expression of one of the field as 

=codelibrary.codefunction.GetValue(1000)  
codefunction is the class and GetValue is the method.

When I preview the report, I get the error "Error while loading code module:

'CodeLibrary,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null'. Could not load file or assembly 'CodeLibrary,Version1.0.0.0, Culture=neutral,PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

I am using VS2013, I have placed the custom library DLL in the path

C:Program FilesMicrosoft Visual Studio 12.0Common7IDEPrivateAssemblies

I have tested the custom library with a WPF application and it works fine.

I am not able to figure out what is causing this error.

View 4 Replies View Related

CREATE ASSEMBLY ERROR -- An Implicit Reference Of Some Kind ???

Jun 28, 2006

When I run this ...

CREATE ASSEMBLY asmRANDRTCalendaringGateway FROM 'E:sqlRANDRTCalendaringGateway.dll' WITH PERMISSION_SET = UNSAFE

I get this error ...

Msg 10301, Level 16, State 1, Line 1
Assembly 'RANDRTCalendaringGateway' references assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.

Even though I do not explicity refer to system.web in the DLL's code ...

using Microsoft.Win32;
using System;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
using log4net;
using ADODB;
using MAPI;
using CDO;
using System.Runtime.InteropServices;

Is the problem just staring me in the face ?

cheers

View 14 Replies View Related

Custom Assembly : Retrieving Data From From Configuration File.

Mar 7, 2006

Hi all,

my problem is that: I do read informations (e.g. connectionString) from configuration file by one custom assembly.
My environment is RS2005, VS.NET 2005 Prof.Edition, WIN2003 Server SP1, .NET Framework 2.0.50727
The scenario is that:
A text box into my report require a function contained into MyCustom.dll. This code do read information from MyCustom.dll.config.

This file contains:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="IS2009cfg" connectionString="data source=servernameinstancename;initial catalog=dbname;user id=xx;password=yy;" />
</connectionStrings>
<appSettings>
<add key="DefaultHeaderLogo" value="This is a test" />
</appSettings>
</configuration>

Using
ConnectionStringSettings conn = ConfigurationManager.ConnectionStrings["IS2009cfg"];
the result is null.

Also using
string defaultHeaderLogo = ConfigurationManager.AppSettings["DefaultHeaderLogo"];
the result is null.

MyCustom.dll and MyCustom.dll.config are located into locations of Report Server and Report Designer, with this Build Events on succesfully build:

rem Copy custom assembly to ReportDesigner location...
copy "...mydeveloplocation...inDebugMyCustom.dll" "C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesMyCustom.dll"
copy "...mydeveloplocation...inDebugMyCustom.dll.config" "C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesMyCustom.dll.config"
rem Copy custom assembly to ReportServer location...
copy "...mydeveloplocation...inDebugMyCustom.dll" "C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesReportServerinMyCustom.dll"
copy "...mydeveloplocation...inDebugMyCustom.dll.config" "C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesReportServerinMyCustom.dll.config"

The question is simple: where I do locate configuration file for obtain value during report execution?

Many thank's in advance

Claudio Barca
Turin - Italy





View 2 Replies View Related

Error In Custom Assembly

Jan 7, 2008

When I add a custom assembly

I am trying to pass certain fields in dataset I am getting the following error



invalid fields i.e. that is fields that I passed are invalid.

It also says multi path identifier for microsft.reportingservices.reportobjectmodel.fieldimpl cud not be found.

Thanks

Sai

View 1 Replies View Related

Retrieve NULL Values From Config File

Apr 10, 2008

Hi,

my configuration file provides parameters that are used for an SQL query in my package. However, for these parameters it must be possible to pass NULL to the query.

This seems to be impossible in SSIS..? If the config file provides no value, the package uses a default value - and this default value can not be null.

Any suggestions?

Thanks a lot,

Regards
Jan

View 4 Replies View Related

ALTER ASSEMBLY Error Msg 6509 An Error Occurred While Gathering Metadata From Assembly ‘&&<Assembly Name&&>’ With HRESULT 0x1.

Feb 22, 2008

I work with February CTP of SqlServer 2008.
I have an Assembly with several UDTs inside. Version of assembly is 1.0.*
I use CREATE ASSEMBLY statement to register this assembly, and it runs without any errors. Then I rebuild CLR solution without doing any changes in source code. In that case the only difference between new and old assemblies is version (difference in fourth part of version).
Then I try to update assembly in SqlServer. I use
ALTER ASSEMBLY <name>
FROM <path>
WITH PERMISSION_SET = UNSAFE, UNCHECKED DATA
statement for this. Statement runs with error:
Msg 6509An error occurred while gathering metadata from assembly €˜<Assembly name>€™ with HRESULT 0x1.
I found the list of condition for ALTER ASSEMBLY in MSDN:
ALTER ASSEMBLY statement cannot be used to change the following:
· The signatures of CLR functions, aggregate functions, stored procedures, and triggers in an instance of SQL Server that reference the assembly. ALTER ASSEMBLY fails when SQL Server cannot rebind .NET Framework database objects in SQL Server with the new version of the assembly.
· The signatures of methods in the assembly that are called from other assemblies.
· The list of assemblies that depend on the assembly, as referenced in the DependentList property of the assembly.
· The indexability of a method, unless there are no indexes or persisted computed columns depending on that method, either directly or indirectly.
· The FillRow method name attribute for CLR table-valued functions.
· The Accumulate and Terminate method signature for user-defined aggregates.
· System assemblies.
· Assembly ownership. Use ALTER AUTHORIZATION (Transact-SQL) instead.
Additionally, for assemblies that implement user-defined types, ALTER ASSEMBLY can be used for making only the following changes:
· Modifying public methods of the user-defined type class, as long as signatures or attributes are not changed.
· Adding new public methods.
· Modifying private methods in any way.

But I haven€™t done any changes in source code, so new version of assembly satisfies all this conditions.
What could be the reason for such behavior?
P.S. I€™ve got the same error, if I add or change any method in assembly before rebuilding.

View 9 Replies View Related

Reporting Services :: Parsing SSRS Config File And Dynamically Changing File Path Of Config File In Code

Sep 2, 2015

Currently have a single hard coded file path to the SSRS config file which parses the file and provides the reporting services web service url.  My question is how would i run this same query against 100s of servers that may or may not share the same file path as the one hard coded ?

Is there a way to query the registry to find the location of the config file of any server ? which could be on D, E, F, H, etc. 

I know I can string together the address followed by "reports" and named instance if needed, but some instances may not have used the default virtual directory name (Reports).

Am I going about this the hard way ? Is there a location where the web service url exists in a table ? I could not locate anything in the Reporting service database. Basically need to inventory all of my reporting services url's.

View 2 Replies View Related

.NET Permissions Error In Reporting Services When Not Using A Custom Assembly (Smiley Faces Are Not Under My Control)

May 22, 2007

.NET Permissions Error in Reporting Services when not using a custom assembly:
I need help resolving a permissions error I€™m taking in a SQL RS 2005 report.
I have a report that that is includes the following code fragment in Report Properties -> Code:
Function rtf2text(ByVal rtf As String) As String
Dim rtfcontrol As New System.Windows.Forms.RichTextBox
Try
rtfcontrol.Rtf = rtf
Return rtfcontrol.Text
Catch ex as Exception
Return ex.Message
End Try
End Function
I reference the .NET System.Windows.Forms DLL under Report Properties -> References -> References, Assembly Name (heading):
System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
I have a text box with the following expression:
=code.rtf2text(First(Fields!EndingQuoteComment.Value, "QuoteHeader"))
And I€™ve verified, by removing the code.rtf2text command that is populated with the following:
{
tf1ansiansicpg1252deff0deflang1033{fonttbl{f0fromanfprq2fcharset0 Times New Roman;}{f1fnilfcharset0 Arial;}} viewkind4uc1pardif0fs32 ** Ending Quote Comments **par 0i0f1fs17par }
When I run the preview in Visual Studio is correctly strips the RTF and displays just €œ** Ending Quote Comments **€?. When I €˜RUN€™ locally or deploy to a SQL RS 2005 Server and run the report I take the following error:
Request for the permission of type 'System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I€™ve tried everything that I can think of on the server to make this work.
I finally put together a Win 2003 box with SQL 2005, IIS, and RS 2005 running on it in a virtual machine to be 100% sure I had a standard clean install and deployed the report and I€™m getting the same error.
Below I€™ve included a basic standalone RDL file that demonstrates my issue. I get the error referenced above when I deploy the RDL below. Any ideas or suggestions are greatly appreciated?

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<BottomMargin>0.25in</BottomMargin>
<RightMargin>0.25in</RightMargin>
<PageWidth>7.75in</PageWidth>
<rdrawGrid>true</rdrawGrid>
<InteractiveWidth>7.75in</InteractiveWidth>
<rdnapToGrid>true</rdnapToGrid>
<Body>
<ReportItems>
<Textbox Name="textbox21">
<Left>0.25in</Left>
<Top>0.25in</Top>
<rdefaultName>textbox21</rdefaultName>
<Width>6.375in</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontSize>7.5pt</FontSize>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Height>1.375in</Height>
<Value>=code.rtf2text("{
tf1ansiansicpg1252deff0deflang1033{fonttbl{f0fromanfprq2fcharset0 Times New Roman;}{f1fnilfcharset0 Arial;}} viewkind4uc1pardif0fs32 ** Ending Quote Comments **par 0i0f1fs17par } ")</Value>
</Textbox>
</ReportItems>
<Height>5.25in</Height>
</Body>
<rd:ReportID>8804486c-882f-493c-8dfb-b2f778a24b21</rd:ReportID>
<LeftMargin>0.25in</LeftMargin>
<CodeModules>
<CodeModule>System.Windows.Forms, Version=2.0.50727.42, Culture=neutral, PublicKeyToken=b77a5c561934e089</CodeModule>
</CodeModules>
<Code>Function rtf2text(ByVal rtf As String) As String
Dim rtfcontrol As New System.Windows.Forms.RichTextBox
Try
rtfcontrol.Rtf = rtf
Return rtfcontrol.Text
Catch ex as Exception
Return ex.Message
End Try
End Function </Code>
<Width>7.25in</Width>
<InteractiveHeight>10in</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>0.25in</TopMargin>
<PageHeight>10in</PageHeight>
</Report>

View 2 Replies View Related

SSIS - Need To Reference .NET Assembly Without GAC

Jan 25, 2007

I have a .NET assembly that I need to reference and use within my SSIS script task.
The only way I can acheive this is to strongly name my assembly and put it in the GAC.
This is not possible as my assembly is already in production and uses other 3rd party assemblies that would also need to be registered in the GAC.
As a workaround, I have created a .Net console application that references my assembly, that call from a SSIS Process Task.
Does anyone know of another way I could use my .NET assembly within my SSIS package?
Any help appreciated.
 Regards,
Paul.

View 3 Replies View Related

Assembly Reference Issue

Oct 8, 2007

I have an external reference to an assembly that uses the following external references of its own:

System
System.Data
System.Xml

In BIDS everything works without any issues so I decided to deploy the package to my database server. In doing so, I copied the DLL reference for my external assembly to obth the GAC and the v2.0.50727 folder and I even went as far as to copy the assembly folder into the Program Files folder.

Despite these efforts, I keep obtaining the following error:

The script threw an exception: Could not load file or Assembly 'MyComponent, Version-1.0.0.0,Culture=neutral,PublicKeyToken=f5bb784d481b2932' or one of its dependencies. The system cannot find the file specified.

I checked the version of my DLL in all 3 places and both the version and the token are the same.

I checked the properties within the script task and it has the exact same path to the v2.0.50727 folder (which shouldn't matter given the GAC...).

Does anybody has any ideas why this exception is occurring?

Thank you for your help!

View 4 Replies View Related

Calling .Net Assembly Or Dll From SQL Server 2005 At Config Level 80

Jul 26, 2006

Hi,
I create a dll assembly with the strong name in VB.Net environment.
Created assembly is registered also.
SQL Server 2005 configuraton level is set at "80"
I want to call that assembly from stored procedure with the database config level at "80"
But when i execute the stored proecure i get the following error
Error Source: "ODSOLE Extended Procedure"
Description: "Invalid Class String"

My Code in VB.Net is given below:
Imports System
Imports System.Reflection
Imports System.Globalization
Imports System.IO
Imports System.data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports Microsoft.SqlServer.Server
Imports Microsoft.VisualBasic
Imports System.Diagnostics
Imports GreatDataAccess

Namespace Test
Public Class clsTest

Public Shared Sub GenTest()
''''............ some code is here
End Sub
End Class
End Namespace

Stored Procedure
CREATE PROCEDURE [dbo].[PPGenerateFile]
AS
BEGIN
Declare @retVal INT
Declare @comHandler INT
declare @errorSource nvarchar(500)
declare @errorDescription nvarchar(500)
declare @retString nvarchar(100)

-- Intialize the COM component

EXEC @retVal = sp_OACreate Test.clsTest, @comHandler OUTPUT
IF(@retVal <> 0)
BEGIN
--Trap errors if any
EXEC sp_OAGetErrorInfo @comHandler,@errorSource OUTPUT, @errorDescription OUTPUT
SELECT [error source] = @errorsource, [Description] = @errordescription
Return
END



-- Call a method into the component

EXEC @retVal = sp_OAMethod @comHandler,'GenTest()',@retString

IF (@retVal <>0 )
BEGIN
EXEC sp_OAGetErrorInfo @comHandler,@errorSource OUTPUT, @errorDescription OUTPUT
SELECT [error source] = @errorsource, [Description] = @errordescription
Return
END
select @retString

END






Please Help me to solve this problem.

View 21 Replies View Related

Cannot Find File Or Assembly Error.....

Feb 28, 2007

I created an assembly to access my SSRS web service in a Script task. The package runs fine on my machine but gets the following error from the production box.....

The script threw an exception: Could not load file or assembly 'Microsoft.SqlServer.ReportingServices2005, Version=0.0.0.0, Culture=neutral, PublicKeyToken=3bd4760abc5efbcb' or one of its dependencies. The system cannot find the file specified.

I followed the exact same procedures for creating the .dll on the production box as I did developing on my machine...strong name, load to gac etc....but it still cannot find it.

My production SQL Server is 64 bit so perhaps there is another step I need to take? Anyone have a clue as to what I may be missing?

TIA

View 1 Replies View Related

SSIS Connection Error When Using Config File

Dec 17, 2007

Hi

I am developing one SSIS package to migrate an Oracle Database to SQL Server 2005 DB through ODBC. My problem is with configuration. I have to use configuration file so that in production environment the end-user must be able to change the user credentials to connect both database servers. I am trying xml configuration file. When I try to use xml configuration, my odbc connection is giving error. But if I disable the configuration through "Package Configurations Organizer", it works fine. Using an XML Editor I checked the .dtsconfig file and entered both passwords for the both connections.

I tried logging and below are the few text from log file related to error.




Code Block
User:Diagnostic, Nebu, BLRDOMNebu, DestOdbcConnection,{E3535ED4-1D21-41B9-9796-E9F5B47FFD5B}, {6820E259-18FF-4FCA-B820-73EE931D2095},12/17/2007 8:16:39 PM,12/17/2007 8:16:39 PM,0,0x,ExternalRequest_pre: The object is ready to make the following external request: 'IDbConnection.Open'.

User:Diagnostic,Nebu, BLRDOMNebu, DestOdbcConnection,{E3535ED4-1D21-41B9-9796-E9F5B47FFD5B},{6820E259-18FF-4FCA-B820-73EE931D2095},12/17/2007 8:16:41 PM,12/17/2007 8:16:41 PM,0,0x,ExternalRequest_post: 'IDbConnection.Open failed'. The external request has completed.






I am using Protection level = EncryptSensitiveWithPassword for the package.

Please help me.

Thanks & Regards

Charmis

View 4 Replies View Related

Config File Already Exists Error While Building SSIS Package

Jul 2, 2007

Hi

While trying to build SSIS Package Project, the following error is thrown. I have added configuration file recently to fetch the dynamic values such as connection string, output path etc.



I tried manually cleaned up the debug folder and tried build but still the error occurs.



Can any one help in suppressing this error?



Error 1 System.ApplicationException: Could not copy file "D:ExportExport.dtsConfig" to the deployment utility output directory "D:ExportinDebug". ---> System.IO.IOException: The file 'D:ExportinDebugExport.dtsConfig' already exists. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.CopyFiles(ICollection fileNames, String outputPath) --- End of inner exception stack trace --- at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.CopyFiles(ICollection fileNames, String outputPath) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.CreateDeploymentUtility(IOutputWindow outputWindow) 0 0


Thanks in advance,

Prabha

View 1 Replies View Related

Programatically Creating Dataflow Tasks Require Assembly Reference

Jan 17, 2007

Hi,

I am creating dataflow tasj using following

Imports Microsoft.SqlServer.Dts.Runtime

Imports Microsoft.SqlServer.Dts.Pipeline

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

These refer to Microsoft.SqlServer.DTSPipelineWrap.dll and Microsoft.SQLServer.DTSRuntimeWrap.dll. While these assemblies were already there in my dev machine I don't find these files in production enviornment for SQL server 2005. I am refering these assemblies from following path in my local machine : C:Program FilesMicrosoft SQL Server90SDKAssemblies.

How to install these assemblies in prod env, offcource one option is to copy it and then put it in GAC thru script . Why does not it gets installed while installation of SQL server 2005. Are these assemly dependent on SP1 ?

Thanks

Mohit

View 4 Replies View Related

Error Attempting To PREVIEW In OLE DB Source Editor - Could Not Load File Or Assembly

Feb 28, 2007

Please... any ideas? Is this a footprint config issue?



TITLE: Microsoft Visual Studio

There was an error displaying the preview.




ADDITIONAL INFORMATION:


Could not load file or assembly
'Microsoft.SqlServer.SQLTaskConnectionsWrap, Version=9.3.242.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The system cannot find the file specified.
(Microsoft.DataTransformationServices.Design)




BUTTONS:


OK




===================================





There was an error displaying the preview. (Microsoft Visual Studio)





===================================





Could not load file or assembly
'Microsoft.SqlServer.SQLTaskConnectionsWrap, Version=9.3.242.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The system cannot find the file specified.
(Microsoft.DataTransformationServices.Design)





------------------------------


Program Location:





at
Microsoft.DataTransformationServices.Design.PipelineUtils.ShowDataPreview(String
sqlStatement, ConnectionManager connectionManager, Control
parentWindow, IServiceProvider serviceProvider,
IDTSExternalMetadataColumnCollection90 externalColumns)

at
Microsoft.DataTransformationServices.DataFlowUI.DataFlowConnectionPage.previewButton_Click(Object
sender, EventArgs e)

View 1 Replies View Related

Custom Assembly SecurityException

Feb 26, 2008



Hi,

I'm trying to do something rather weird, but I really need it. I'm trying to launch a SSIS package from a report

I built a custom assembly with one method that loads a package from file and then executes it. The assembly works fine.

I added the custom assembly to the report properties, instantiated the class in the assembly (the method is not static), called the method from the report (a textbox renders the string return value from the method).

I added the


Code Snippet[assembly: System.Security.AllowPartiallyTrustedCallers]
attribute to the AssemblyInfo.cs file

Created the strong name for the assembly.

Got the PublicKeyBlob with ILDASM, used it to add a new CodeGroup with the "StrongNameMembershipCondition" in the policy configuration files of ReportDesigner (RSPreviewPolicy.config), ReportServer (rssrvpolicy.config) and ReportManager (rsmgrpolicy.config).

Copied the dll in the bin folders of ReportServer and Visual Studio PrivateAssemblies.


I keep getting the awfull #Error message on the report when viewing it from ReportManager or ReportServer (in preview mode in VisualStudio all is well because security is not applied to user code).


I tried debugging:
- created a solution with two subprojects, one is the report, the other one is the assembly
- marked the report as the Startup Item
I get a SecurityException in debug and debuglocal modes when I try to instantiate a SSIS package.



Code SnippetPackage = new Package();

While digging in the exception call stack, it turns out I lack a permission for accessing unmanaged code (the source assembly of the exception is mscorlib). Also in the ouput window, while starting debugging i see a lot of SystemArgument exceptions in mscorlib.

I am perfectly aware that in order to be able to launch a SSIS package from code I referenced Microsoft.SqlServer.DtsRuntimeWrap.dll, so in desperation I added another CodeGroup in the aforementioned config files for this dll (StrongNameMembershipCondition) and copied the assembly in the deployment folders.


1: I would really like to know how to get the whole thing working. I find rather strange that even though I set the FullTrust

PermissionSet for my assembly (and the Microsoft.SqlServer.DtsRuntimeWrap assembly) I keep getting security exceptions.

While exploring the web for help I saw I need to assert all individual permissions for every restricted resource I'm accessing in the custom assembly, problem is I don't know exactly which ones I'm accessing and, being new to .NET security, I don't know how.

Surely I need to assert a file IO permission to load the package from file, a sqlclientpermission if I am accessing SqlServer in the package, and perhaps a unmanagedcode permission, given the the exception I described earlier (perhaps the Microsoft.SqlServer.DtsRuntimeWrap assembly is not managed code or is accessing some other unmanaged assembly).

Again, I wouldn't know how.

...and last

2: I tried modifying the assembly to only load a string from a file.. I had some problems with security but I got it working once, but I haven't figured out how exactly 'cause when fiddling around to understand things, I lost the working configuration. Really stupid, I know....
While testing this version of the assembly I followed an advice I found on some blog and restarted IIS and Reporting Services system service..

Is this always necessary after modifying the assembly source ? Do I need to restart every time both IIS AND Reporting Services

I would really appreciate every bit of help or advice anyone has to offer.

Thanks in advance.

View 6 Replies View Related

Using Custom Assembly &&amp; Gacutil &&amp; Sn

Jan 22, 2008

Hello experts,

I need some help please.
Yesterday I get the answer that I had to use an assembly if I would like to use a function as global. Right now I€™m very desperate because my VS didn€™t recognize my DLL.
I get the error: "Could not load file or assembly .....The system cannot find the file specified."
After red the threads I tried to use gacutil.exe to add my assembly to the cache.
This action fails with the error:€? Failure adding Assembly to cache. Attempt to install an assembly without a strong name.€?
After that I tried to build a strong name through the follow execute:
Sn €“Vr ClassLibrary.dll. This action fails too. I get the follow Error description: €œdll does not represent a strongly named assembly€?.

What made me wrong?
Is there an easier workaround?
Have someone a good Idea could help me?

Hope to hear you soon.

Best regards,
Alex

View 4 Replies View Related

Using Custom Assembly As A DataSource

Nov 27, 2007

Hi,

I was wanting to get some data through a custom assemly. I can successfully return a primitive data type such as a string and put it in a textbox, but I really need to return more data, and possibly bind it to a Table.

For example, maybe I could return from the call a Dataset and bind it as a DataSource which then can be bound to a Table, or maybe a array of string.

Is this possible? If so, are there any good examples that you know of?

Thanks,

AussieGuy

View 1 Replies View Related

Problems Using Custom Assembly

Apr 6, 2006

Hi there

I am trying to integrat a custom assembly into a ssis-package. I copy the assembly into the framwork folder (v2.0.50727) add the reference, use the assembly everything fine. When I try to debug I get a message stating that the assembly name, version .... cannot be found. I tried to do that with signing and without - not difference.

Am I missing something?

Please help

View 3 Replies View Related

Using Custom Assembly Problem. Help!

Oct 28, 2005

I've created C# assembly which was included into Script Task code as following:

View 10 Replies View Related

Custom Assembly Security

Oct 3, 2007

Hello Everyone,

When I run my report from report manager, I get the following error message

Failed to load expression host assembly. Details: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

My report uses a custom assembly. I have already done the following

1. copied the assembly in the "reportserverin" and the "common 7privateassemblies" area
2. Made the following entry in the rssrvpolicy.config

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="RSUtil.TranslationHelper"
Description="Translation Helper Utility">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:Program FilesMicrosoft SQL ServerMSSQL.5Reporting ServicesReportServerinAMOTest.dll"
/>
</CodeGroup>


3. Added the following line to my assemblyinfo.cs file

[assembly: AllowPartiallyTrustedCallers]

regards,
Abhishek.

View 9 Replies View Related

Yet More Issues With Custom Assembly

Feb 28, 2008

I have developed a custom assembly to render a signature from an array of bytes in an SSRS Image control. The assembly works perfectly in the designer. It is strong-named and has the AllowPartiallyTrustedCallers attribute applied to it; I have deployed the assembly to the "%SQL SERVER%MSSQL.3Reporting ServicesReportServerin" folder; given it fulltrust permissions in the rssrvpolcy.config file; made sure that the NTFS file security is correct; and the assembly just doesn't appear to be called. The assembly doesn't execute when I use the "F5" popup preview mode on my development machine, either.

I don't get any error messages in the report, I just don't get any image output, either. The rest of the report elements render correctly. Of course, the SSRS log files are useless. Enabling the Verbose trace switch doesn't yield any useful information, I don't think, except that in the lines pertaining to running my signature-enabled report there are no mentions of even attempting to use my custom assembly.

I have attempted to enable object access auditing (both success and failure) to determine if my assembly is even being accessed by SSRS and there are no audit messages in the Security Event log.


Can anyone offer any other troubleshooting suggestions?

Thanks,
Matthew Belk

View 3 Replies View Related

CS0246: The Type Or Namespace Name 'SqlConnection' Could Not Be Found (are You Missing A Using Directive Or An Assembly Reference?)

Jan 20, 2008

Hello,I just lost all my data doing a system restore and now trying to rebuild my web project.However, Am getting the error below, trying to use a class to run my Stored procedure.What is wrong herethanksEhiCompiler Error Message: CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?)Source Error:Line 22: //SqlConnection con = new SqlConnection("cellulant_ConnectionString");
Line 23: //SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["cellulant_ConnectionString"].ToString());
Line 24: SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["cellulant_ConnectionString"].ToString());
Line 25:
Line 26: Source File: c:inetpubwwwrootcellulant1App_Codesignup_data-entry.cs    Line: 24   using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;


public class signup_data_entry
{
public signup_data_entry(DateTime dob1)
{

//SqlConnection con = new SqlConnection("cellulant_ConnectionString");
//SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["cellulant_ConnectionString"].ToString());
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["cellulant_ConnectionString"].ToString());


SqlCommand command = new SqlCommand("Cellulant_Users_registration", con);
command.CommandType = CommandType.StoredProcedure;

con.Open(); 

View 2 Replies View Related

Reporting Services :: External Assembly Reference Same DB Data Source As Calling Report?

Aug 25, 2015

I have a SSRS 2012 report which references a custom c# assembly.   This report exists in multiple environments (alpha, beta and  production ) which are each associated with different data sources.

Is there a way for the assembly to determine the datasource used by the calling report so it can also connect to it?

View 2 Replies View Related

Custom Assembly And Ssrs 2005

Mar 28, 2008

i deigned assembly and referced it to my report in preview
when deployed the report , i get #Error
i don't add any cas code.
pls help

View 4 Replies View Related

.NET Framework :: How To Use Custom Assembly That Uses AxMetadataServiceClient

Oct 8, 2015

I have build a vb.net class that uses the AxMetadataServiceClient (MS Dynamics Axapta model store) this class works like expected in .net app.When I try to create this assembly in sql it fails with this error

Msg 10300, Level 16, State 2, Line 6

Assembly 'System.EnterpriseServices' references assembly 'System.EnterpriseServices, version=4.0.0.0, culture=neutral, publickeytoken= b03f5f7f11 d50a3 a.', which is not present in the current database.

SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: version, culture or public key mismatch). Please load the referenced assembly into the current database and retry your request.can't create the assembly since it references it self and can't find it self ?

View 3 Replies View Related

Using Custom Assembly In Ssrs 2008

Mar 25, 2008

I have a custom assembly that I'm trying to use with my resport in Reporting Services in SQL Server 2008.
I keep consistently getting a "Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data,Version=2.0.0.0, Culture=neutral,PublicKeyToken=b77a5c561934e089' failed" error. Even in preview mode.

- I added <Assembly: AllowPartiallyTrustedCallers()> attribute to the assembly
- I'm asserting the permission in the routine that is doing the database call with the follwing lines:
Dim permission As SqlClient.SqlClientPermission = New SqlClient.SqlClientPermission(PermissionState.Unrestricted)
permission.Assert()
- I went in .net 2.0 Framework configuration and made the assembly fully trusted
- I added the approprtiate codegroup to the rssrvpolicy.config file
- I tried the same assembly on another PC running SQL server reporting services 2005, its working just fine.

what is it that I am missing?

View 1 Replies View Related

Local Reportviewer And Custom Assembly

Jan 7, 2008

Hi,

I use vs2005 and ssrs 2005.
I have an assembly like

namespace PackageCode

{


public static class Class1

{

public static string GetRequired(bool Split, string Id_StockItem, string InventoryUpdateQuery, string TotalRequired)

{


string outText = "";

return "Test"

...........

I did the
reportViewer.LocalReport.AddTrustedCodeModuleInCurrentAppDomain
(€?PackageCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6d1c15bd232054a1€?);
part in my code.

I also added the
[assembly: System.Security.AllowPartiallyTrustedCallers]
too.

I published the assembly to GAC.

I added the dll as reference in rdlc file.
And I get this error when I try to enter this code under a textbox


=PackageCode.Class1.GetRequired(CBOOL(Fields!Split.Value),CSTR(Fields!StockItem),.....)

GetRequired is underlined with a red error line which says "unrecognized identifer" when I mouseover onto it.
And when I run the report I get #Error in that textbox.

I dont have a reporting server.I get the data from a dataset.
What to do now ?
Thanks for help.




View 4 Replies View Related

Returning A Dataset From Custom Assembly?

Jan 10, 2007

Is it possible to have a Reporting Services dataset be returned from a custom assembly? I need to produce data for a graph that is not easily queried from the database and I am already familiar with using a custom assembly in an RS report.

What I would like to do is have a method that fills a dataset and returns it to the report for processing. Is this possible?

I am running SQL 2000 and RS 2000.

Thanks.

View 4 Replies View Related

Include Custom Code Assembly

Sep 20, 2007



OK. I created a few functions in a Public Class called SSRSFunctions. I built it and deployed it to my desktop. What do I do now? Can it be included as standard functions in the function list within SSRS? Do I add a reference to the Class at the solution level? At the report level? If all I do is add a reference at the report level, I may as well add the functions to each report's code window, which is what I have been doing. I'd at least like to add a single reference to my solution if I can't get it added to the function list.

Thanks!

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved