Log errors for 2sxc in DNN - dotnetnuke

Recently I have installed last version of DNN (9.10.2) and last LTS version of 2sxc (12.8.1)
Everything is working as expected but after check DNN logs I found this error
DotNetNuke.Web.Mvc.Extensions.StartupExtensions - Unable to configure services for ToSic.Sxc, Version=12.8.1.26412, Culture=neutral, PublicKeyToken=null, see exception for details
- LoaderException: Could not load file or assembly 'Microsoft.AspNetCore.Http.Features, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at DotNetNuke.DependencyInjection.Extensions.TypeExtensions.SafeGetTypes(Assembly assembly, ILog logger)
As I said 2sxc is working without any problem but is generating in back those logs.
Maybe is needed to add or install some framework or component in server ?
ANY idea

Related

Microsoft.Bcl.AsyncInterfaces error (in CSVHelper method) when running the application installed by Visual Studio Setup project

I have a WPF application that reads a CSV file using CSVHelper which I installed using NuGet. Here's the project, system, etc version info.
Microsoft Windows 7 Professional Version 6.1.7601 Service Pack 1 Build
7601
Microsoft Visual Studio Community 2019 Version 16.4.5
NuGet Package Manager 5.4.0
WPF Project Target Framework: .NET Framework 4.7.2
CSVHelper Version: 15.0.5
CSV reader method is straightforward; read a file and put it in a list. Nothing fancy. I'll link the entire project at the bottom so you can download and try it out if you want.
When I run the executable made in either Release or Debug builds, they work fine. They read the file, put contents in a list, and display on a DataGrid just fine. As a next step, I created a standard Visual Studio Setup project, and created an msi installer, which I used to install the app in my PC.
When I run that executable (which is in my Program Files directory), however, the application throws an exception. Here's the exception message and Stack Trace.
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)
at ReadCSVTest.MainWindow.ReadPeopleList(String path, List`1& people, String& msg)
at ReadCSVTest.MainWindow..ctor()
Since the error says couldn't load the assembly Microsoft.Bcl.AsyncInterfaces, I added that from NuGet and ran everything again, and I still get the error. What's the problem here? What does it mean that Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context.? And why do I only get this exception when I run the executable installed by the Setup project?
Please download the entire project from HERE.
Just so anyone runs into the same issue in the future; as Jones suggested in the comments, downgrading each of the two libraries to following versions fixed the issue for me.
CsvHelper ==> 12.3.2
And
Microsoft.Bcl.AsyncInterfaces ==> 1.0.0

How to Resolve DNN Error Occurred When Request AddModule

I've developed a custom DNN module using the DNN web forms template found at christoc.com. The solution builds without error and the resulting install package installs without issue in my DNN 9.2 instance.
When I attempt to add the custom module to a page, I receive the above error. Chrome developer tools shows further information as follows:
POST http://localhost:81/API/internalservices/controlbar/AddModule 500
(Internal Server Error)
send # jquery.js?cdv=150:9566
ajax # jquery.js?cdv=150:9173
jQuery.ajax # jquery-migrate.js?cdv=150:191
request # ModuleService.js?cdv=150:30
addModule # ModuleDialog.js?cdv=150:214
_doAddModule # ModuleDialog.js?cdv=150:794
proxy # jquery.js?cdv=150:496
dispatch # jquery.js?cdv=150:5206
elemData.handle # jquery.js?cdv=150:5014
The standard DNN modules like HTML install onto the same page without issue. I just applied the 9.2 most recent upgrade package to the instance which is running the generic DNN skin.
It seems that there's an issue with JQuery but I'm unsure where the issue resides and how to remedy it. Any help and guidance would be much appreciated.
UPDATE:
I wanted to share a segment of the DNN Manifest file as this may be the root cause, but am unsure. Sample is as follows:
<moduleControl>
<controlKey>Product AccountLink</controlKey>
<controlSrc>DesktopModules/MyModuleName/P_View_AccountLink.ascx</controlSrc>
<supportsPartialRendering>False</supportsPartialRendering>
<controlTitle>AccountLink Content</controlTitle>
<controlType>View</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
<supportsPopUps>True</supportsPopUps>
</moduleControl>
UPDATE 2: I've learned that the View that's intended to be the first to be seen when the module is viewed on a page must have controlKey set to nothing in the DNN Manifest. After doing this, removing the module, reinstalling it, and attempting to place on the page, the following error was thrown:
AbsoluteURL:/Default.aspx
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:5386839d-258e-4214-ae27-fb0bbae8837a
AssemblyVersion:
PortalId:-1
UserId:-1
TabId:-1
RawUrl:
Referrer:
UserAgent:
ExceptionHash:rtw8cf/KL7W//vxFceePqix1IGE=
Message:Value cannot be null. Parameter name: type
StackTrace:
at System.Activator.CreateInstance(Type type, Boolean nonPublic) at
System.Activator.CreateInstance(Type type) at
DotNetNuke.UI.Skins.Pane.IsVesionableModule(ModuleInfo moduleInfo) at
DotNetNuke.UI.Skins.Pane.InjectModule(ModuleInfo module) at
DotNetNuke.UI.Skins.Skin.InjectModule(Pane pane, ModuleInfo module)
InnerMessage:
InnerStackTrace:
Source:mscorlib
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:
So at this point, the module still does not add properly to the page. I noted the following entry in the SQL Server DNN EventLog table:
<LogProperties>
<LogProperty>
<PropertyName>AbsoluteURL</PropertyName>
<PropertyValue>/Default.aspx</PropertyValue>
</LogProperty>
<LogProperty>
<PropertyName>DefaultDataProvider</PropertyName>
<PropertyValue>DotNetNuke.Data.SqlDataProvider,
DotNetNuke</PropertyValue>
</LogProperty>
<LogProperty>
<PropertyName>ExceptionGUID</PropertyName>
<PropertyValue>5386839d-258e-4214-ae27-fb0bbae8837a</PropertyValue>
</LogProperty>
</LogProperties>
I't been a while, but I believe I got a similar error with one of my modules once.
It could be added to a page on older installations without problems, and installing in DNN 9 was also fine. But adding it to a page in DNN 9 would not work.
The problem was a mismatch between what was listed in the .DNN file and the actual contents of the install package.
I think it was a moduleControls node in moduleDefinitions that did not exist anymore, or it was the other way around.
Anyway match all items in the DNN file with actual files and remove/add defenitions and reinstall the package.

VS2017 15.4 Preview "Windows Application Packaging Project" tool failed to generate a working app

I added the new "Windows Application Packaging Project" that comes with vs2017 15.4 preview.
When adding my project to the "Applications" and debugging the packaging project I have the following error:
System.IO.FileNotFoundException: 'Could not load file or assembly
'System.Runtime, Version=4.1.2.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.'
InnerException: FileNotFoundException: Could not load file or assembly
'System.Runtime, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.
My project is running perfectly if I debug it directly or run it directly using the EXE.
If I extract the files from the .appxbundle and try to start the EXE, it doesn't work either. (XXXXXX.appxbundle\XXXXXX.appx\*.*)
I noticed that in the extracted .appxbundle folder, all System.XXX DLLs are not there. They should be (94 dlls are missing).
Is there a problem with the packaging tool ?
UPDATE:
Link to dev portal: https://developercommunity.visualstudio.com/content/problem/122252/windows-application-packaging-project-tool-failed.html
This is very likely a bug in the way the packaging project is collecting files. Looks like we're already tracking this bug in the Developer Community. Also, we're tracking another related issue for ClickOnce.

Could not load file or assembly Microsoft.SqlServer.TransactSql

Database project build failed. Error Details:
Error: MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.TransactSql, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The
system cannot find the file specified.
File name: 'Microsoft.SqlServer.TransactSql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
I also go through this answer on stackoverflow link. Also Download SQL Server Data Tools 12.0.41012.0, but still facing this error. Need assistance to build database so that I may publish my Database on Azure.
Regards.
Uncheck "Enable extended...". It will be removed in next version of VS. (Click on link 'More Information' next to it.)
This happened to me also and just fixed. I update ssdt from the link i get from Visual studio notification center and restart VS as administrator then it works fine.
-Janak

Server Error in '/' Application. Windows Serrver 2012 IIS 8

I received a webpage from a developer and when I try to install it on my fresh installation of Windows Server 2012 with IIS 8 I get the following error:
Could not load file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I tried to download Windows SDK on my laptop and then copy the gacutil.exe onto the server and run:
C:\tmp>gacutil.exe /I C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages.Razor.dll
But I still get the same error. Anyone familiar with this?
I am no .NET-developer what so ever. I have no idea what to do. Do I need to install something else on my Windows Server?
You are missing the System.Web.WebPges.Razor file from the bin directory of the web application. Unless that version is installed in the GAC, try putting a copy of it in the bin directory so the application can access it.

Resources