IIS local server stops when I drop some file on file input

0

On a project I'm working, when I try to select an excell file from windows file explorer, as soon as I click Ok, IIS server stops on my visual studio 2017. I also encounter this error on dropzone.js with image files. But strangely this happens time to time, but not all the time. Some days it starts working and some days it stops.

And as an another info, traditional file input tags do not crash when I try to upload images.

edit: I also tried claring http and nuget caches. Restored nuget packages but didn't work as well.

My environment: C:\Users\Doruk\source\repos\Alivex_MVC>dotnet --info .NET Core SDK (reflecting any global.json): Version: 3.0.100-preview3-010431 Commit: d72abce213

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\

Host (useful for support):
  Version: 3.0.0-preview3-27503-5
  Commit:  3844df9537

.NET Core SDKs installed:
  1.1.14 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.505 [C:\Program Files\dotnet\sdk]
  2.1.507 [C:\Program Files\dotnet\sdk]
  2.1.604 [C:\Program Files\dotnet\sdk]
  2.2.105 [C:\Program Files\dotnet\sdk]
  2.2.204 [C:\Program Files\dotnet\sdk]
  3.0.100-preview3-010431 [C:\Program Files\dotnet\sdk]


Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.11 [C:\Program                 
    Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.3 [C:\Program 
    Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.5 [C:\Program 
 Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.9 [C:\Program 
Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.11 [C:\Program 
Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.3 [C:\Program 
Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.5 [C:\Program 
Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview3-19153-02 [C:\Program 
Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.16 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.13 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.9 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.11 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.3 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.5 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview3-27503-5 [C:\Program 
Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview3-27504-2 [C:\Program 
Files\dotnet\shared\Microsoft.WindowsDesktop.App]

I also get these outputs;

    'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program 

Files\dotnet\shared\Microsoft.AspNetCore.App\2.2.5\Microsoft.CodeAnalysis.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.5\System.Runtime.Serialization.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.5\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    The thread 0x3748 has exited with code 0 (0x0).
    The thread 0x2448 has exited with code 0 (0x0).
    The program '[1436] dotnet.exe' has exited with code -1 (0xffffffff).


this is for excell;

    <form method="post" enctype="multipart/form-data">
    <div class="col-md-4">
        <input type="file" id="fUpload" 
    name="files" class="form-control" />
    </div>
    <div class="col-md-8">
        <button id="btnUpload" type="button" 
    class="btn btnPink">Yükle</button>
    </div>
    </form>

this is for dropzone;

    <div class="dropzone input" id="myDropzone">
        <i class="fas fa-cloud-upload-alt"></i> <br />
        <span>Drop files here to upload. (Max 4 mb) 
        </span><br />
    </div>

    <div class="input">
        <button class="btn btn-primary" type="submit" id="submit-all"> Upload 
    </button>
    </div>


    $('#submit-all').click(function () {
    //$('#commitButton').attr('disabled', 'disabled');
    var validation = ValidateFeatured()
    if (validation == false) {
        //$('#commitButton').removeAttr('disabled');
        return false
    }
    var evt = document.createEvent("Event");
    evt.initEvent("validated", true, true);
    window.dispatchEvent(evt);
    })

    Dropzone.options.myDropzone = {
    url: '@Url.Action("CreateFeatured", "Featured")',
    paramName : "doruk",
    autoProcessQueue: false,
    uploadMultiple: true,
    parallelUploads: 5,
    maxFiles: 5,
    maxFilesize: 4,
    acceptedFiles: 'image/*',
    addRemoveLinks: true,
    init: function () {
        dzClosure = this; // Makes sure that 'this' is understood inside the 
    functions below.

        // for Dropzone to process the queue (instead of default form 
    behavior):
        window.addEventListener('validated', function (e) {
            console.log(7)
            // Make sure that the form isn't actually being sent.
            e.preventDefault();
            e.stopPropagation();
            if (dzClosure.getQueuedFiles().length > 0) {
                dzClosure.processQueue();
            }
            else {
                // Upload anyway without files
                $("#featuredForm").submit();
                console.log(8)
            }
        });

        //send all the form data along with the files:
        this.on("sendingmultiple", function (data, xhr, formData) {
            formData.append("language", jQuery("#language").val());
            formData.append("title", jQuery("#title").val());
            formData.append("subTitle", jQuery("#subTitle").val());
            formData.append("pageUrl", jQuery("#pageUrl").val());
            formData.append("publishDate", jQuery("#publishDate").val());
            formData.append("IsEvent", jQuery("#IsEvent").val());
            formData.append("eventId", jQuery("#eventId").val());
            formData.append("orderScore", 4);
        });
    }
    }
c#
jquery
iis
visual-studio-2017
dropzone.js
asked on Stack Overflow Jun 13, 2019 by Doruk San • edited Jun 14, 2019 by Doruk San

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0