I'm trying to create a copy of our live DNN (version 8.4.2) on my local as part of an upgrade project. I cannot get to the bottom of the following error. Can anyone throw some light on this?
2018-06-20 07:57:31,511 [IT-Dev01][Thread:7][FATAL] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication - System.NullReferenceException: Object reference not set to an instance of an object.
at DotNetNuke.HttpModules.OutputCaching.OutputCacheModule.OnResolveRequestCache(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
For what it's worth, I made changes to four of the DNN DB tables and I'm not 100% sure which particular change fixed this. The production URL was being used in these tables and I had to change it to dnndev.me:
HostSettings
PortalSettings
PortalAlias
WebServers
Hopefully this will be of help to anyone experiencing this error. I would also suggest use of the Event Viewer to assist because not all errors show up accurately in the DNN logs.
Related
We are seeing some strange errors on our asp.net webform sites. The sites are compiled successfully and deployed to our prod servers where they start and run without any problems.
Every morning at around 3AM we restart the application pool and here is where the mystery begins. Occassionally, let's say about one out of three times, after the restart we get the error below. The affected aspx page differs from time to time (the unaffacted aspx pages work just fine).
System.BadImageFormatException: [C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\f7681018\abf51a9e\App_Web_xegahzdu.dll] A valid typedef or typeref token is expected to follow a ELEMENT_TYPE_CLASS or ELEMENT_TYPE_VALUETYPE.
at ASP.startpagetemplate_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
We have four servers in a load balanced environment and the error appears on different servers and (as stated before) on different aspx pages. I have tried to read up on the exception, but the cases I read about differ from our case as they occur instantly. Our site builds and starts fine. The error appears after an application pool restart but, notably, not after every restart.
Would be grateful for any suggestions on what to look for.
I am looking for information on how to get a DotNetNuke RSS Feed Module to work.
I have tried both DotNetNuke Modules 4.0.1 and 4.2.1 and I get errors. I have tried different settings in the module but nothing works. When I take the link and post it in a browser (I've tried IE and Firefox) it works, so it shouldn't be a RSS problem.
I have tried several RSS feed URLs and get the same error. Thanks in advance for any help! I have looked at several websites regarding this issue but so far I have not found an answer.
Error Message
System.Web.HttpException: Could not load type 'DotNetNuke.Modules.XML.XmlController'.
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at DotNetNuke.Framework.Reflection.CreateType(String TypeName, String CacheKey, Boolean UseCache, Boolean IgnoreErrors)
Looking at the error message it looks like there is something missing from the install of the module. You will want to confirm that DotNetNuke.Modules.XML.dll exists within the /bin folder of your site.
I started to do some updates to a site this morning, and when I went to run it, I am getting random text instead of the site.
The site is setup on a local url, mysite.local, with an entry in hosts to map it to my PC.
I have tried a "clean and rebuild" in VS, IIS Reset, Recycling the app pool, re booting the PC, and even creating a new entry in IIS, but nothing solves it.
It only appears to be happening on aspx pages, as I can load .htm pages without error.
I need to get some updates done today, so any help would be fantastic!
Here is the text it's outputting
���`I�%&/m�{J�J��t��`$ؐ#�������iG#)�*��eVe]f#�흼��{����{����;�N'���?\fdl��J�ɞ!���?~|?"��Ey�')=��y6�����h���ly���,�&?�O�t�-���7������bU���'/���lR��_�|�fm�&_��W���fmQ-��Ǐ� 0z�^��jv����j�n�g���~��O��,[f��Wyq1o-�z���QS� �����iUV��I�M���ԃ�z�>�EV_���Z=J���������T���������f�����Z���gir�k�ܷ ��ZPWu������e� �tU� \g�a��_��y��� �J�����ߵ۳|Z��B��e��P�y��W�/�/��:l��uE})�'U�V�G����]�ݻU��e��F�v{^/gy]�{�#����.���u��su�S��]���U1�?��'賏��E�d�� B����w�^�5�;=������������������vwv~���ٮ��YS���������|�(}\|S�^a�{�c�� �Lϳi��G�u�����9!��Q�y��/�����u�l�_��2�Gi����.���&G�Ӽ���J8������2]/1#%�F�n��wi5�ɂ���u��H�yN��ӵ|{�pB�*��u���yӎӗe�59�}Y�Wܬi�_Ӷ������")���*�M�u+]��6��^ξ��K��-ۄ������[u�j�ܢ�?���eA��v����hp�t1�6��|x����ٚѯ�[���.i�����bU���f]���6����M���<|x�40b�gŲh��,ǹ���A���ClY�y��_2�����t���������$h�[��홈�zD�pM���ziI��f��r*��=|x��!��b�$\�����ҧ�c�(����w<[�y��JE�E���u^_o��v:A���l���M��X�����M�u���x���|2~�7�S�{�613C� L �h�C��Š�䧍��r�i4��)����� �����?�����;����-%q1�����buHF,I����:��j ��*g����#MW�m�̷�ݶ+��;yO��N60�Ì���C�:!����!�.�+����nF����j�.sR��&�e4�B�����踾h���F�>�{�-��W�.���ϲ�rk~�.��F���6�ʭ1��pUn�y�Q��yK�u}�����ug�V7:2���z��qanD��p`"�t�oΝ�Eg��f�<��8��>�P=�j
The latest thing I have tried is to bring down the code from svn into a brand new folder, create a new entry in IIS and point at this. I am still getting the same issue after this!!
Also, other sites running locally are not getting the error.
Looks like you have enabled gzip.
In your Application_Error make sure you remove the custom response filter:
protected void Application_Error(Object sender, EventArgs e)
{
HttpApplication app = sender as HttpApplication;
app.Response.Filter = null;
}
Rick Strahl described the problem in more details in his blog post.
Right, problem solved!
I turned out to be an issue with my session tables.
I followed the steps outlined in this post, and it solved my problem:
http://forums.asp.net/t/1313929.aspx/1
My Web Application builds and publishes successfully, the problem arises after copying the files to the web server, where I get a compilation error when I try to browse to several pages, other pages however continue to function correctly.
My first thought that was some of the files may not have been successfully copied so I republished and tested the page and all seemed well until I checked a different page that had been working with the previous publish that was now exhibiting the same problem subsequent publishing have seen similar effect with the pages affected altering each time.
The pages that are failing on the web server have previously been functional on the web server have not been altered for this publish and continue to work fine in Visual Studio 2010 Debug.
I have recycled the application pool restarted the website and rebooted the server.
The error from our error logs is:
GAE:: System.Web.HttpException (0x80004005): The file /XXXX.aspx has not been pre-compiled, and cannot be requested.
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
EDIT: I have copied the source aspx and cs files for one of the failing pages (renaming the class) and re published it the solution. The new page works side by side with its failing counterpart.
This error can be a red herring and usually masks the real error.
1st check permissions on the IIS app, physcial directory and the affected file are correct.
If it's not permissions, set custom errors to RemoteOnly on the webserver only and re-publish. In the .net 4, publish the app with the following options ticked, "allow pre compiled site to be updateable" and "use fixed naming conventions and single page assemblies"
When deployed to the webserver you should find the correct issue reported now, which will be a missing custom or 3rd party assembly, this may be recently added and removed, or a blast from the past which has reared its head again for no apparent reason (this was our issue, assembly not used in any forms, but was defined in the config file and hence took several forms down)
Hope this helps you to solve your issue - good luck!
I ran into the same problem with VS2017 and an application that was already running for a long time.
The application used to be deployed thru XCOPY deployment without publishing. After switching to the publishing method the error showed up.
After some reasearch we found that in the production there was still an entry for profiles in the web.config while it had already been removed in developement since there was no need vor it anymore.
After uncommenting the node profiles in web.config the application was up and running.
While deploying we had also remove all files except APP_DATA and web.config.
Propably file or IO related. Did you copy all the files, not just binaries? You could try deleting all the old files (backup first) so it´s not some write protection or security issue.
I had the same issue.
Some of the pages throw error when trying to open after publishing them.
One solution which worked for me was .. When I checked the aspx files of those showing errors, had CodeFile and not CodeBehind...
I changed from CodeFile to CodeBehind and it worked fine. (Dont know if its a reason that CodeBehind alone available in the bin directory.. Am a newbie and may be this reason is not right. Please correct me if I was wrong)
But problem is, on localhost certain files throw error when they are left as CodeBehind.
I think this thread may be related:
How to fix ASP.NET error "The file 'nnn.aspx' has not been pre-compiled, and cannot be requested."?
As indicated there, our solution was to delete all the files under:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root
I know this issue is old but if anyone comes into this problem, before playing with versions, files, etc, could I suggest to Clean the project first? After a very stressful day, this is what sorted my problem.
I have a fairly simple ASP.NET application, set up as a Web Application Project in Visual Studio. There is one particular aspx file called "invoice.aspx" which IIS refuses to serve. The URL I am using is definitely correct, and other aspx pages from this directory load and execute just fine. But not this ONE page! I've put a break point in Page_Load to make sure there is nothing funny going on, but the break point is never hit. The #Page directive looks fine... File permissions are the same as other files in the directory... no errors during build. What am I missing here? This is baffling me. This is IIS6 on a Windows XP dev box.
Well, I knew I'd find the answer myself if I posted about it... :)
It turned out to be a missing DLL. A dependent object could not be created and so it errored out. Why didn't it just give me a missingly assembly error? Ah, that is a good question! With the following bad code example answer:
public partial class Invoice : System.Web.UI.Page
{
DependentObject SomeObject = new DependentObject();
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
}
If the assembly for DependentObject's code is missing... the Invoice object, hence the Page to be served, cannot be initialized... the server can't find it... we have a 404.
I don't consider myself an expert in C#, but I am under the impression the above code is something you should never do. (right?) Not sure why the compiler allows it.
Moving the initial object creation to the Page_Load produces the much more useful missing assembly exception.
public partial class Invoice : System.Web.UI.Page
{
DependentObject SomeObject;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
SomeObject = new DependentObject();
}
}
Thanks guys, appreciate the suggestions.
Sending on lots of data, long querystring or otherwise making a request that the built-in IIS7 urlscan might block? If IIS7 blocks a request, it'll send out a 404 error.
Have you tried renaming the file and trying to access that?
Also, use notepad to copy the entire contents of the file into a new file and save that one.