0

I am currently developing a MVC 5 web project using AdminLTE template. When I debug on Visual Studio, there is no problem but if I publish the project and test on my local IIS server, it gives HTTP 500 error.

I checked the all controllers and views and found somethings. On one view I used mysql connection and there is no problem there. Page is working properly, but sql server used pages are not working. Also I used SQL server model on login page. It also works well. Just SQL server connections doesn't work.

I am using SQL Server Express on my machine,
remote mysql,
.NET Framework 4.6.1,
AdminLTE template,
latest IIS server.

I also tried on windows server 2012 r2 standard with SQL Server 2008 r2. I configured web.config but still getting the same errors.

sql used view

mysql used view

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • Log the exception details (stack trace/inner exception) and see why it is crashing – Shyju Aug 07 '18 at 18:42
  • Do you have any logging implemented in your application? – mahlatse Aug 07 '18 at 18:43
  • there is no logging implementation. Can you share a link about how to do it? – Ertuğrul BAYRAK Aug 07 '18 at 18:45
  • check [https://stackoverflow.com/questions/1171035/asp-net-mvc-custom-error-handling-application-error-global-asax](https://stackoverflow.com/questions/1171035/asp-net-mvc-custom-error-handling-application-error-global-asax) for how to handle errors in your MVC app – mahlatse Aug 07 '18 at 18:49
  • see this thread and modify web.config as written there https://stackoverflow.com/questions/5385714/deploying-website-500-internal-server-error – AlexiAmni Aug 07 '18 at 19:24

1 Answers1

0

Thank you for your suggestions. I solved to problem. I will explain it step by step.

  1. I added log4net package to solution by NuGet
  2. Configured it by the following link
  3. Checked the log file and saw following error : Login failed for user 'IIS APPPOOL\user'.
  4. Then I solved that problem according to this solution

Now the project works perfect, thanks.