RunTimeError in ASP.Net - asp.net

I am doing .net application which is in vb.I am getting an runtime error when running in Internet Explorer,but its running in mozilla. Error as following
Error:SysArgumentTypeException:Object
of type
'AjaxControlToolKit.Animation.Length
Animation' cannot be converted to type
;AjaxControlToolKit.Animation'.Parameter
Instance.
Error is getting in MicrosoftAjax.debug.js
if(!this.isInstanceOfType(instance)) throw Error.argumentType('instance',ObjectgetType(instance))
What may be the reason for this error.What can i do to resolve this? Can anybody help?

The error indicates, that you are trying to cast a type called Length Animation to a type called Parameter. In VB and VB.NET, the cast is tried implicitly if the types of an assignment doesn't match. Please have a further look at the stack-trace to find the exact line of the error.
PS: I didn't know that there could be spaces in a .NET type name...

Related

og:locale fr_BE not recognized

I'm getting the following error:
of type 'website' is invalid because the given value 'fr_be' for property 'og:locale:locale' could not be parsed as type 'enum'.
After looking at https://developers.facebook.com/docs/messenger-platform/messenger-profile/supported-locales/, I wonder why fr_BE is not supported, but nl_BE is.
Is there a specific reason, or is this a bug?
Thank you.
Best regards

BizTalk ExecuteReceivePipeline can't accept XmdlDocument parameter

I'm trying to call a receive pipeline from the orchestration in order to catch any type of flatfile_to_xml error.
After searching for tutorials, the process seemed quite easy.
Added the libraries, created my inputMsg of type xmlDocument to inglobe any non-Xml payload (in my case the content of my file.txt) and created an atomic scope containing an expression for:
Microsoft.XLANGs.Pipeline.XLANGPipelineManager
.ExecuteReceivePipeline(typeof(namespace.pipelineName), msgIN);
Too bad I get that ExecuteReceivePipeline can't accept a XmlDocument while it accepts only a Microsoft.XLANGs.BaseType.XLANGMessage).
Cannot connvert from 'System.Xml.XmlDocument' to 'Microsoft.XLANGs.BaseTypes.XLANGMEssage'
Why this, and how can I achieve what I'm trying to achieve?
You have to use a Message variable of type XmlDocument.
It look like you're using a variable of type XmlDocument.
Ok, now it's working and i'm not sure why.
At first the msgIN of type XmlDocument wasn't accepted as a valid parameter.
I then created a msgType of type XmlDocument, and assigned it as the type of the message, so that calling:
ExecuteReceivePipeline(typeof(namespace.pipelineName), msgIN)
would be valid. after many rebuild and deploy i switched back to msgIn as XmlDocument... and it worked as intended...
I don't get it, but it's not the first time that a rebuild or a close-and-reopen of VS solved my preblems.
Thanks for those who found the time to answer!

When is System.Convert.FromBase64String() implicitly called?

I'm getting an Invalid length for a Base-64 char array error, but it's not my code and I don't see any explict references to this function. I know that it could be a problem with the ViewState or a '+' decoding problem with Request.QueryString, but is there anything else where something is being implicitly converted to Base 64?
Edit: I'm just given a bunch of code and an exception message pointing to some pages, so I'm looking for absolutely anything related that could be suspicious - but I don't know what those look like. No debug privilages either so I have to just scan through and make guesses.
You need to use the debugger to find out exactly which line is causing the error. You can find this out by having the debugger break whenever an exception is thrown in your code. Do the following within Visual Studio (I am showing Visual Studio 2012):
Click the Debug menu.
Choose Exceptions...
You will now see the following:
As the picture shows, make sure the Thrown checkbox is checked for Common Language Runtime Exceptions.
Click OK and the next time you run your code, the debugger should halt at the line that is causing the Invalid length for a Base-64 char array error.

Error pasting data into a TextInput

In my Flex 4 application I have a spark text input. When the user pastes data from clipBoard it throws error if the clipBoard contains a different format (other than string). This is the error message i am getting.
"TypeError: Error #1009: Cannot access a property or method of a null object reference.
at spark.components::RichEditableText/handlePasteOperation()
[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\RichEditableText.as:3611]"
Is there any way to handle this?
Thanks
Manoj
It looks like this is a known problem. The only suggestion I could find was from rdermer on one of those threads:
If you have a local copy of TLF 1.1
you can work around it by adding a
test at line 346 of TextClipboard.as.
Replace
endArray.push(curFlElement); with
if (curFlElement)
endArray.push(curFlElement); That prevents the bug - but the
underlying cause needs more
investigation.

When am I able to access the ASPError object?

I've begun using ASPUnit to unit test my classic ASP code. This is all good and I'm happy. The only problem is with the error messages it displays when a test generates a runtime error. For example, if I've not defined a variable somewhere in my function I get the error:
Microsoft VBScript runtime error (500): Variable is undefined
What would be more useful is if it could tell me which file/line the error occurred on. I know that I can get this information from the ASPError object which is returned by the Server.GetLastError() and elsewhere in my project I have a custom 500 error page which makes use of this method to automatically report crashes to Fogbugz. However when I try to access Server.GetLastError anywhere else the information returned is blank. For example, the following code will output zero rather than the expected 4.
<%
Option Explicit
On Error Resume Next
aVariable = "hello"
Dim errObj : Set errObj = Server.GetLastError()
Response.Write errObj.Line
%>
Is this the correct way to access ASPError or is it only possible on custom error pages? Is there a better way to get error messages reported within ASPUnit?
To the best of my knowledge the ASPError object does not get populated until your current page finished processing. Its meant to only be used on the 500 error page only. So theory is when you get an error if you've set up your 500 page then IIS will do an internal redirect to that page to allow you to at least record the error. Then and only then is the ASPError object available. I've had crazy ideas of using a xmlhttprequest to try to grab the page but thats just not the way it works.
In short there is not much you can do to get that error message details that you want.
Using JScript server side you can use try catch's which give you access to a exception object but even thats not much good to you, no line numbers or anything. Rubbish.

Resources