Could not load file or assembly in reporting services - reporting-services

I've created one project for report localization, which consists one class file and three .resx files. In class file, I wrote code which find appropriate .resx file, depending on culture, and read value for given key.
After that, i build up project, copy the .dll into "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" and change RSPreviewPolicy.config, where I've added one new PermissionSet for Report localization and one CodeGroup tag giving Permission to .dll.
Next step I did was creating report, referencing .dll and write one expression to test localization.
I got following error:
"Failed to load expression host assembly. Details: Could not load file or assembly
I'm obviously missing something, but I can't figure out what?
Does somebody has idea of what to do?

I've found the answer. Problem were permissions for viewing report in Visual Studio Preview mode.
First of all, I was putting dll (with localization class) into next location:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies.
After that, I needed to change RSPreviewPolicy.config file, that exists in same folder location, to apply some security permissions.
In question, I mentioned that I've added one PermisionSet, but now I am sure there is no need for that.
I've just changed two CodeGroup section, which have Execution permission level, to have FullTrust permission level, like this:
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Report_Expressions_Default_Permissions"
Description="This code group grants default permissions for code in report expressions and Code element. ">
.
.
.
</CodeGroup>
<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="FullTrust"
Description="This code group grants MyComputer code Execution permission. ">
.
.
.
</CodeGroup>
Regarding your version of Visual Studio, you must choose appropriate folder path:
for VS 2015 --- C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\PrivateAssemblies
for VS 2013 --- C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\PrivateAssemblies
for VS 2010 --- C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies

Related

SSRS 2017 Error loading QRCoder Version 1.3.6.0

I'm trying to show a QRCODE into SSRS, I tested it using QRCoder assembly, It works pretty well on SSRS 2008R2 (QRCoder for .net 3.5), but when I try same at SSRS 2017 it shows an error
Error loading code module: 'QRCoder, Version 1.3.6.0,....
I tried with different QRCoder.dll versions:
net35
net40
netstandard2.0
But no one work with it:
I copied QRCoder.dll to this locations for SSRS2017
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies
C:\Program Files\Microsoft SQL Server\MSSQL14.MyInstance\R_SERVICES\bin
Questions:
What version of QRCoder.dll must use ?
What is the right path to paste QRCoder.dll into my server ?
Well, my problem is not CRCoder.dll my problem is the SSRS 2017 bin folder location, looking a little deep into my task manager, and followed the "Reporting services" file location
And found the right location where must put QRCoder.dll
Then for SSRS 2017 bin folder location must look like this
C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer\bin
If U need some help about the full process to show QRCode into SSRS report U can follow this link. (Just a little spanish)
Print QrCode into SSRS Report ( Spanish :)

Deploy and Run SSIS package on server using batch file

I have created SSIS package on my local machine using Visual Studio 2012 and SQL Server 2012 and it is working properly. Now I want to deploy it on Server and Run the package using a batch file on the server
So can you please provide steps on how to deploy and then Run it using a batch file on a server
you can create a batch file using the dtexec.exe command line tool.
Eg create a text file:
<dir of dtexec>/dtexec /F<dir of Package>/package.dtsx
Save as a Batch (.BAT) file.
Edit below command to update package path and package name. Copy the modified code to notepad and save as .bat file and your batch file is ready.
"C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe" /File "PackagePath\PackageName.dtsx"
my problem has been solved...
the actual problem of getting this Error: 2018-08-30 07:37:43.57 Code: 0x00000001 Source: Script Task Description: Exception has been thrown by the target of an invocation. End Error was on server Renci.SshNet is not working..
On SQL Server 2017 you can go to:
"C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\DTExecUI.exe"
And then run this. If you saved the file locally, then choose file system and then wherever the .dtsx file is saved(or you can simply go to the .dtsx file and double click on it)
If you saved it on the server, type in the server name and type of authentication with the user name/password if needed and then browse for the package and select it.
Then click the "Execute" Button. Done.
Check to see if there is a UI version of the DTExec on 2012.

SSIS file path changing to C:\windows\system32 depending on how I open the project file

I've been working with SSIS reading different files - from CSVs to XLSXs - with no problems. My paths are relative, so SSIS searches for the files from the project's folder.
Well, today my colleague tried to run a package and he got a curious error message saying that the file could not be found under the "C:\windows\system32" folder. There's no configuration that would point SSIS to that folder and with me and a third colleague it's working well.
After some investigation we discovered that the problem has nothing to do with the user itself, but with how the user opens the project. Since the beginning I've been opening the project by double clicking the ".dtproj" file. My colleague first opens the SSIS development interface then opens the project file from the menu.
Has anyone noticed that behavior? What could be the cause for that?
error message print
Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: IDE Standard
This happens because the different ways of launching the IDE end up with different current directories for the IDE process. You can test this by creating a package with only a Script Task, with the one line:
MessageBox.Show(Environment.CurrentDirectory);
And then running this project after launching it both ways.
Double-clicking the project or solution file sets the folder containing that file as the current directory. (I assume this is standard Windows process launching behaviour when starting a process based on the file extension association.) SSIS packages then look in the current directory when the path to the configuration file is relative.
We use relative paths to configuration files all the time to simplify deployment, and have to always remember to open the solutions by double-clicking the SLN file.

winbase.inl missing in Windows Phone Kits

I have some native static library(say MyLib), wich includes windows.h, and I'm trying to reuse it in my WP8 app:
I've copied lib's project file,
renamed it (MyLibWP),
changed platform toolset to Windows Phone 8
tried to build it.
After which I'm getting the following error:
C:\Program Files (x86)\Windows Phone Kits\8.0\Include\winbase.h(10170): fatal error C1083: Cannot open include file: 'winbase.inl': No such file or directory
Kinda weird. Checked the specified folder - it does tell the truth, file is missing.
So, what is wrong with all this stuff?
Edit: tried to copy missing file to \Windows Phone Kits\8.0\Include\ manually, but that doesn't help.
I would reinstall the SDK, I have winbase.h on my machine, at C:\Program Files (x86)\Windows Phone Kits\8.0\Include

Report View - Could not load file or assembly

I use VS2008 to develop a web application.
When I open a local report, it's report datasource does not show.
I click the report->DataSource to see it's datasource, but it appear an
error message:
Could not load file or assembly ###
But the file or assembly does exist.
How can I solve this problem?
I searched everywhere and didnt found a solution for this.
Thanks.
Copy the assembly to the folder
C:\Program Files\Microsoft Visual Studio 9.0\ReportViewer.
I use SysInternals Process Monitor to find where VS was looking for the containing file.
The assembly may exist but in a place not seen by the app. Use filemon / procmon to find out where your app is trying to load the assembly from and you will have a clue of what's going on. Also make sure the assembly version matches as well.