1

I built a .net web app using visual studio. I tested it in visual studio and it seemed to work fine. After publishing it locally and copying to my remote web server it seems to keep crashing the application pool and I'm not sure how to debug it.

How I published it: I published it locally and copied all the files to: wwwroot/ss/ on the remote server. After that, I installed the folder as an application in IIS. Because it was built using version .net 4.5 framework but I only had .net 4.0 application pools I did:

appcmd set apppool /apppool.name: api /managedRuntimeVersion:4.5

Now, anytime I go to the application using my url: mywebsite.com/ss/api/controller/param, I get a 503 service unavailable.

When I check the application pool after I go to that URL, the app pool has been shut down. I tried using try/catches, but it doesn't seem to help. All I see in the log file is:

2015-03-09 01:01:39 remoteIP 14132 siteIP 80 HTTP/1.1 GET /ss/api/controller/param 503 4 AppOffline api

What's the best way to debug this? Can I use a remote debugger? Is there any folder besides C:\Windows\System32\LogFiles\HTTPERR or logs/LogFiles folder in the site root where I can find more information about why it crashed?

EDIT: If it is at all useful, I see in the event log:

I see several warnings: A process serving application pool 'api' terminated unexpectedly. The process id was '2724'. The process exit code was '0xfffffffe'.

followed by: Application pool 'api' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

13
  • 1
    If you really suspect an issue with a crashing application pool I would look at installing DebugDiag (microsoft.com/en-ca/download/details.aspx?id=40336) on the server and setting it up to trap exceptions from w3wp.exe. Commented Mar 9, 2015 at 2:37
  • Can you browse the Web API locally, within the server? Please ensure that the IIS is running on 64 bit machine. Commented Mar 9, 2015 at 2:39
  • When publishing, do you have the precompile checkbox checked or unchecked? Commented Mar 9, 2015 at 2:53
  • Also check the event log for more information. Sometimes that helps. Commented Mar 9, 2015 at 2:57
  • @womp I installed DebugDiag -- I don't see any messages when I attach it to my pool and the pool shuts down. Does that mean it isn't a crash but some other behavior causing the pool to stop? Commented Mar 9, 2015 at 3:01

1 Answer 1

3

There is no such thing as the .net 4.5 run time. Set it back to .net 4.0

appcmd set apppool /apppool.name: api /managedRuntimeVersion:4.0

Fun fact.

There are only 3 .net runtimes as of 2015-03-09

  • .net runtime 1.0
  • .net runtime 2.0
  • .net runtime 4.0

These runtimes allow you to run the following (ignoring the various SP)

  • .net runtime 1.0
    • .net framework 1.0
  • .net runtime 2.0
    • .net framework 2.0
    • .net framework 3.0
    • .net framework 3.5
  • .net runtime 4.0
    • .net framework 4.0
    • .net framework 4.5
    • .net framework 4.5.1
    • .net framework 4.5.2
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.