unhandled-exception

unhandled security exception when flash try to post dato to my asp.net mvc application

你离开我真会死。 提交于 2019-12-25 03:48:35
问题 I'm building an action that basically handles receiving post data from a flash app, but when the flash make the post (with a long xml string) its seem like mvc frakework block the post and i get the folowing outputs: Response headers: POST http://mysite.com/mycontroller 302 Found GET http://mysite.com/Error/Generic?aspxerrorpath=/mycontroller 200 OK Event Viewer: Event message: An unhandled security exception has occurred. I have tried : On my controller [AcceptVerbs(HttpVerbs.Post),

Dynamically allocated 2d array

不羁的心 提交于 2019-12-24 17:17:16
问题 I'm trying to create a 2d array, specifically an adjacency matrix for directed graphs. I've never tried this with dynamic memory allocation before and I've hit a snag. Here's the code: int n, i; printf("Number of nodes is: "); scanf("%d", &n); int ** array = malloc(n * sizeof(int*)); for(i = 0; i < n; i++) array[i] = malloc(n * sizeof(int)); printf("Number of edges is: "); scanf("%d", &m); int x, y; for(i=0;i<m;i++) { scanf("%d %d", &x, &y); array[x][y]=1; } As soon as I finish entering all

Catch unhandled exceptions from editor

雨燕双飞 提交于 2019-12-23 21:19:48
问题 We are using MEF within our WPF application (MVVM) to embedd external editors. At some point in our main view there is a content element where the editor is going to be placed in. Now we would like to catch any unhandled exception from that editor and then reload the editor. The only thing I have found is to use DispatcherUnhandledException from the Application class. From there I would have to somehow reach the main view editor and tell it to reload the crashed editor. I was wondering if

MVC Error: model item of type 'System.Collections.Generic.IEnumerable`1 required

时间秒杀一切 提交于 2019-12-23 13:34:11
问题 I'm doing some modifications to a system, and I've run into an exception that I was hoping someone could help with?? The error I'm getting is the following: Exception Details: System.InvalidOperationException: The model item passed into the dictionary is of type 'System.Collections.Generic.List 1[System.String]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable 1[MyApp.Data.aspnet_Users]'. Basically what I want to do is display a list of Inactive users

Exceptions on .Net ThreadPool Threads

一世执手 提交于 2019-12-23 12:41:08
问题 Duplicate: How to catch exceptions from a ThreadPool.QueueUserWorkItem? I am queueing up multiple delegates on the .Net ThreadPool for a large number of independant remoting calls that themselves call multiple databases and other offline resources. By Queueing these calls on the ThreadPool I can run them concurrently and minimize the overall latency. private void CompleteAndQueuePayLoads(IEnumerable<UsagePayload> payLoads) { List<WaitHandle> waitHndls = new List<WaitHandle>(); foreach

How to handle currentDomain.UnhandledException in MSTest

瘦欲@ 提交于 2019-12-23 07:46:17
问题 I tried to implement solution based on answer How to handle exceptions raised in other threads when unit testing?, but I still don't understand what to do in the handler. Let's suppose I have a test: [TestMethod] void Test() { new Thread(() => { throw new Exception(); }).Start(); } I have and global initialization of all tests: [AssemblyInitialize] public static void AssemblyInitialize(TestContext context) { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.UnhandledException +

UWP - Frame Navigate only crashes when passing a parameter

一笑奈何 提交于 2019-12-22 17:58:29
问题 I'm trying to pass the id of the clicked element as a string to a new page, however the app always crashes. I'm not entirely sure how to find out the cause of the problem as every example I've found uses the same method and it works just fine for them. The sender event: private void MovieBox_OnTapped(object sender, TappedRoutedEventArgs e) { var id = (sender as StackPanel).Tag as string; Debug.WriteLine(id); //the correct id in string Frame.Navigate(typeof(MovieDetailsPage),id); } The

What happens if an unhandled exception is thrown in Application_Start?

☆樱花仙子☆ 提交于 2019-12-22 01:53:13
问题 ... will the Application_Start method be ran again for the next request(s) or not? Does it depend on ASP.NET version, hosting server version and/or other context? I am trying to determine if it's a good thing to load critical assemblies there or not. For example data access assemblies which are vital to the functioning of the whole application or not. Failure to load such assembly would make subsequent requests useless. 回答1: Application_Start will be fired only once for each web application

How can I allow Task exceptions to propagate back to the UI thread?

佐手、 提交于 2019-12-20 19:49:04
问题 In TPL, if an exception is thrown by a Task, that exception is captured and stored in Task.Exception, and then follows all the rules on observed exceptions. If it's never observed, it's eventually rethrown on the finalizer thread and crashes the process. Is there a way to prevent the Task from catching that exception, and just letting it propagate instead? The Task I'm interested in would already be running on the UI thread (courtesy of TaskScheduler.FromCurrentSynchronizationContext), and I

UnhandledException in WP7

北城余情 提交于 2019-12-20 10:38:22
问题 I am getting this weird error when making a WP7 app, and I can not see why. The only output/ error message I get is "UnhandledException: The parameter is incorrect. : : : ProgramName.App" This error occurs randomly, and I do not get any information from the debugger on how to resolve it. When I run the same code twice, one time it gets the error, and the other time it does not. So, have any of you got this error before, and can maybe tell me why it is happening? This is so frustrating,