I have a website with one sub-domain like this:

enter image description here

my domain name is "a.com" and sub-domain name is "api.a.com". I published a service in sub-domain. It works fine on Get requests. but before getting POST request(by api), The application pool of sub-domain stops.

So I installed a debug diagnostic tools on server. I get 5 error after each POST request to sub-domain. here is the analysis result:

enter image description here

after googling I found that w3wp error is for memory leak or when application is trying to access a part of memory that dose not belong. I checked my whole api code, and there was no object without disposing and all of their life-cycle was "PerWebRequest". what's more I used castle Windsor to control life-cycle of all objects, even controllers.

 var container=new WindsorContainer();


and for controllers:

private static void RegisterControllers(IWindsorContainer container)

but as a test I returned a simple string with any code in POST method, (that causes crash) but nothing changed and after sending POST request to web api, It's application pool stopped again.

after all these chekings,I found that sub-domain identities (in application pool) for "api.a.com" is different from other sub-domains like "cdn.a.com" and "test.a.com" .So I published my code to one of this domains and every thing was fine.

after deleting and recreating "api.a.com" identity were changed but application pool of "api.a.com" stopped again.

as more information, Host were installed Plesk and created "a.com" and "api.a.com", and after getting panel,I created 2 other sub-domains: "cdn.a.com" and "test.a.com". But Host says it is not our fault and it is your codes fault!

what do you think:

  1. Is identity important that causes problem?
  2. Can it be server problem Or code problem?
  3. How can fix this problem. because I need api.a.com works.

Some thoughts:

  • Exception 0x0000005 looks like permission denied error.
  • All exceptions are for webdav module, if you don't need it try to switch off it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.