renderer.RenderHtml vs. ConfigurationManager - highcharts

I created a user control identical to the "installation example" provided in the online example; however, as I attempt to run it, it gave me
Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified
error on line
Response.Write(renderer.RenderHtml());
I do not know how to remedy this issue. can you provide me with fixes on this issue?

Related

Error generating QR code in ASP.net + Report viewer with QrCoder

I am trying to generate a report with Qr codes I am using this video as a guide
https://www.youtube.com/watch?v=BW99WK6SQKI
I did tests before and it worked and then it stopped working and it just shows me that error nothing more.
I am working with ASP.net MVC + Report Viewer
I looked for the error in the forums and I can't find a solution...
Error while loading code module: ‘QRCoder, Version=1.3.6.0, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'QRCoder, Version=1.3.6.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. C:\DevOps\Project\Report\Qr.rdlc
IDE
IMAGEN PROPERTIES
**REPORT PROPERTIES
PublicKeyToken value should not be null. You need to get the PublicKeyToken from QrCoder dll and use it.
To find the Public key token.
Open visual studio developer command prompt.
Run sn -Tp <AssemblyName>
e.g. sn -Tp c:\libraries\QRCoder.dll
Use Public key value in PublicKeyToken=<Value>
I faced the same error, I cleaned the project inside the solution and build it as "Release" (Because the problem appeared in the production environment), found the problem fixed.

Visual Studio Warning Microsoft.AspNet.SignalR.Core Version 2.2.2.0 matches Version 2.2.3.0

When I compile my Asp.Net MVC project the following warning is displayed:
Warning CS1702
Assuming assembly reference 'Microsoft.AspNet.SignalR.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' matches 'Microsoft.AspNet.SignalR.Core, Version=2.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35', you may need to supply runtime policy.
I have no packages and no assemblys matching the version 2.2.2.0 in my solution.
This error only is displayed when I compile my views (adding the following option in my .csproj)
<MvcBuildViews>true</MvcBuildViews>
Have you tried cleaning your solution?
If you havn't, try that first by right clicking the solution and then click clean.
You can also try and delete your packages folder and then get a new one.
Sorry for making an answer but I can't make comments since my reputation is too low.

Could not load file or assembly 'Microsoft.WindowsAzure.Storage' or one of its dependencies

"Could not load file or assembly 'Microsoft.WindowsAzure.Storage' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"
Recently got this error when starting a debug of my ASP.NET MVC project.
Just out of the blue, haven't touched any of Azure files or configs, or added something since my last succesfull build.
Read this thread but it didn't provide the correct solution for my error:
Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics' or one of its dependencies
Not sure what kind of files I should display and what parts are imporant. Please someone help?
Try running Fusion Log (Assembly Binding Log Viewer) to determine which dependent assembly is missing (or if the application actually can't find the Microsoft.WindowsAzure.Storage for some reason).
Edit: quick tutorial from Hansleman that should get people on the right track: Back to Basics: Using Fusion Log Viewer to Debug Obscure Loader Errors

Using TFS Build Extensions 2010 Azure in TFS Build Process Templates

I'm attempting to use the community TFS Build Extensions Azure activities to deploy to Azure as part of a TFS Build.
I've added activities from TfsBuildExtensions.Activities.dll and TfsBuildExtensions.Activities.Azure.dll and I'm able to any activity from TfsBuildExtensions onto my build process and they work properly
The problems start when I drag an activity from TfsBuildExtensions-Azure. The activity's title in the Gui display remains blank except for the generic activity icon. The properties pane shows that the properties for this activity cannot be edited. Finally, upon saving this build process template, it fails with the following error:
System.IO.FileNotFoundException: Could not load file or assembly 'ServiceManagement, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'ServiceManagement, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
at System.Signature..ctor(IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
What am I doing wrong or what reference am I missing?
I downloaded the source of the project and found that there is a reference to a ServiceManagement.dll in the project file, and the dll can be found in their source control.
Downloading the dll from their source, and adding it to the project references has resolved the issue.
I found a reference on MSDN Blogs to a ServiceManagement.dll that revolves around deployment to azure, but it seems the original sources for the dll have disappeared.
Idea- confirm that you are using .NET 4.0 Framework target and not .NET 4.0 Client Profile. Sometimes the latter causes seemingly 'obvious' assemblies to fail to load because they have dependencies that are not in client profile.
Not a solution per se, but for another way of going about debugging, you might want to turn on fusion logging and use Fusion Log Viewer to view assembly binding errors. At least that will tell you where the runtime is looking for these assemblies that it isn't finding.
Here are some clear instructions from Scott Hanselman on how to do this:
http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx

MSTest code coverage

I have a test project for a web service and, when I run tests in debug mode, everything works ok. However, when I just run tests, I get following error, for a referenced assembly that I try to obtain code coverage:
Class Initialization method WebServiceTest.wstest.MyClassInitialize threw exception. System.IO.FileLoadException: System.IO.FileLoadException: Could not load file or assembly 'TestAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=57f286581e1d278a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A).
Everything I found said to register TestAssembly in GAC. Is this what should I do? Why is it working in debug mode?
Thank you
I had the same problem, and the link below helped me...
http://weblogs.asp.net/soever/archive/2005/07/23/420338.aspx
VS.NET 2005: Code coverage for signed assemblies
I am currently working on an application using VS.NET 2005, and because all the TDD tools like unit testing and code coverage are available I started to use them.
When I started code coverage on my signed application I got the following exception:
Test method X threw exception: System.IO.FileLoadException: Could not load file or assembly 'Y, Version=1.0.0.0, Culture=neutral, PublicKeyToken=Z' or one of its dependencies. HRESULT: 0x8013141A Strong name validation failed. ---> System.Security.SecurityException: Exception from HRESULT: 0x8013141A Strong name validation failed at X.
Not so strange if you think about it. Assembly is signed, code coverage needs code instrumentation, means modifications of the assembly, resulting in incorrect assembly so the validation failed.
Solution is to resign the assembly after instrumentation.
If you open the localtestrun.testrunconfig file (or something similar) in your solution items (double-click it), you can enable resigning in the Code Coverage section. This solves the problem.
It is also possible to simply disable all signed assembly checking on a particular machine by executing:
sn.exe -Vr *
Use with care, however, as this opens a security vulnerability. We use this on our internal virtual machine that measures coverage for us. Take a look at the usage for sn.exe as it is possible to narrow the scope of that command.
I am working with VS.Net Ultimate 2012
and this solution helped me:
Right click on Test Project-> properties-> Build Tab-> switch Generate serialization assembly to off-> done

Resources