kendoui file upload - unable to run parallel ajax request - asp.net-mvc

I am developing dropbox similar application where user can upload single or multiple files via kendo ui file upload control in ASP.NET MVC.
Issue i am getting is during file upload ..say (2MB file) all other ajax requests are shown in pending state, and once the upload is complete...all the pending requests are executed sequenctially..
Please help me resolving this issue. Unable to find any help on Google.

Do you run your case in production or you are in debugging mode? If in development mode(debugging) try to use release (production) mode and see if there is any change.

Related

How to update remote database using FTP or File System publishing method using code first migration

I have deployed my ASP.NET MVC application using FTP publishing method, application was working fine until i republished it after making some changes, i used code first migration to update database locally and it was working fine. When i published it again i am getting the error saying:"Model backing a DB Context has changed; Consider Code First Migrations". When using web deploy publishing method there is no problem database is updated, problem is when using FTP or File System publishing.
I would like to know how can remote database be updated when using FTP or File System publishing method. My current host doesn't offer web deploy publishing, is either i use FTP or File system.
Can anyone assist?
If you are using the File System publishing method and happen to make changes to your Models, then you will have to re-publish your project and just replace it with the one existing on the Server.
I found solution, all i have to do was to add the following code in DbContext like:
public InvoiceContext()
: base("InvoiceContext")
{
System.Data.Entity.Database.SetInitializer(new
MigrateDatabaseToLatestVersion<InvoiceContext,
Identity2Example.Migrations.InvoiceContext.Configuration>());
}
I hope it will also help somebody.

Concurrent files uploads on IIS 10 never succeed and freeze the user session

Configuration:
Windows Server 2016 4Gb ram, ASP.NET MVC 5, IIS-10, Max upload size per request:30M
Problem:
When uploading 5 image files of 500Ko asynchronously, the user session freezes and the uploads never succeed. If I try to reach another page of the website from the same browser, it hangs. From another browser, I can reach any pages of the website. The user session hangs until I restart the website in the IIS.
As soon as I restart the website, the all uploads resume uploading and succeed as it would normally do and all the pages of the website are again reachable by the user.
What I tried so far:
Up to 4 images of 500Ko, it is working fine.
If I take images of 5M each instead, it works for 1 upload but not 2 concurrent uploads.
If I run the website on my local computer, it is working fine.
Any ideas what could lead to such a situation?
Thank you!
I experienced the exact same issue and Brando's answer helped me find the solution.
Try adding [SessionState(SessionStateBehavior.Disabled)] to the line above your controller processing your image uploads.
Like so:
[SessionState(SessionStateBehavior.Disabled)]
public class ImagesController : Controller
{
}
According to your description, I guess you may face the session lock issue. I suggest you could try to debugdiag to capture the dump file and analysis the dump file to find out the reason.
debugdiag download link: https://www.microsoft.com/en-us/download/details.aspx?id=49924
Steps:
1. Open the debugdiag and select performance.
Go next and select HTTP response times
Click next and add the url with timeout value
Click next and click add dump target and select target type to web application pool and select the right application pool
Click next and select full dump and click next
Type in the dump rule name and click next
More details, you could refer to below article:
https://support.microsoft.com/en-ca/help/919792/how-to-use-the-debug-diagnostics-tool-to-troubleshoot-a-process-that-h

My file gets uploaded with my fineuploader setup but yet it shows upload failed. What is the reason for this?

I'm using fine uploader in a rails application and I've made a gist of what my method and my jQuery script looks like here
Here's my console log
and here's my upload returning failed when it actually didn't fail:
I thought this was just with my development server where files are being uploaded to FS but I tried it with my staging server that sends the files to a CDN server and it is still successfully uploaded with the same upload failed prompt:
It looks like you are not including the mandatory "success" property in your response. It must be set to a value of true to indicate success. This is mentioned in the server documentation at http://docs.fineuploader.com/endpoint_handlers/traditional.html. There is an open case to remove this requirement for newer browsers, scheduled for version 6.0. See https://github.com/FineUploader/fine-uploader/issues/1325 for specifics.

TFS build error - process cannot access

When I am trying to buid on TFS build server I got the following error:
Error CS2012: Cannot open 'xx.dll' for writing -- 'The process cannot access the file 'xx.dll' because it is being used by another process.'
Could anyone please help out with that?
If you are developing a web application or anything of the like make sure that your server process (usually IISExpress or something) is not being run.
Kill all the processes that maybe consuming your compiled code.
Alternatively, you can download Lockhunter and see which program is locking that file.

Automate kendoUI upload control using codedUI test framework

When using codedUI as automation test framework to testapplication I am facing an issue with KendiUI upload control.
Issue: I record and playback the event of uploading a file from the UI developed using KendoUI upload control, but the automation framework doesn't show the progressbar indicating file uploaded, it shows the progressing icon for ever.
How do I get resolve of this
However it works fine when I manually try to upload the file, within secs its shows the progress bar and check mark appears indicating file has been uploaded.
I experienced same issue but with help of Microsoft CodedUI support I was able to resolve this issue.
In the test method where you are trying to perform some functions like file upload etc using ajax related controls disable the WebWaitForReadyLevel. Please paste the below line of code in start of your test method
ConfigurationManager.AppSettings["WebWaitForReadyLevel"] = "3";
which will actually disable it.
This disabling is at testmethod level so if you don't want to disable don't write any such code because by default WebWaitForReadyLevel is enabled.
Hope this helps.

Resources