DotNetNuke DNN An Error Has Occurred When Attempting To Save The File Forum Mdoule

When trying to add a file attachment to the DotNetNuke forum module, we received an error that looked like this.

An Error Has Occurred When Attempting To Save The File C:\webroot\site\site.com\wwwroot\Portals\0\Forums\Attachments\imge.jpg. Please Contact Your Hosting Provider To Ensure The Appropriate Security Settings Have Been Enabled On The Server.

We stuffed around for a longer than normal time looking to fix this. We played with permissions on the website host server and folders, as in most of the forum posts about this error we found, they were all blindly looking at that as the problem.

Solution

Check the folder exists – Look in the folder structure to see if the /Forums/Attachments/ folder is actually there.

Create it if is is not – In the website File Manager (ie under the Admin / File Manager DNN menu, create the Attachments folder. ensuring that you set permissions in that file manager to allow all registered users to upload.

Remove then recreate file upload permissions – In the forum administrator area, under the file Attachment Manager, uncheck, then update, then recheck and update the “Enable File Attachment” option.

image

Aldo remember to check the the Attachments Path is the one you created earlier.

For us, that did the trick.

HTML Module requires updating. Install "HTML 040802k PA.zip

Problem

You are running the InteractiveWebs DNN word editor on a website. You upgrade your DNN site (usually past an early DNN 5 release) to a later DNN 5 release.

After updating your DNN website, the word editor fails to publish and reports:

  • HTML Module requires updating. Install ‘HTML 040802k PA.zip’ or higher to your website to re-enable word editing’.

If you browse to:  www.yourwebsite.com//desktopmodules/html/publishtoweb.asmx

You will see:

The type ‘PublishToWeb’ is ambiguous: it could come from assembly ‘C:\Inetpub\vhosts\yourwebsite.com\httpdocs\bin\App_SubCode_HTMLService.DLL’ or from assembly ‘C:\Inetpub\vhosts\yourwebsite.com\httpdocs\bin\DotNetNuke.Modules.Html.DLL’. Please specify the assembly explicitly in the type name.

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.Web.HttpException: The type ‘PublishToWeb’ is ambiguous: it could come from assembly ‘C:\Inetpub\vhosts\arctic-it.com\httpdocs\bin\App_SubCode_HTMLService.DLL’ or from assembly ‘C:\Inetpub\vhosts\arctic-it.com\httpdocs\bin\DotNetNuke.Modules.Html.DLL’. Please specify the assembly explicitly in the type name.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The type 'PublishToWeb' is ambiguous: it could come from assembly 'C:\Inetpub\vhosts\yourwebsite.com\httpdocs\bin\App_SubCode_HTMLService.DLL' or from assembly 'C:\Inetpub\vhosts\yourwebsite.com\httpdocs\bin\DotNetNuke.Modules.Html.DLL'. Please specify the assembly explicitly in the type name.]

   System.Web.UI.Util.GetTypeFromAssemblies(ICollection assemblies, String typeName, Boolean ignoreCase) +325

System.Web.UI.SimpleWebHandlerParser.GetType(String typeName) +126

System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(Assembly builtAssembly) +65

   System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults results) +51

   System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results) +45

   System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results) +13

   System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +8732935

   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261

   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101

   System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +83

   System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath) +10

   System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context) +43

   System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +180

   System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +47

   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +193

   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Solution

The solution is simple.

In the \bin directory on your DNN website is a file called: App_SubCode_HTMLService.dll

After backing up this file (just to be safe), then delete the file App_SubCode_HTMLService.dll from the website. This should fix the issue.

Digg This

DotNetNuke Performance Settings

Much has been written about the DotNetNuke performance settings, and well frankly the is a lot of bad information running around the web about what all the settings mean and do.

I’m not about to jump into a discussion, but rather tell you what we believe are the best settings for a public facing website hosted from a Windows 2008 servers without a proxy.

First of all you will need to determine if the web server IIS settings have been configured to compress data servers from your site. This is easy.

1. Login as host and look in the Performance Settings for the “Compression Setting” and ensure it is turned off.

image

2. Then visit this site: http://www.seoconsultants.com/tools/compression 

Enter your URL of the website you are playing with, and check compression. The result will look like this, if your content is uncompressed.

image

or this if it is compressed.

image

Take not of this for later.

3. Go back to your site settings and set them to look like this:

image DNN 4x

image DNN 5x

4. Depending on your compression test above set your site compression settings.

If you site reported: Uncompressed
image

If your site reported: Compressed (anyting)

image

The idea is that, if your IIS is already compressing content, you do not want your DNN compression settings on. It will only slow down performance, however if your IIS is not handling compression, you will find that performance is much improved with compression on.

Summary

These settings will give you good speed performance, but more importantly will not cause cache problems where users updated content but cannot see the changes that they have made. This is a big issued with CMS system that cache in the wrong way, and is a complaint of many DNN users.

Digg This

Site Settings is currently unavailable – Language Not Available

There are a few people around the net with this problem.

Site Settings
Error     Error: Site Settings is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Cannot insert the value NULL into column ‘DefaultLanguage’, table ‘tendollar.dbo.tdb_Portals’; column does not allow nulls. UPDATE fails. The statement has been terminated. —> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column ‘DefaultLanguage’, table ‘tendollar.dbo.tdb_Portals’; column does not allow nulls. UPDATE fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at

DotNetNuke Product:          DotNetNuke Community Edition

The DotNetNuke version you are running     05.01.02 (51)

We have posted a solution on our DotNetNuke Knowledge Base website. Search on “Site Settings is currently unavailable”

DotNetNuke DNN Exception Details: System.Web.HttpException: Server cannot modify cookies after HTTP headers have been sent.

We had a client with this error in their DotNetNuke Website:

Server Error in ‘/’ Application.
——————————————————————————–

Server cannot modify cookies after HTTP headers have been sent.
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.Web.HttpException: Server cannot modify cookies after HTTP headers have been sent.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:
[HttpException (0x80004005): Server cannot modify cookies after HTTP headers have been sent.]
   System.Web.HttpResponse.BeforeCookieCollectionChange() +8710212
   System.Web.HttpCookieCollection.Add(HttpCookie cookie) +24
   System.Web.Security.AnonymousIdentificationModule.OnEnter(Object source, EventArgs eventArgs) +1792
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

For DNN the problem turned out to be in the Event Log Purge Schedule.

Under Host Settings, login and locate the history of the scheduled item. Check to see if the history shows a fail and shows this errir.

DotNetNuke.Services.Log.EventLog.PurgeLogBuffer, DOTNETNUKE
EXCEPTION: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: Index at Microsoft.VisualBasic.Collection.FastList.get_Item(Int32 Index) at Microsoft.VisualBasic.Collection.get_Item(Int32 Index) at DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.PurgeLogBuffer() at DotNetNuke.Services.Log.EventLog.PurgeLogBuffer.DoWork()

. If it does then apply this.

Turn off this item but untickign the Yes option.

Then go to the HOST / Settings Page and restart the application.

Return to the schedule and re-enable the purge log buffer with it set to perform every 3 min. Check that the schedule process finishes.

DotNetNuke.Services.Exceptions.PageLoadException: Value cannot be null.

We experienced some problems with a DotNetNuke Site to do with the Page Load Exception.

Message: DotNetNuke.Services.Exceptions.PageLoadException: Value cannot be null. Parameter name: String —> System.ArgumentNullException: Value cannot be null. Parameter name: String at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Web.Configuration.HttpCapabilitiesBase.get_MajorVersion() at DotNetNuke.UI.Utilities.ClientAPI.BrowserSupportsFunctionality(ClientFunctionality eFunctionality) at Dnnskin.Net.SkinObjects.V2.HorizontalTheme.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) — End of inner exception stack trace —
and

Message: DotNetNuke.Services.Exceptions.PageLoadException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index —> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at DotNetNuke.Modules.Forum.Posts.RenderThread(HtmlTextWriter wr) at DotNetNuke.Modules.Forum.Posts.Render(HtmlTextWriter wr) at DotNetNuke.Modules.Forum.ForumBaseControl.Render(HtmlTextWriter wr) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at ASP.desktopmodules_forum_forum_container_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at DotNetNuke.Entities.Modules.PortalModuleBase.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at ASP.portals__default_skins_vista_black_grayback_mediumwidth_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at ASP.default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at DotNetNuke.Framework.PageBase.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) — End of inner exception stack trace —

Basically all these errors are assoicated with page load exceptions.

The root cause of these errors, and there were many happening with the site, was to do with the host settings / performance settings.

The Page State Persistence had been set to Memory. This is a bad idea in DNN website. We changed the setting back to “Page” and actually rebooted the server. This ensured things were all tidy and working again.