"Invalid postback or callback argument" after new deployment - c#

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.

Related

Error when publishing dynamic module contents Sitefinity

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.

Attempting to run C# on cloud9 IDE but receiving errors

I’m new to Cloud9 and I’m facing some issues.
I’m attempting to run the C# code on the IDE and am failing to do so, I think I know why but I cant seem to be able to resolve the issue.
The picture uploaded below should have everything needed to solve the problem
enter image description here
Upon further research, I found a link that goes through a step by step process on how to install .NET core. However, I'm having issues, with setting the project template using this code for the terminal dotnet new console -lang C#
It starts decompressing then stops at 99%. (as indicated in image below) The first error that pops up states that System.IO.IOException: No space left on device not sure what to do with this though.
https://imgur.com/a/30Vh6Eu
I kept on attempting the same code and it has managed to complete the decompressing stage only to start resetting again at the Expanding stage. (Refer to image below).
https://imgur.com/a/UMtpYow
Run C# is not yet supported on Cloud9 IDE
https://docs.c9.io/docs/supported-languages
I think #shingo is correct to say C# is not supported BY DEFAULT. It is possible, however, to make it happen as shown in the links below, but not advisable as there is little help out there. I wouldn't do it if I were you.
blog help
youtube
aws documentation not specifically about c# but related

Compiled Azure Function Monitoring: "No data available"

I'm using a couple of compiled C# functions on Azure. They are working as expected, but when I click 'Monitor' on either of the functions, it just shows up "No data available".
I can see the function running on the 'Develop' tab's log, but would like an overview of the function's usage.
Is there something I am missing?
I'm seeing these too. I compared a function app that is working with one that isn't working. The one that isn't working returns a 404 when I click "refresh" in the monitor tab. It's hitting an URL like this:
https://[YOUR_APP].scm.azurewebsites.net/azurejobs/api/functions/definitions//invocations?limit=20
Note the double slashes before "invocations".
In a working app, it's more like:
https://[YOUR_APP].scm.azurewebsites.net/azurejobs/api/functions/definitions/[YOUR_APP]-[YOUR_FUNCTION]/invocations?limit=20
So something has happened to blow up the [YOUR_APP]-[YOUR_FUNCTION] part of the URL that the portal generates. Any ideas?
--
UPDATE: I think I fixed it.
I connected to the storage account associated with the function app using Microsoft Azure Storage Explorer. When I went to Tables > AzureWebJobsHostLogscommon, I noticed two things:
there was an entry for a function I had deleted
there was a function that I had created that had no entry (well, it existed in the "default-[YOUR_FUNCTION]" RowKey, but the "[YOUR_APP]-[YOUR_FUNCTION]" RowKey was missing
I added a new row for the missing "[YOUR_APP]-[YOUR_FUNCTION]" RowKey and set the OriginalName to the real function name. I went back to the portal, and poof! it started working.
I didn't bother deleting the extraneous entry from the deleted function. It didn't seem to hurt anything. But if any real function is missing, it seems to break the whole Monitor tab.
How it got that way, I'm not sure. Maybe it was doing something when I published an update.
--
UPDATE 2: Well, that got the Monitor tab working, but the data is "stale", as if someone background process isn't refreshing. I can see the log data appearing in Table Storage...
--
UPDATE 3: The stale data seems to be separate issue in the East US region, tracked at https://github.com/Azure/Azure-Functions/issues/259 ... the "no data available" issue I think was fixed by me correcting the AzureWebJobsHostLogscommon table as mentioned above.
We believe we have found an issue when explicit host ids are set in the host file, which is what is likely causing the problem.
We're tracking this issue here and will update it as we make progress.
As a workaround, please remove the id from your host.json file.
I also had the "No data available" problem. I solved it by adding an application setting that was missing: "FUNCTIONS_EXTENSION_VERSION": "~1"
Reference, David Ebbo comment on GitHub:
https://github.com/Azure/Azure-Functions/issues/259#issuecomment-300379674
Had the same issue, resolved it by emptying the host.json and making
"FUNCTIONS_EXTENSION_VERSION": "~3"

Enum parameter taking passing incorrect values in Visual Studio Asp.Net MVC

We have this very strange error in Asp.Net MVC 4 Razor whereby within the View, we have the following code:
#Html.InlineEditingContentText(CS.General_v4.Enums.HtmlTagName.Span, VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Weather_Title, "weather-widget-title masterpage-widget-title")
InlineEditingContentText is an extension method which we have internally. The 2nd parameter being passed is an enumeration parameter and as you can see from above, the value is VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Weather_Title. Now when you debug into the extension method InlineEditingContentText, the actual 2nd parameters being received is not VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Weather_Title but VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Header_LoggedOutText which happens to be the next value of the ContentTextIdentifier enumeration after VisitGozo.Enums.VisitGozoEnums.ContentTextIdentifier.MasterPage_Weather_Title.
We are not assigning values to the enumerations and so their respective int values increment after each other automatically.
Strangely enough, if we load the exact same project on another workstation, this works fine.
Also, if we perform some changes to the View (like just add a whitespace) and save, this also works fine.
Any possible insight into why this strange issue is happening?
Edit #1: Also, when we uploaded the website on the deployment server, after compiling using same workstation, the error was carried over as well
Edit #2: 2013-10-22 > We are still getting this same problem, even when then deploying the files on the actual production server, such incorrect enum values are being carried over. The only way to solve the issue is to delete the Views from the server / locally, and re-overwriting them again. Any idea how we can solve this issue? We shouldn't be caching Views so can't really understand why this is happening? Would appreciate any form of help!
Most likely cached files have not been cleaned. It might happen occasionally.
If you use IIS delete corresponding Temporary ASP.NET folder. For example, if your project is 64bit Framwork 4.0 then path would be:
%WinDir%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\
If you use IIS Express or similar you might need to stop it and start again.
Updating Razor file forced dynamic compilation and that solved the your issue.

Error 1001 An error occured in sending the command to the application

COM Excel AddIn, C#, VS2008
The error happens occasionally when I install/uninstall my AddIn.
sometimes I see Error 1001 the specified file can not be found
Anyone know what causes these and how to fix? thanks
I use windows installer
http://msdn.microsoft.com/en-us/library/2w2fhwzz%28v=VS.90%29.aspx says if use [TARGETDIR], it should be like "[TARGETDIR]\" or "[TARGETDIR] ". I simply use /filepath = "[TARGETDIR]myinstallfile" in CustomActionData
What I do not understand is it works almost all time and fails occasionally
Also even if I change this to including space or backslash, I can't tell if that fixes issue since the issue does not happen every time. Anyone has experience? thanks
I found this and it fixes the issue though I am not sure I ever use DDE in my program
http://sympmarc.com/2010/02/04/microsoft-excel-error-there-was-a-problem-sending-the-command-to-the-program/
Then I found this http://www.opendylan.org/documentation/opendylan/interop2/inte_278.htm
It talks about COM Server
so I went to cmd, type in "Excel.exe /RegServer", then the error disappears.
I am not really not sure if this solution works for all cases.
In fact, I am concerned that I miss sth in installer.
Here is a Microsoft Support page related to an issue which looks quite similar to yours. So for me it looks like a bug in Excel rather than in your installer.
The article is quite large, but it boils down to making sure that:
your Excel app is not running with elevated rights
advanced setting "Ignore other applications that use Dynamic Data Exchange (DDE)" is unchecked
Other than that you might try to repair Excel installation or follow the advice given in this thread of ASP.NET forums to fix the registry for Excel installation.
I hope it helps someone facing similar issues.
If you get this type of error when uninstalling a VS setup project MSI, then the most likely reason is that TARGETDIR is not preserved between the install and the uninstall, therefore it has no value, and attempts to use it in an uninstall custom action will result in failure to find the file. The easiest solution (apart from always installing to known locations such as common files etc) is to save TARGETDIR to the registry and retrieve it later. In the VS IDE you can create a registry item with the value [TARGETDIR] to have it resolved at install time.

Categories

Resources