ASP.NET IIS Application 500 Internal Server Error


Moon Ninja

I have a very strange problem. I have a development environment where I develop an ASP.NET MVC application and everything works fine in this environment. In particular there is an AJAX call in the Application that calls the controller and passes the data, the controller just needs to update the database with the passed information. everything is normal! .

However, I jumped all the setups to the server as a development environment (database, connection string). Everything works fine, the login function and other database save functions and controller actions seem to be working fine. Except for the ONE controller which returns a 500 Internal Server Error.

I've asked around and everyone wants to see the logs. In Event Viewer, there are no logs related to this 500 Internal Server Error. However, the IIS logs do provide some information, but the information does not detail what caused the 500 Internal Server Error.

I know what a 500 internal server error is, I know it's a generic error for various issues, but after looking at the logs, I can't figure out why this particular controller action is giving a 500 error when running on the production server but in There is no problem doing this in a development environment - very strange.

browser console

enter image description here

IIS normal log

enter image description here

IIS request tracing failed on 500

enter image description here

Moon Ninja

Following @A.Roussos's suggestion to debug with Visual Studio on PRODUCTION SERVER (probably obvious to me, it won't lol), I got some information.

My problem is that I use the parse function to parse the string into doubles before saving the data to the database. example

double a = Double.Parse(mystring);

However, the problem is apparently that the parsing function is dependent on your locale (CultureInfo). So I just added the following information to the code

double a = Double.Parse(mystring,System.Globalization.CultureInfo.InvariantCulture);

To note, my app didn't crash when I got the 500 Internal Server Error and I don't know what could be causing it. go out.

What killed me was that the app (or one specific controller action in the app) worked perfectly in dev but not in production, something like that never happened to me, I'm glad to get This learning experience.

Related


asp.net core application. 500 Internal Server Error

David Edel I uploaded my website to godaddy windows hosted with plesk. All files are uploaded but I get an error: 500 Internal Server Error. There is a problem with the resource you are looking for and cannot be displayed. By researching the problem online, I

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

Brandon I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server erro

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

500 Internal Server Error in ASP.NET MVC Package

Sohail Alizadeh I do bundle JavaScript files with ASP.NET MVC Bundling. When I inspect and inspect the network tab in my browser , I see 500 Internal Server Errorwhen my packages need to be loaded. Reply: A second operation was started in this context before t

Posting 500 Internal Server Error on ASP.net MVC

Senju When I try to send a variable to JSON on ASP.net MVC, I get an error like this: jquery-2.2.3.min.js:4 GET http://localhost:58525/Order/GetAddress/? userid=42&email=asandtsale%40gmail.com 500 (Internal Server Error) my controller: public JsonResult GetAdd

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core Web API 500 Internal Server Error

Fear I am trying to build an API within the ASP.NET Core framework. I made a basic controller that just returns a string: namespace Dojo_Api.Controllers.Forum { //[Authorize] [Route("api/[controller")] public class ForumController : Controller

Posting 500 Internal Server Error on ASP.net MVC

Senju When I try to send a variable to JSON on ASP.net MVC, I get an error like this: jquery-2.2.3.min.js:4 GET http://localhost:58525/Order/GetAddress/? userid=42&email=asandtsale%40gmail.com 500 (Internal Server Error) my controller: public JsonResult GetAdd

Internal Server Error 500 on IIS 8

permanent I do have a weird problem with my site. It works fine locally but shows up online iis 8 500 - internal server error. I use the same remote database in both the online and local versions of the website. The website works online, but when I try to uplo

Internal Server Error 500 (with IIS logs)

Bird I'm getting some errors on a classic ASP website. Internal server errors sometimes occur when a website is first run. Then a refresh will fix it. I decided to check my IIS logs to see what the problem is, but I can't explain it. this is the log line 201

500 Internal Server Error in CodeIgniter application

hissing code I'm doing some work locally on the CodeIgniter web app. It works fine locally, but when uploading to the live server. I get a blank page and get an internal server error message in the Firebug console when passing the Firebug inspection. I've been