IIS fails to restart with a timeout error
When we're releasing new code to production, we often need to update .cs files in the App_Code directory. Frequently, if there are any users in production (and there are always some, even overnight), we'll get an error message on any application page load:
The assembly 'C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET
Filesroota18f28cea6daf424App_Code.dll' is already loaded in another appdomain.
The only way we've found to get the application to respond again is by restarting IIS. Trouble is, now, that IIS will frequently fail to come back up. We restart IIS by going into the IIS manager, clicking on the server name, and then clicking Restart on the right. The system will think for several seconds, and then give the error:
Timeout error. W3SVC failed to start.
The only solution at that point is to restart the server, which we want to avoid on a production server.
Any ideas on how to troubleshoot the IIS timeout error, or (ideally) how to avoid the "already loaded in another appdomain" error in the first place?
c# asp.net iis timeout
add a comment |
When we're releasing new code to production, we often need to update .cs files in the App_Code directory. Frequently, if there are any users in production (and there are always some, even overnight), we'll get an error message on any application page load:
The assembly 'C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET
Filesroota18f28cea6daf424App_Code.dll' is already loaded in another appdomain.
The only way we've found to get the application to respond again is by restarting IIS. Trouble is, now, that IIS will frequently fail to come back up. We restart IIS by going into the IIS manager, clicking on the server name, and then clicking Restart on the right. The system will think for several seconds, and then give the error:
Timeout error. W3SVC failed to start.
The only solution at that point is to restart the server, which we want to avoid on a production server.
Any ideas on how to troubleshoot the IIS timeout error, or (ideally) how to avoid the "already loaded in another appdomain" error in the first place?
c# asp.net iis timeout
add a comment |
When we're releasing new code to production, we often need to update .cs files in the App_Code directory. Frequently, if there are any users in production (and there are always some, even overnight), we'll get an error message on any application page load:
The assembly 'C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET
Filesroota18f28cea6daf424App_Code.dll' is already loaded in another appdomain.
The only way we've found to get the application to respond again is by restarting IIS. Trouble is, now, that IIS will frequently fail to come back up. We restart IIS by going into the IIS manager, clicking on the server name, and then clicking Restart on the right. The system will think for several seconds, and then give the error:
Timeout error. W3SVC failed to start.
The only solution at that point is to restart the server, which we want to avoid on a production server.
Any ideas on how to troubleshoot the IIS timeout error, or (ideally) how to avoid the "already loaded in another appdomain" error in the first place?
c# asp.net iis timeout
When we're releasing new code to production, we often need to update .cs files in the App_Code directory. Frequently, if there are any users in production (and there are always some, even overnight), we'll get an error message on any application page load:
The assembly 'C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET
Filesroota18f28cea6daf424App_Code.dll' is already loaded in another appdomain.
The only way we've found to get the application to respond again is by restarting IIS. Trouble is, now, that IIS will frequently fail to come back up. We restart IIS by going into the IIS manager, clicking on the server name, and then clicking Restart on the right. The system will think for several seconds, and then give the error:
Timeout error. W3SVC failed to start.
The only solution at that point is to restart the server, which we want to avoid on a production server.
Any ideas on how to troubleshoot the IIS timeout error, or (ideally) how to avoid the "already loaded in another appdomain" error in the first place?
c# asp.net iis timeout
c# asp.net iis timeout
asked Nov 14 '18 at 15:14
Tim WestoverTim Westover
778
778
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
An easier/automatic solution to the above is to use an ~/App_Offline.htm file as part of your deployment process (a feature baked into IIS so WebDeploy can avoid file locking issues).
Modify your deployment process so the first step is to create App_Offline.htm
in the webroot. IIS will detect this file and promptly bring down the app domain - releasing any locks etc. Deploy your application as normal without any locking issues, and when your finished, delete the App_Offline. The next request IIS receives will start the app domain loading your newly deployed version.
Whatever content you place inside the App_Offline.htm file is returned by IIS for all requests until you remove the file.
That is an awesome idea. I didn't know there was such a feature. Thank you!
– Tim Westover
Nov 14 '18 at 23:07
add a comment |
Go to Task Manager --> Processes and manually stop the W3SVC process.
After doing this the process should start normally when restarting IIS
Note: It could also be the Svchost process
Go To Process to find the right svchost to terminate
add a comment |
Try restarting IIS from the command prompt (administrator) using:
iisreset
or
iisreset /stop
and then
iisreset /start
Note: May need to restart the worker process
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53303344%2fiis-fails-to-restart-with-a-timeout-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
An easier/automatic solution to the above is to use an ~/App_Offline.htm file as part of your deployment process (a feature baked into IIS so WebDeploy can avoid file locking issues).
Modify your deployment process so the first step is to create App_Offline.htm
in the webroot. IIS will detect this file and promptly bring down the app domain - releasing any locks etc. Deploy your application as normal without any locking issues, and when your finished, delete the App_Offline. The next request IIS receives will start the app domain loading your newly deployed version.
Whatever content you place inside the App_Offline.htm file is returned by IIS for all requests until you remove the file.
That is an awesome idea. I didn't know there was such a feature. Thank you!
– Tim Westover
Nov 14 '18 at 23:07
add a comment |
An easier/automatic solution to the above is to use an ~/App_Offline.htm file as part of your deployment process (a feature baked into IIS so WebDeploy can avoid file locking issues).
Modify your deployment process so the first step is to create App_Offline.htm
in the webroot. IIS will detect this file and promptly bring down the app domain - releasing any locks etc. Deploy your application as normal without any locking issues, and when your finished, delete the App_Offline. The next request IIS receives will start the app domain loading your newly deployed version.
Whatever content you place inside the App_Offline.htm file is returned by IIS for all requests until you remove the file.
That is an awesome idea. I didn't know there was such a feature. Thank you!
– Tim Westover
Nov 14 '18 at 23:07
add a comment |
An easier/automatic solution to the above is to use an ~/App_Offline.htm file as part of your deployment process (a feature baked into IIS so WebDeploy can avoid file locking issues).
Modify your deployment process so the first step is to create App_Offline.htm
in the webroot. IIS will detect this file and promptly bring down the app domain - releasing any locks etc. Deploy your application as normal without any locking issues, and when your finished, delete the App_Offline. The next request IIS receives will start the app domain loading your newly deployed version.
Whatever content you place inside the App_Offline.htm file is returned by IIS for all requests until you remove the file.
An easier/automatic solution to the above is to use an ~/App_Offline.htm file as part of your deployment process (a feature baked into IIS so WebDeploy can avoid file locking issues).
Modify your deployment process so the first step is to create App_Offline.htm
in the webroot. IIS will detect this file and promptly bring down the app domain - releasing any locks etc. Deploy your application as normal without any locking issues, and when your finished, delete the App_Offline. The next request IIS receives will start the app domain loading your newly deployed version.
Whatever content you place inside the App_Offline.htm file is returned by IIS for all requests until you remove the file.
answered Nov 14 '18 at 21:42
MisterSmithMisterSmith
957611
957611
That is an awesome idea. I didn't know there was such a feature. Thank you!
– Tim Westover
Nov 14 '18 at 23:07
add a comment |
That is an awesome idea. I didn't know there was such a feature. Thank you!
– Tim Westover
Nov 14 '18 at 23:07
That is an awesome idea. I didn't know there was such a feature. Thank you!
– Tim Westover
Nov 14 '18 at 23:07
That is an awesome idea. I didn't know there was such a feature. Thank you!
– Tim Westover
Nov 14 '18 at 23:07
add a comment |
Go to Task Manager --> Processes and manually stop the W3SVC process.
After doing this the process should start normally when restarting IIS
Note: It could also be the Svchost process
Go To Process to find the right svchost to terminate
add a comment |
Go to Task Manager --> Processes and manually stop the W3SVC process.
After doing this the process should start normally when restarting IIS
Note: It could also be the Svchost process
Go To Process to find the right svchost to terminate
add a comment |
Go to Task Manager --> Processes and manually stop the W3SVC process.
After doing this the process should start normally when restarting IIS
Note: It could also be the Svchost process
Go To Process to find the right svchost to terminate
Go to Task Manager --> Processes and manually stop the W3SVC process.
After doing this the process should start normally when restarting IIS
Note: It could also be the Svchost process
Go To Process to find the right svchost to terminate
answered Nov 14 '18 at 15:20
Wojtek TWojtek T
1,435422
1,435422
add a comment |
add a comment |
Try restarting IIS from the command prompt (administrator) using:
iisreset
or
iisreset /stop
and then
iisreset /start
Note: May need to restart the worker process
add a comment |
Try restarting IIS from the command prompt (administrator) using:
iisreset
or
iisreset /stop
and then
iisreset /start
Note: May need to restart the worker process
add a comment |
Try restarting IIS from the command prompt (administrator) using:
iisreset
or
iisreset /stop
and then
iisreset /start
Note: May need to restart the worker process
Try restarting IIS from the command prompt (administrator) using:
iisreset
or
iisreset /stop
and then
iisreset /start
Note: May need to restart the worker process
edited Nov 14 '18 at 15:23
answered Nov 14 '18 at 15:17
BoywithanafroBoywithanafro
49111
49111
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53303344%2fiis-fails-to-restart-with-a-timeout-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown