Error when publishing dynamic module contents Sitefinity - c#

When I try to update the dynamic module contents and click on publish it is showing a popup with message 'The type initializer for '' threw an exception' and I am not able to publish any content.
This is an inconsistent issue for me. It is weird that without doing any change at times this issues does not happen but it comebacks again. Can anyone please help me with this issue. Is this anything related to server update or server utilization because recently I added some more contents to the modules no other code changes or anything was done?
I found this link 'https://knowledgebase.progress.com/articles/Article/Uploading-images-error-Cannot-save-the-file-The-type-initializer-for-Module-threw-an-exception' but unfortunately, this did not solve my issue.

Related

Need suggestions for work around for programming error "Cannot serialize non-public type MS.Internal.NamedObject"?

Error occurs saving wpf RichtextBox contents; and also on line to remove the InlineUIContainer containing the button before recreating with new content. The save action works fine so long as the content of a button has not been modified. The line that modifies the content is simply;
_btnBookmark.Content = cbm.BkmkContent;
The button _btnBookmark is capture when the inline gets focus and has been verified as valid with all properties are as expected. The update of content occurs with no error and the new content is as expected.
The line for removing the inline with the button is simply;
this.rtbDoc.CaretPosition.Paragraph.Inlines.Remove(iuic);
The inlineUIContainter variable iuic is valid and contains the child button as expected.
I cannot see any way to alter my code to prevent these errors. This application was started in VS2010 and I believe these lines of code were working then. I recently upgraded to VS2015 community version and these errors appeared.
for others who might run into this error; mine was due to a corrupted project. This might have been caused by recently adding a Windows Installer setup project to the solution or maybe not. Anyway, restoring a previous version of the project caused the errors to disappear.

Error Deleting Document Type

I am getting a weird error on an Umbraco site I maintain. I'm trying to delete an old Document Type that I am replacing with an updated one. The error I am getting is:
Error handling action Item has already been added. Key in dictionary: 'textpage' Key being added: 'textpage'
The document type is not called "textpage" and doesn’t have any link to "textpage" that I can see. There are no physical files on the server and this error didn’t happen on the staging site nor did it occur on my local test. So I am a little stumped!
Any suggestions?
EDIT: This is also occurring if I try to save any document type in the CMS.
It could be a cache issue. Try touching the web.config file and see if the issue goes away.
Another thing that can cause this is if you have multiple templates with the same alias. Check for that as well.

Getting mysterious build error in my universal 10 app

I am working on a universal 10 application,at first every thing works fine but after I get a strange error:
Processing Resources failed with error: double entrees
I tried to find some information on the internet, but nothing. Also when I double clicked on the error it doesn't bring me to the error's spot.
I have tried to do many things,like searching in the .resw file(s) and nothing helped, so I decided to write this post
Can someone help me resolve this errors?thanks for help
The error seems to indicate that you have a duplicate resource in a resource dictionary.
Try going through the resource dictionaries and removing any duplicates.
Another approach is to compare the source files you have now to ones that were previously compiling without any issues and see if you can narrow down the culprit.

Invalid parameter when setting an image

I'm running a .NET 2.0 program on many computers. On one I had this error occurring repeatedly until I reset the application.
//line below was throwing the exception
this.myButton.BackgroundImage = global::myNamespace.Properties.Resources.myImage;
Exception:
ExceptionType: ArgumentException
Message: Parameter is not valid.
Source: System.Drawing
StackTrace: at System.Drawing.Image.get_Flags()
at System.Windows.Forms.ControlPaint.IsImageTransparent(Image backgroundImage)
at System.Windows.Forms.Control.set_BackgroundImageLayout(ImageLayout value)
The resource exists and it works fine once reset. Can anyone provide any insight as to might be happening?
I suggest you use Process Monitor to examine real-time activity on the file, and which processes might be locking it. Add a Filter where the Path is the name of the image/resource file; this should quickly show if anything is monkeying around with the file behind your back.
Yes, this is a 6 year old post! Ran into the same error today, and it took me far longer to fix than it should have. I was actually disposing my image control on startup, so I obviously couldn't adjust its background image on run-time. Might as well double check for that if you're here.

"Invalid postback or callback argument" after new deployment

Recently deployed a project into production and have run into the "Invalid postback or callback argument" error. We haven't encountered this in testing at all and after some research have found that the problem occurs in the following situation:
Old version is published and accessed.
New version is published and accessed without clearing the Temporary Files.
Drop down is changed twice. (The first time everything works fine.)
The fix for the clients that have called in has been to clear their temporary internet files but this isn't the ideal fix. Can anyone think of a reason why this would be happening and stop happening after the temp files have been cleared?
BTW: The app is ASP.NET 3.5 written in C#. We're using a javascript call back in this particular control that's causing this issue.
We didn't want to use the "enableEventValidation=false" trick as this isn't a consistent issue. From pretty early on, we were able to fix the issue case by case by clearing the temp files.
After some more looking today it was suggested that we rename our js file and behold, the issue is resolved locally. Seems that each user has had our old js file stored.
As to why it was throwing the "Invalid Postback" rather than a javascript error, we're not sure. There are other ways of specifying the version number in the script tags but for now we opted for the rename.
Since you mentioned that you're using a javascript callback, this may be related to event validation. If that's so, there is a workaround for that problem which is adding the following line to web.config:
<pages enableEventValidation="false"/>
So that, event validation is disabled in your pages. To turn it off is not recommended for security reasons because it verifies that arguments are originated by the server control.
You can get detailed information here about why this error occurs.

Categories

Resources