IIS - Application doesn't work on second deploy











up vote
0
down vote

favorite












I'm working on a .NET MVC 5 application hosted on IIS.



I have the following problem:
After I deploy the app for the first time it works fine.



But after I make a change to an app and deploy again (or just change Web.config) file application doesn't start (or it does start but goes into infinite loop - I don't know which) and requests to the site take forever (they never get response).
After I restart the IIS application starts again and works fine.
Problem does not happen when debugging on local machine.



Obviously you won't be able to solve my particular problem, I'm just looking into ways how can I diagnose what exactly is causing the issue...










share|improve this question


















  • 1




    Are you turning off the site in iis before you deploy? It would be Wise and logical. And a valid solution.
    – joey
    Nov 20 at 19:36















up vote
0
down vote

favorite












I'm working on a .NET MVC 5 application hosted on IIS.



I have the following problem:
After I deploy the app for the first time it works fine.



But after I make a change to an app and deploy again (or just change Web.config) file application doesn't start (or it does start but goes into infinite loop - I don't know which) and requests to the site take forever (they never get response).
After I restart the IIS application starts again and works fine.
Problem does not happen when debugging on local machine.



Obviously you won't be able to solve my particular problem, I'm just looking into ways how can I diagnose what exactly is causing the issue...










share|improve this question


















  • 1




    Are you turning off the site in iis before you deploy? It would be Wise and logical. And a valid solution.
    – joey
    Nov 20 at 19:36













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm working on a .NET MVC 5 application hosted on IIS.



I have the following problem:
After I deploy the app for the first time it works fine.



But after I make a change to an app and deploy again (or just change Web.config) file application doesn't start (or it does start but goes into infinite loop - I don't know which) and requests to the site take forever (they never get response).
After I restart the IIS application starts again and works fine.
Problem does not happen when debugging on local machine.



Obviously you won't be able to solve my particular problem, I'm just looking into ways how can I diagnose what exactly is causing the issue...










share|improve this question













I'm working on a .NET MVC 5 application hosted on IIS.



I have the following problem:
After I deploy the app for the first time it works fine.



But after I make a change to an app and deploy again (or just change Web.config) file application doesn't start (or it does start but goes into infinite loop - I don't know which) and requests to the site take forever (they never get response).
After I restart the IIS application starts again and works fine.
Problem does not happen when debugging on local machine.



Obviously you won't be able to solve my particular problem, I'm just looking into ways how can I diagnose what exactly is causing the issue...







.net asp.net-mvc iis deployment






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 15:00









mrpyo

1,25311736




1,25311736








  • 1




    Are you turning off the site in iis before you deploy? It would be Wise and logical. And a valid solution.
    – joey
    Nov 20 at 19:36














  • 1




    Are you turning off the site in iis before you deploy? It would be Wise and logical. And a valid solution.
    – joey
    Nov 20 at 19:36








1




1




Are you turning off the site in iis before you deploy? It would be Wise and logical. And a valid solution.
– joey
Nov 20 at 19:36




Are you turning off the site in iis before you deploy? It would be Wise and logical. And a valid solution.
– joey
Nov 20 at 19:36












2 Answers
2






active

oldest

votes

















up vote
1
down vote













You don't give enough info to debug the issue, but it sounds like your app is still running while your trying to deploy it. Disable the app, then deploy and restart should resolve your issue.



Simple builtin solution is to create an ~/App_Offline.htm file in your webroot before updating your app, then remove it after. This will ensure the app domain is killed before you modify its files. See my answer below for more info:



IIS fails to restart with a timeout error






share|improve this answer




























    up vote
    0
    down vote













    I would look inside the Event Viewer, and see where the infinite loop (if that's indeed the problem) is originating.






    share|improve this answer





















    • That's a comment, not an answer.
      – Lex Li
      Nov 20 at 15:55










    • I'm not allowed to comment due to me being a newbie
      – tonycdp
      Nov 20 at 15:55











    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',
    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53395788%2fiis-application-doesnt-work-on-second-deploy%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    You don't give enough info to debug the issue, but it sounds like your app is still running while your trying to deploy it. Disable the app, then deploy and restart should resolve your issue.



    Simple builtin solution is to create an ~/App_Offline.htm file in your webroot before updating your app, then remove it after. This will ensure the app domain is killed before you modify its files. See my answer below for more info:



    IIS fails to restart with a timeout error






    share|improve this answer

























      up vote
      1
      down vote













      You don't give enough info to debug the issue, but it sounds like your app is still running while your trying to deploy it. Disable the app, then deploy and restart should resolve your issue.



      Simple builtin solution is to create an ~/App_Offline.htm file in your webroot before updating your app, then remove it after. This will ensure the app domain is killed before you modify its files. See my answer below for more info:



      IIS fails to restart with a timeout error






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        You don't give enough info to debug the issue, but it sounds like your app is still running while your trying to deploy it. Disable the app, then deploy and restart should resolve your issue.



        Simple builtin solution is to create an ~/App_Offline.htm file in your webroot before updating your app, then remove it after. This will ensure the app domain is killed before you modify its files. See my answer below for more info:



        IIS fails to restart with a timeout error






        share|improve this answer












        You don't give enough info to debug the issue, but it sounds like your app is still running while your trying to deploy it. Disable the app, then deploy and restart should resolve your issue.



        Simple builtin solution is to create an ~/App_Offline.htm file in your webroot before updating your app, then remove it after. This will ensure the app domain is killed before you modify its files. See my answer below for more info:



        IIS fails to restart with a timeout error







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 21 at 1:39









        MisterSmith

        938511




        938511
























            up vote
            0
            down vote













            I would look inside the Event Viewer, and see where the infinite loop (if that's indeed the problem) is originating.






            share|improve this answer





















            • That's a comment, not an answer.
              – Lex Li
              Nov 20 at 15:55










            • I'm not allowed to comment due to me being a newbie
              – tonycdp
              Nov 20 at 15:55















            up vote
            0
            down vote













            I would look inside the Event Viewer, and see where the infinite loop (if that's indeed the problem) is originating.






            share|improve this answer





















            • That's a comment, not an answer.
              – Lex Li
              Nov 20 at 15:55










            • I'm not allowed to comment due to me being a newbie
              – tonycdp
              Nov 20 at 15:55













            up vote
            0
            down vote










            up vote
            0
            down vote









            I would look inside the Event Viewer, and see where the infinite loop (if that's indeed the problem) is originating.






            share|improve this answer












            I would look inside the Event Viewer, and see where the infinite loop (if that's indeed the problem) is originating.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 20 at 15:43









            tonycdp

            214




            214












            • That's a comment, not an answer.
              – Lex Li
              Nov 20 at 15:55










            • I'm not allowed to comment due to me being a newbie
              – tonycdp
              Nov 20 at 15:55


















            • That's a comment, not an answer.
              – Lex Li
              Nov 20 at 15:55










            • I'm not allowed to comment due to me being a newbie
              – tonycdp
              Nov 20 at 15:55
















            That's a comment, not an answer.
            – Lex Li
            Nov 20 at 15:55




            That's a comment, not an answer.
            – Lex Li
            Nov 20 at 15:55












            I'm not allowed to comment due to me being a newbie
            – tonycdp
            Nov 20 at 15:55




            I'm not allowed to comment due to me being a newbie
            – tonycdp
            Nov 20 at 15:55


















            draft saved

            draft discarded




















































            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53395788%2fiis-application-doesnt-work-on-second-deploy%23new-answer', 'question_page');
            }
            );

            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







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'