Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. 500 Error

500 Error

Scheduled Pinned Locked Moved Web Development
databasecsharpasp-netsql-serversysadmin
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • realJSOPR Offline
    realJSOPR Offline
    realJSOP
    wrote on last edited by
    #1

    This is going to be really generic, but... ASP.Net website hitting a sql server database. Our web site hits a database and according to the sql server profiler, the stored proc is returning the requested data, but the response that we're seeing is a 500 error. What might cause that?

    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
    -----
    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
    -----
    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

    Richard DeemingR 1 Reply Last reply
    0
    • realJSOPR realJSOP

      This is going to be really generic, but... ASP.Net website hitting a sql server database. Our web site hits a database and according to the sql server profiler, the stored proc is returning the requested data, but the response that we're seeing is a 500 error. What might cause that?

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

      Richard DeemingR Online
      Richard DeemingR Online
      Richard Deeming
      wrote on last edited by
      #2

      Any kind of unhandled exception in the code that follows on from calling the stored procedure. Check the event log on the server - hopefully at least some details of the error should be logged there.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      realJSOPR 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        Any kind of unhandled exception in the code that follows on from calling the stored procedure. Check the event log on the server - hopefully at least some details of the error should be logged there.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        We have five db/web server combinations running the same code. This is the only one that exhibits the problem. We found out that it was a 500 error by checking the logs. That's the first thing we checked to see if it was happening on the other servers. We've been trying to resolve this for a week... non-stop...

        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
        -----
        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
        -----
        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

        Richard DeemingR 1 Reply Last reply
        0
        • realJSOPR realJSOP

          We have five db/web server combinations running the same code. This is the only one that exhibits the problem. We found out that it was a 500 error by checking the logs. That's the first thing we checked to see if it was happening on the other servers. We've been trying to resolve this for a week... non-stop...

          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
          -----
          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
          -----
          When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

          Richard DeemingR Online
          Richard DeemingR Online
          Richard Deeming
          wrote on last edited by
          #4

          Assuming this isn't ASP.NET Core, the Windows application event log on the affected server should contain an entry for every unhandled exception thrown by your application. Eg:

          Log Name: Application
          Source: ASP.NET 4.0.30319.0
          Date: 05/02/2021 08:33:24
          Event ID: 1309
          Task Category: Web Event
          Level: Warning
          Keywords: Classic
          User: N/A
          Computer: ...
          Description:
          Event code: 3005
          Event message: An unhandled exception has occurred.
          Event time: 05/02/2021 08:33:24
          Event time (UTC): 05/02/2021 08:33:24
          Event ID: 3517ee43b6ef4766b78e33194f895134
          Event sequence: 19833
          Event occurrence: 3
          Event detail code: 0

          Application information:
          Application domain: /LM/W3SVC/2/ROOT-1-132569484930082141
          Trust level: Full
          Application Virtual Path: /
          Application Path: ...
          Machine name: ...

          Process information:
          Process ID: 4920
          Process name: w3wp.exe
          Account name: IIS APPPOOL\.NET v4.5 (64-bit)

          Exception information:
          Exception type: InvalidOperationException
          Exception message: Request format is unrecognized for URL unexpectedly ending in '/CountProducts'.
          at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
          at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
          at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
          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: ...
          Request path: ...
          User host address: ...
          User:
          Is authenticated: False
          Authentication Type:
          Thread account name: IIS APPPOOL\.NET v4.5 (64-bit)

          Thread information:
          Thread ID: 89
          Thread account name: IIS APPPOOL\.NET v4.5 (64-bit)
          Is impersonating: False
          Stack trace: at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
          at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpCon

          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

          realJSOPR 1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            Assuming this isn't ASP.NET Core, the Windows application event log on the affected server should contain an entry for every unhandled exception thrown by your application. Eg:

            Log Name: Application
            Source: ASP.NET 4.0.30319.0
            Date: 05/02/2021 08:33:24
            Event ID: 1309
            Task Category: Web Event
            Level: Warning
            Keywords: Classic
            User: N/A
            Computer: ...
            Description:
            Event code: 3005
            Event message: An unhandled exception has occurred.
            Event time: 05/02/2021 08:33:24
            Event time (UTC): 05/02/2021 08:33:24
            Event ID: 3517ee43b6ef4766b78e33194f895134
            Event sequence: 19833
            Event occurrence: 3
            Event detail code: 0

            Application information:
            Application domain: /LM/W3SVC/2/ROOT-1-132569484930082141
            Trust level: Full
            Application Virtual Path: /
            Application Path: ...
            Machine name: ...

            Process information:
            Process ID: 4920
            Process name: w3wp.exe
            Account name: IIS APPPOOL\.NET v4.5 (64-bit)

            Exception information:
            Exception type: InvalidOperationException
            Exception message: Request format is unrecognized for URL unexpectedly ending in '/CountProducts'.
            at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
            at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
            at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
            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: ...
            Request path: ...
            User host address: ...
            User:
            Is authenticated: False
            Authentication Type:
            Thread account name: IIS APPPOOL\.NET v4.5 (64-bit)

            Thread information:
            Thread ID: 89
            Thread account name: IIS APPPOOL\.NET v4.5 (64-bit)
            Is impersonating: False
            Stack trace: at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
            at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpCon

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #5

            We figured out what it was - database permissions. F*ckin DBA's...

            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
            -----
            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
            -----
            When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups