I have a scriptmanager and updatepanel, inside the panel is a gridview it's bound to an objectdatasource, when I click the select button in the grid I get the alert with the message "Exception has been thrown by the target invocation". How would I know the source of this error, or what is causing the error. Is there a way to get the real exception that occurred not just a message?
Thanks
Disable the ajax for a moment (EnablePartialRendering="false" on the scriptmanager).This error message is about as useful as a chocolate fireguard. Disabling the update panel is fine for development, and the few bugs that I stumble across while developing. But what about in a production situation. If I get my clients phoning up telling me the app won't work becuase an "Exception has been thrown by the target of an invocation", then I'll just explain to them how to disable AJAX so I can get a useful error message. AHH. No. I don't think so. Is there some way that you can actually pass the message text up to the popup box. Dev's like me are pretty reliant on the exception text. Especially as we often just write stuff and then it gets put into production without rigourous testing. Not ideal, but thats what happens in the real world outside of Redmond.
Was this resolved at all? I have a similar issue:
Steps to Reproduce
1) I have a DB table with a column which is varchar(1024)
2) I want this column to only contain unique strings
3) So I add a trigger to the column to check for the data entered and use RaisError if any problems
4) I setup my Datagrid/ObjectDataSource/BLL/DAL and all works fine in aspx, the page errors with the correct message.
5) I add in an AJAX Update Panel and *it* (the ASP.NET AJAX Libraries) just spits out a JSON string containing an alert message "An exception occured by the the target of an invocation". THAT is not the correct error string.
Why is it not? and how do I alter this behaviour to make it send a JSON string containing the correct Error message?
Thank
Was this resolved at all? I have a similar issue:
Steps to Reproduce
1) I have a DB table with a column which is varchar(1024)
2) I want this column to only contain unique strings
3) So I add a trigger to the column to check for the data entered and use RaisError if any problems
4) I setup my Datagrid/ObjectDataSource/BLL/DAL and all works fine in aspx, the page errors with the correct message.
5) I add in an AJAX Update Panel and *it* (the ASP.NET AJAX Libraries) just spits out a JSON string containing an alert message "An exception occured by the the target of an invocation". THAT is not the correct error string.
Why is it not? and how do I alter this behaviour to make it send a JSON string containing the correct Error message?
Thank you
No comments:
Post a Comment