We help IT Professionals succeed at work.

http 500 error on IIS server

I was adding some php file uploader to my Microsoft server 2016.  I had the software company dial into the server to help look at config and now all my sites are down and it only shows a http 500 error?  And no matter what I change around I can't get the sites to give me any error messages or anything.  I am unable to reach the software support people today for some reason and need to get the sites back up.  Any clue on a way to troubleshoot this?

Main site is using .asp, and I added php which seemed to be working also.  I just don't know if somehow the rights got changed? even the files with .html won't work either?
Comment
Watch Question

Ryan ChongSoftware Team Lead

Commented:
Any clue on a way to troubleshoot this?

try go to Event Viewer and see if there's some application errors recorded there?

also, try to change if there's any web.config, so to show the exact error on the page.

for example:

Working past 500–Internal server error
https://blogs.iis.net/rickbarber/working-past-500-internal-server-error

Author

Commented:
So what if its a rights issue?  Normally I have a VPN connection into the server and just upload through a normal windows share the files instead of FTPing.  So this morning I wasn't able to connect to my normal drive.  So i reshared it and got it working.  but wondering if the rights on the files would have changed or something.

I tried switching out to a more plain web.config as per the article you posted:

<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
    <system.web>
        <customErrors mode="Off" />
        <compilation debug="true" />
    </system.web>
</configuration>

Open in new window


Still only get 500 error no details

This is from the access log

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2020-02-14 00:06:12
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2020-02-14 00:06:12 192.168.2.12 GET /product-detail.asp product_id=25'A=0 443 - 162.221.207.51 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+pt-PT;+rv:1.9.1.2)+Gecko/20090729+Firefox/3.5.2+(.NET+CLR+3.5.30729) https://www.hitekfab.com/product-detail.asp?product_id=25'A=0 500 19 5 175
2020-02-14 00:21:54 192.168.2.12 GET /robots.txt - 443 - 66.249.75.171 Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html) - 500 19 5 17
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2020-02-14 00:33:59
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2020-02-14 00:33:59 192.168.2.12 GET /favicon.ico - 443 - 192.168.2.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/80.0.3987.100+Safari/537.36 https://hitekfab.com/ 500 19 5 1
2020-02-14 00:34:04 192.168.2.12 GET /index.asp - 443 - 192.168.2.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/80.0.3987.100+Safari/537.36 - 500 19 5 12
2020-02-14 00:34:06 192.168.2.12 GET /favicon.ico - 443 - 192.168.2.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/80.0.3987.100+Safari/537.36 https://hitekfab.com/index.asp 500 19 5 12
2020-02-14 00:35:05 192.168.2.12 GET /Home - 443 - 68.186.172.138 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 19 5 17
2020-02-14 00:35:05 192.168.2.12 GET /favicon.ico - 443 - 68.186.172.138 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 https://www.hitekfab.com/Home 500 19 5 56
2020-02-14 00:35:12 192.168.2.12 GET /page_edit2.asp pagename=Test-Page 443 - 68.186.172.138 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 19 5 15
2020-02-14 00:35:12 192.168.2.12 GET /favicon.ico - 443 - 68.186.172.138 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 https://www.hitekfab.com/page_edit2.asp?pagename=Test-Page 500 19 5 57
2020-02-14 00:35:26 192.168.2.12 GET /index.asp - 443 - 68.186.172.138 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 19 5 15
2020-02-14 00:35:26 192.168.2.12 GET /favicon.ico - 443 - 68.186.172.138 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 https://hitekfab.com/index.asp 500 19 5 57
2020-02-14 00:37:38 192.168.2.12 GET /favicon.ico - 443 - 192.168.2.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/80.0.3987.100+Safari/537.36 https://hitekfab.com/ 500 19 5 1
2020-02-14 00:45:24 192.168.2.12 GET /index.asp - 443 - 68.186.172.138 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 19 5 21
2020-02-14 00:45:24 192.168.2.12 GET /favicon.ico - 443 - 68.186.172.138 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 https://hitekfab.com/index.asp 500 19 5 56
Ryan ChongSoftware Team Lead

Commented:
access log doesn't provide the error details, what about the event log at Event Viewer?

Author

Commented:
i get some warnings in the event viewer for windows logs applications:

its a warning not a failure so yellow

Event code: 3007
Event message: A compilation error has occurred.
Event time: 12/10/2019 10:36:02 AM
Event time (UTC): 12/10/2019 4:36:02 PM
Event ID: 09ba536ec48c4535ade36585fee06f0d
Event sequence: 17
Event occurrence: 2
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/2/ROOT-1-132204660017756179
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\webroot\hitekfab\
    Machine name: PUBLICSERVER
 
Process information:
    Process ID: 3768
    Process name: w3wp.exe
    Account name: IIS APPPOOL\DefaultAppPool
 
Exception information:
    Exception type: HttpCompileException
    Exception message: c:\webroot\hitekfab\dmxConnectLib\lib\zip\zip.aspx(9): error CS0246: The type or namespace name 'Ionic' could not be found (are you missing a using directive or an assembly reference?)
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 
 
Request information:
    Request URL: https://www.hitekfab.com:443/dmxConnectLib/lib/zip/zip.aspx 
    Request path: /dmxConnectLib/lib/zip/zip.aspx
    User host address: 192.168.2.1
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: IIS APPPOOL\DefaultAppPool
 
Thread information:
    Thread ID: 88
    Thread account name: IIS APPPOOL\DefaultAppPool
    Is impersonating: False
    Stack trace:    at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Custom event details:

Author

Commented:
could the rights have gotten whacked.  You know where do I need to allow for like the IUSR accounts?  I'm not really seeing them and I know I need those somewhere. It should haven't changed but this issue is blowing my mind.
Ryan ChongSoftware Team Lead

Commented:
I think the error came from your ASP.NET application in which got a compilation error


Exception message: c:\webroot\hitekfab\dmxConnectLib\lib\zip\zip.aspx(9): error CS0246: The type or namespace name 'Ionic' could not be found (are you missing a using directive or an assembly reference?)

have you recompiled and copied all required dlls into the bin folder in your Web Application's folder in IIS ?

Author

Commented:
I wasn’t ever able to get the zip component to work. so I can uninstall that some how.  but that was a while ago Smd hasn’t caused problem. but we are trying to install an upload module that would have files on the \bin folder.  so maybe I need to dig in there?
Ryan ChongSoftware Team Lead

Commented:
yes, try see what libraries are available in the development machine's bin folder and replicate it to your web server

Author

Commented:
Shouldn't the IUSR and IIS_USERS accounts be added to the folder permissions?

permissions.JPG

Author

Commented:
ok, its down to user rights I believe.  I have a testing site and I gave the user everyone full rights and the testing site started working.

So I added the IUSR account and gave read/read execute and that didn't work.  I think before I had the IIS_IUSRS account added to, but when I try to add the group to the rights of the webfolder it can't find it?  I can't remember how I did that before?

Author

Commented:
It is a user rights thing.  I just don't understand.  But I added IUSR and IIS_USERS back to the folder and bam.  Back up and running.  Dumb...

But thanks for the help!
Commented:
See last post.  it was rights issues
Ryan ChongSoftware Team Lead

Commented:
Your original issue could be other than a rights issue, but anyway, glad you have resolved it

Author

Commented:
I generally only use experts exchange when I have an emergency. Ryan was awesome and was responsive and jumped in to help right away. thanks again