I have an DNN site where i get this error alot (and i mean alot) and i cant find the source to the problem!
Is there anyone who has an idea of where to start looking or how to debug this?
I cant find the fault its impossible.. :(
DNN PLATFORM
v. 09.01.01 (129)
4.6 .NET FRAMEWORK
General Exception
Site name
AbsoluteURL /Default.aspx DefaultDataProvider DotNetNuke.Data.SqlDataProvider
AbsoluteURL:/Default.aspx
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:d1a7b7bf-b7fa-4b86-ab6d-a3efabebf994
AssemblyVersion:
PortalId:-1
UserId:-1
TabId:-1
RawUrl:
Referrer:
UserAgent:
ExceptionHash:jn6m7y6lLHEjghJrIXICAWzADhA=
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:
Server Name:SERVERNAME
The root cause of this issue is because "PortalAliasId" column in "TabUrls" table consists of value "1", by default this should be NULL instead.
https://dnnsupport.dnnsoftware.com/hc/en-us/articles/360021667014-Accessing-the-page-settings-fails-to-retrieve-content
Related
We're trying our first use of Hangfire (v1.7.19) in an ASP.NET Core WebApi application (.NET 5). Previously they've all been old school ASP.NET, and have worked without issue.
Hangfire packages used (per the Hangfire documentation) are Hangfire.Core, Hangfire.SqlServer and Hangfire.AspNetCore. We've also tried to just use the combined Hangfire package, but are having the same results.
Lifting directly from the code on that documentation page, in ConfigureServices we add
services.AddHangfire(configuration => configuration
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
.UseSimpleAssemblyNameTypeSerializer()
.UseRecommendedSerializerSettings()
.UseSqlServerStorage(connectionString), new SqlServerStorageOptions
{
CommandBatchMaxTimeout = TimeSpan.FromMinutes(5),
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
QueuePollInterval = TimeSpan.Zero,
UseRecommendedIsolationLevel = true,
DisableGlobalLocks = true
}));
which, at runtime, gives
System.ArgumentException
HResult=0x80070057
Message=Keyword not supported: 'authentication'.
Source=System.Data.SqlClient
StackTrace:
at System.Data.Common.DbConnectionOptions.ParseInternal(Dictionary`2 parsetable, String connectionString, Boolean buildChain, Dictionary`2 synonyms)
at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Dictionary`2 synonyms)
at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at Hangfire.SqlServer.SqlServerStorage.<.ctor>b__6_0()
at Hangfire.SqlServer.SqlServerStorage.CreateAndOpenConnection()
at Hangfire.SqlServer.SqlServerStorage.UseConnection[T](DbConnection dedicatedConnection, Func`2 func)
at Hangfire.SqlServer.SqlServerStorage.UseConnection(DbConnection dedicatedConnection, Action`1 action)
at Hangfire.SqlServer.SqlServerStorage.Initialize()
at Hangfire.SqlServer.SqlServerStorage..ctor(String nameOrConnectionString, SqlServerStorageOptions options)
at Hangfire.SqlServer.SqlServerStorage..ctor(String nameOrConnectionString)
at Hangfire.SqlServerStorageExtensions.UseSqlServerStorage(IGlobalConfiguration configuration, String nameOrConnectionString)
The value of connectionString is
Initial Catalog=XXX;Data Source=YYY;Authentication=Active Directory Password;UID=ZZZ;PWD=PPP"
This works fine with local SqlServer and LocalDb, but not with AzureDB. The connection string is exactly the one we're also using for EntityFrameworkCore 5 (in fact, the value is assigned from context.Database.GetConnectionString()).
I've read where there were issues with AzureDB and .NET Core, but those were resolved quite some time ago. Looking through the Hangfire.SqlServer package dependencies, I see where it uses System.Data.SqlClient, and current documentation for AzureDB use all refer to Microsoft.Data.SqlClient, which makes me think that the enhancements to support Active Directory Password authentication weren't made in System.Data.SqlClient but only in the newer Microsoft.Data.SqlClient package. If that's the case, I can put in a request that Hangfire replace its SqlClient package, but want to get confirmation before I do that.
Any ideas if this is indeed the case? Is there something we can do in the meantime to fix this instead?
Thanks in advance.
Hangfire IO GitHub Issue 1827
Pointers from Sergey Odinokov
As early as 1.7.8 there has been support to use an overload of UseSqlServerStorage that accepts a Func<DbConnection> instead of a connection string where you can use a connection factory to provide the newer Microsoft.Data.SqlClient.SqlConnection which supports the Authentication keyword.
Here is the related source code
You can use this like
services.AddHangfire(config => config
// other options you listed above removed for brevity
.UseSqlServerStorage(
() => new Microsoft.Data.SqlClient.SqlConnection(<connection_string>)
, new SqlServerStorageOptions() {...}
)
);
We have tried to upgrade dnn site from v7.3.2 to v8.0.3 but the upgrade was failed and while rolling back the changes the DDRmenu disappeared and the logger shows. The specified dll is present in the bin folder. Can anyone help us?
[ERROR] DotNetNuke.Services.Exceptions.Exceptions -
System.NullReferenceException: Object reference not set to an instance
of an object. at DotNetNuke.Web.Razor.RazorEngine.Render[T](TextWriter
writer, T model) [ERROR] DotNetNuke.Services.Exceptions.Exceptions -
System.InvalidOperationException: Could not locate Razor Host Factory
type: System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc at
System.Web.WebPages.Razor.WebRazorHostFactory.CreateFactory(String
typeName) at
System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey
key, Func2 valueFactory) at
System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfigCore(RazorWebSectionGroup
config, String virtualPath, String physicalPath) at
System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(String
virtualPath, String physicalPath)
How did you roll back? You should have reverted to the old version of the database and the old files. Did you delete all of the files before restoring?
I'm Using Visual Studio Ultimate 2012 and .net framwork 4.5.1
when i Publish my solution and install on client PC its showing me Error for Microsoft.SqlServer.SqlClrProvider missing... I also Included the Microsoft.SqlServer.SqlClrProvider in Published Files.
And if i'm installing in my own pc its Showing me error "Application cannot be Started. Contact the Application Vendor" Here is the Details of the Error.
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.6.1087.0 built by: NETFXREL4STAGE
clr.dll : 4.6.1087.0 built by: NETFXREL4STAGE
dfdll.dll : 4.6.1087.0 built by: NETFXREL4STAGE
dfshim.dll : 4.0.41209.0 (Main.041209-0000)
SOURCES
Deployment url : file:///D:/Publish/test/Inventory.application
IDENTITIES
Deployment Identity : Inventory.application, Version=0.9.0.88, Culture=neutral, PublicKeyToken=953af74a0fd8ab19, processorArchitecture=x86
APPLICATION SUMMARY
* Installable application.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of D:\Publish\test\Inventory.application resulted in exception. Following failure messages were detected:
+ Value does not fall within the expected range.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [13-03-17 1:01:10 PM] : Activation of D:\Publish\test\Inventory.application has started.
* [13-03-17 1:01:11 PM] : Processing of deployment manifest has successfully completed.
ERROR DETAILS
Following errors were detected during this operation.
* [13-03-17 1:01:11 PM] System.ArgumentException
- Value does not fall within the expected range.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
* Transaction at [13-03-17 1:01:11 PM]
+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
- Status: Set
- HRESULT: 0x0
+ System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
- HRESULT: 0x0
And Sorry For My English
I am developing a web application that is using Entity Freamwork 5 Visual Studio 2012 and it need to support both SQL Server and Oracle database providers. I created entity model for Oracle Database. I thought it would work after some changes in connectionstrings, bu no it is not that easy .. I found this post:
http://www.codeproject.com/Articles/82017/Preparing-an-Entity-Framework-model-for-multi-prov
Now I am getting following error
Schema specified is not valid. Errors: my_s_entity.ssdl(2,12) :
warning 0005: Could not find schema information for the attribute
'Version'. my_s_entity.ssdl(2,2) : error 0010: The element Edmx in
namespace http://schemas.microsoft.com/ado/2009/11/edmx was unexpected
for the root element. The expected Schema in one of the following
namespaces: http://schemas.microsoft.com/ado/2006/04/edm/ssdl,
http://schemas.microsoft.com/ado/2009/02/edm/ssdl,
http://schemas.microsoft.com/ado/2009/11/edm/ssdl.
Stack trace:
[MetadataException: Schema specified is not valid. Errors:
my_s_entity.ssdl(2,12) : warning 0005: Could not find schema information for the attribute 'Version'.
my_s_entity.ssdl(2,2) : error 0010: The element Edmx in namespace http://schemas.microsoft.com/ado/2009/11/edmx was unexpected for the root element. The expected Schema in one of the following namespaces: http://schemas.microsoft.com/ado/2006/04/edm/ssdl, http://schemas.microsoft.com/ado/2009/02/edm/ssdl, http://schemas.microsoft.com/ado/2009/11/edm/ssdl.]
System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +965
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
System.Web.UI.Control.EnsureChildControls() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
I have searched on web but not able to find any solution. Why I am getting this issue? If anyone have every faced same and have any solution please share.
Add a project reference to EntityFramework.SqlServer.dll
I had this error, This solution works for me
public MyContext : DbContext
{
public MyContext() : base("name=MyContext")
{
// the terrible hack
var ensureDLLIsCopied =
System.Data.Entity.SqlServer.SqlProviderServices.Instance;
}
If you open Your edmx file in the xml editor it should look like this:
<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
<edmx:Runtime>
<edmx:StorageModels>
<Schema Namespace="XXX.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
There is a relationship between the xmlns namespace and the Version of EF you are using. There is some mismatch in the EF Version you created the model With and where you are trying to use it.
I have 4 environments:
Win 7 64 bit
Win 2003 32 bit
Win XP SP3 32 bit
Win 2003 64 bit
In the first 2, my app loads and runs successfully. In the latter 2, I get the following error (shortened):
System.Windows.Markup.XamlParseException: The method or operation is not implemented.
---> System.NotImplementedException: The method or operation is not implemented.
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
...
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
--- End of inner exception stack trace ---
...
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at DBSophic.Qure.WorkloadAnalyzer.UI.App.InitializeComponent()
in e:\Qure\Dev\BuildSystem\Sources\Trunk\DBSophic.Qure.WorkloadAnalyzer.UI\App.xaml:line 1
at DBSophic.Qure.WorkloadAnalyzer.UI.AppMain.Main()
in e:\Qure\Dev\BuildSystem\Sources\Trunk\DBSophic.Qure.WorkloadAnalyzer.UI\AppMain.cs:line 21
What might cause it?
The missing DLL will be one referenced by a namespace in your XAML.
Try loading your application in Dependency Walker to see if all dependent modules exist on each computer. As a guess I'd question if DBSophic is installed with the correct version (or at all), and of course that the latest .NET 4 framework is installed.
It was a missing dll.