C
C#2mo ago
TropicalSky

✅ ASP.NET CORE Web Application

I am using ASP.NET CORE in my web application and when I am trying to upload a file to an input field even if I don't upload a file and just click the upload button my iis express server just crashes does anyone have any idea?
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="JobName" class="control-label">Job Name</label>
<input asp-for="JobName" class="form-control" />
<span asp-validation-for="JobName" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="JobDescription" class="control-label">Job Description</label>
<input asp-for="JobDescription" class="form-control" />
<span asp-validation-for="JobDescription" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="JobStatus" class="control-label">Job Status</label>
<input asp-for="JobStatus" class="form-control" />
<span asp-validation-for="JobStatus" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Invoice" class="control-label"></label>
<input asp-for="Invoice" class="form-control" type="file" accept=".pdf" />
</div>
<div class="form-group">
<label asp-for="Customer" class="control-label"></label>
<input asp-for="Customer" class="form-control" />
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="JobName" class="control-label">Job Name</label>
<input asp-for="JobName" class="form-control" />
<span asp-validation-for="JobName" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="JobDescription" class="control-label">Job Description</label>
<input asp-for="JobDescription" class="form-control" />
<span asp-validation-for="JobDescription" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="JobStatus" class="control-label">Job Status</label>
<input asp-for="JobStatus" class="form-control" />
<span asp-validation-for="JobStatus" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Invoice" class="control-label"></label>
<input asp-for="Invoice" class="form-control" type="file" accept=".pdf" />
</div>
<div class="form-group">
<label asp-for="Customer" class="control-label"></label>
<input asp-for="Customer" class="form-control" />
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
15 Replies
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
TropicalSky
TropicalSkyOP2mo ago
Where do you recommened adding the try catch block? As this crashes the application before even a POST request is being sent? I also changed the server over to http from IIS Express
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
TropicalSky
TropicalSkyOP2mo ago
Whenever I upload the file it just crashes? So I am confused on where I could put that try catch block So which do you suggest?
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
TropicalSky
TropicalSkyOP2mo ago
I know I switched it to http?
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
TropicalSky
TropicalSkyOP2mo ago
The program '[8320] SDR-Test.exe' has exited with code 4294967295 (0xffffffff). This is the only error I get Which indicates a fatal error occurred but I don't even know where to put a exception block because nothing is happening server side just putting a file into a input box
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
TropicalSky
TropicalSkyOP2mo ago
GitHub
GitHub - TrpicalSky/SDR-Test
Contribute to TrpicalSky/SDR-Test development by creating an account on GitHub.
TropicalSky
TropicalSkyOP2mo ago
I have linked my code below if you believe that the problem could lie elsewhere
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
TropicalSky
TropicalSkyOP2mo ago
Wdym by prompt I have input box that takes files of type pdfs and when I try and use that input it just crashes
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
TropicalSky
TropicalSkyOP2mo ago
Well the one I uploaded was 67kbs but that shouldn't matter because I am not even submitting the form to the server
Want results from more Discord servers?
Add your server