Getting 500 server error on login when hosted on IIS server locally












1















I done with the asp.net-core api application at the back end and using angular-cli for the front end. Everything worked fine on localhost kestrel server or IIS express using Visual studio 2017 but on hosting on IIS locally, I do get the page loaded but its only problem when i try to login I get 500 server error but I dont get any information regarding error. It will be helpful if anybody tells me how to get it working on IIS



I tried to fix by changing some settings on the IIS server but I got no clue or fix.



Please download my source code and try running it https://github.com/abhilashlegend/DatingApp



I expect it to work as in the localhost server on the IIS



error on iis server










share|improve this question




















  • 4





    did you check response tab?

    – Simonare
    Jan 1 at 13:35













  • check the IIS Log and the eventlog on the machine, where IIS runs. Be prepared that your questions will be downvoted as it is poorly provided with code and examples what you tried

    – Falco Alexander
    Jan 1 at 13:36











  • try to attach debugger to IIS process from Visual Studio, it will certainly stop at the exact line where an exception is thrown

    – Karel Frajták
    Jan 1 at 13:37











  • if you are getting a general error message that Internal Server Error then turn on the CustomError in web config of API application

    – Prashant Pimpale
    Jan 1 at 13:40











  • I checked the response tab but there is no data @Simonare

    – Abhilash Narayan
    Jan 1 at 13:55
















1















I done with the asp.net-core api application at the back end and using angular-cli for the front end. Everything worked fine on localhost kestrel server or IIS express using Visual studio 2017 but on hosting on IIS locally, I do get the page loaded but its only problem when i try to login I get 500 server error but I dont get any information regarding error. It will be helpful if anybody tells me how to get it working on IIS



I tried to fix by changing some settings on the IIS server but I got no clue or fix.



Please download my source code and try running it https://github.com/abhilashlegend/DatingApp



I expect it to work as in the localhost server on the IIS



error on iis server










share|improve this question




















  • 4





    did you check response tab?

    – Simonare
    Jan 1 at 13:35













  • check the IIS Log and the eventlog on the machine, where IIS runs. Be prepared that your questions will be downvoted as it is poorly provided with code and examples what you tried

    – Falco Alexander
    Jan 1 at 13:36











  • try to attach debugger to IIS process from Visual Studio, it will certainly stop at the exact line where an exception is thrown

    – Karel Frajták
    Jan 1 at 13:37











  • if you are getting a general error message that Internal Server Error then turn on the CustomError in web config of API application

    – Prashant Pimpale
    Jan 1 at 13:40











  • I checked the response tab but there is no data @Simonare

    – Abhilash Narayan
    Jan 1 at 13:55














1












1








1


2






I done with the asp.net-core api application at the back end and using angular-cli for the front end. Everything worked fine on localhost kestrel server or IIS express using Visual studio 2017 but on hosting on IIS locally, I do get the page loaded but its only problem when i try to login I get 500 server error but I dont get any information regarding error. It will be helpful if anybody tells me how to get it working on IIS



I tried to fix by changing some settings on the IIS server but I got no clue or fix.



Please download my source code and try running it https://github.com/abhilashlegend/DatingApp



I expect it to work as in the localhost server on the IIS



error on iis server










share|improve this question
















I done with the asp.net-core api application at the back end and using angular-cli for the front end. Everything worked fine on localhost kestrel server or IIS express using Visual studio 2017 but on hosting on IIS locally, I do get the page loaded but its only problem when i try to login I get 500 server error but I dont get any information regarding error. It will be helpful if anybody tells me how to get it working on IIS



I tried to fix by changing some settings on the IIS server but I got no clue or fix.



Please download my source code and try running it https://github.com/abhilashlegend/DatingApp



I expect it to work as in the localhost server on the IIS



error on iis server







c# asp.net-core-mvc angular-cli-v6






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 1 at 13:35









Prashant Pimpale

3,46031034




3,46031034










asked Jan 1 at 13:33









Abhilash NarayanAbhilash Narayan

368




368








  • 4





    did you check response tab?

    – Simonare
    Jan 1 at 13:35













  • check the IIS Log and the eventlog on the machine, where IIS runs. Be prepared that your questions will be downvoted as it is poorly provided with code and examples what you tried

    – Falco Alexander
    Jan 1 at 13:36











  • try to attach debugger to IIS process from Visual Studio, it will certainly stop at the exact line where an exception is thrown

    – Karel Frajták
    Jan 1 at 13:37











  • if you are getting a general error message that Internal Server Error then turn on the CustomError in web config of API application

    – Prashant Pimpale
    Jan 1 at 13:40











  • I checked the response tab but there is no data @Simonare

    – Abhilash Narayan
    Jan 1 at 13:55














  • 4





    did you check response tab?

    – Simonare
    Jan 1 at 13:35













  • check the IIS Log and the eventlog on the machine, where IIS runs. Be prepared that your questions will be downvoted as it is poorly provided with code and examples what you tried

    – Falco Alexander
    Jan 1 at 13:36











  • try to attach debugger to IIS process from Visual Studio, it will certainly stop at the exact line where an exception is thrown

    – Karel Frajták
    Jan 1 at 13:37











  • if you are getting a general error message that Internal Server Error then turn on the CustomError in web config of API application

    – Prashant Pimpale
    Jan 1 at 13:40











  • I checked the response tab but there is no data @Simonare

    – Abhilash Narayan
    Jan 1 at 13:55








4




4





did you check response tab?

– Simonare
Jan 1 at 13:35







did you check response tab?

– Simonare
Jan 1 at 13:35















check the IIS Log and the eventlog on the machine, where IIS runs. Be prepared that your questions will be downvoted as it is poorly provided with code and examples what you tried

– Falco Alexander
Jan 1 at 13:36





check the IIS Log and the eventlog on the machine, where IIS runs. Be prepared that your questions will be downvoted as it is poorly provided with code and examples what you tried

– Falco Alexander
Jan 1 at 13:36













try to attach debugger to IIS process from Visual Studio, it will certainly stop at the exact line where an exception is thrown

– Karel Frajták
Jan 1 at 13:37





try to attach debugger to IIS process from Visual Studio, it will certainly stop at the exact line where an exception is thrown

– Karel Frajták
Jan 1 at 13:37













if you are getting a general error message that Internal Server Error then turn on the CustomError in web config of API application

– Prashant Pimpale
Jan 1 at 13:40





if you are getting a general error message that Internal Server Error then turn on the CustomError in web config of API application

– Prashant Pimpale
Jan 1 at 13:40













I checked the response tab but there is no data @Simonare

– Abhilash Narayan
Jan 1 at 13:55





I checked the response tab but there is no data @Simonare

– Abhilash Narayan
Jan 1 at 13:55












2 Answers
2






active

oldest

votes


















2














I fixed the problem go to SQL server management studio and under the database connection you find Security folder -> Logins. Right click and create new login IIS APPPOOLdatingapp
and under user Mapping select the database you want to grant access and select the database membership role db_datareader and db_datawriter and click ok. Restart sql server and iis server and fixed.






share|improve this answer































    0














    From web.config, Just set stdoutLogEnabled="true" and check the aspnetcore log files. You should check the file where stdoutLogFile attribute points.






    share|improve this answer
























    • Where are the log files generated?

      – Abhilash Narayan
      Jan 1 at 13:54











    • You can specify where the log files will be created but standart configuration is like below <aspNetCore requestTimeout="00:07:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" **stdoutLogFile=".logsstdout"** />

      – Soyhan Beyazıt
      Jan 1 at 13:55













    • I am getting this error :Login failed for user 'IIS APPPOOLdatingapp'. Reason: Failed to open the explicitly specified database 'DatingAppLovSolDb'. [CLIENT: <local machine>]

      – Abhilash Narayan
      Jan 1 at 16:03











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


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53995867%2fgetting-500-server-error-on-login-when-hosted-on-iis-server-locally%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









    2














    I fixed the problem go to SQL server management studio and under the database connection you find Security folder -> Logins. Right click and create new login IIS APPPOOLdatingapp
    and under user Mapping select the database you want to grant access and select the database membership role db_datareader and db_datawriter and click ok. Restart sql server and iis server and fixed.






    share|improve this answer




























      2














      I fixed the problem go to SQL server management studio and under the database connection you find Security folder -> Logins. Right click and create new login IIS APPPOOLdatingapp
      and under user Mapping select the database you want to grant access and select the database membership role db_datareader and db_datawriter and click ok. Restart sql server and iis server and fixed.






      share|improve this answer


























        2












        2








        2







        I fixed the problem go to SQL server management studio and under the database connection you find Security folder -> Logins. Right click and create new login IIS APPPOOLdatingapp
        and under user Mapping select the database you want to grant access and select the database membership role db_datareader and db_datawriter and click ok. Restart sql server and iis server and fixed.






        share|improve this answer













        I fixed the problem go to SQL server management studio and under the database connection you find Security folder -> Logins. Right click and create new login IIS APPPOOLdatingapp
        and under user Mapping select the database you want to grant access and select the database membership role db_datareader and db_datawriter and click ok. Restart sql server and iis server and fixed.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 1 at 16:33









        Abhilash NarayanAbhilash Narayan

        368




        368

























            0














            From web.config, Just set stdoutLogEnabled="true" and check the aspnetcore log files. You should check the file where stdoutLogFile attribute points.






            share|improve this answer
























            • Where are the log files generated?

              – Abhilash Narayan
              Jan 1 at 13:54











            • You can specify where the log files will be created but standart configuration is like below <aspNetCore requestTimeout="00:07:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" **stdoutLogFile=".logsstdout"** />

              – Soyhan Beyazıt
              Jan 1 at 13:55













            • I am getting this error :Login failed for user 'IIS APPPOOLdatingapp'. Reason: Failed to open the explicitly specified database 'DatingAppLovSolDb'. [CLIENT: <local machine>]

              – Abhilash Narayan
              Jan 1 at 16:03
















            0














            From web.config, Just set stdoutLogEnabled="true" and check the aspnetcore log files. You should check the file where stdoutLogFile attribute points.






            share|improve this answer
























            • Where are the log files generated?

              – Abhilash Narayan
              Jan 1 at 13:54











            • You can specify where the log files will be created but standart configuration is like below <aspNetCore requestTimeout="00:07:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" **stdoutLogFile=".logsstdout"** />

              – Soyhan Beyazıt
              Jan 1 at 13:55













            • I am getting this error :Login failed for user 'IIS APPPOOLdatingapp'. Reason: Failed to open the explicitly specified database 'DatingAppLovSolDb'. [CLIENT: <local machine>]

              – Abhilash Narayan
              Jan 1 at 16:03














            0












            0








            0







            From web.config, Just set stdoutLogEnabled="true" and check the aspnetcore log files. You should check the file where stdoutLogFile attribute points.






            share|improve this answer













            From web.config, Just set stdoutLogEnabled="true" and check the aspnetcore log files. You should check the file where stdoutLogFile attribute points.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 1 at 13:41









            Soyhan BeyazıtSoyhan Beyazıt

            3415




            3415













            • Where are the log files generated?

              – Abhilash Narayan
              Jan 1 at 13:54











            • You can specify where the log files will be created but standart configuration is like below <aspNetCore requestTimeout="00:07:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" **stdoutLogFile=".logsstdout"** />

              – Soyhan Beyazıt
              Jan 1 at 13:55













            • I am getting this error :Login failed for user 'IIS APPPOOLdatingapp'. Reason: Failed to open the explicitly specified database 'DatingAppLovSolDb'. [CLIENT: <local machine>]

              – Abhilash Narayan
              Jan 1 at 16:03



















            • Where are the log files generated?

              – Abhilash Narayan
              Jan 1 at 13:54











            • You can specify where the log files will be created but standart configuration is like below <aspNetCore requestTimeout="00:07:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" **stdoutLogFile=".logsstdout"** />

              – Soyhan Beyazıt
              Jan 1 at 13:55













            • I am getting this error :Login failed for user 'IIS APPPOOLdatingapp'. Reason: Failed to open the explicitly specified database 'DatingAppLovSolDb'. [CLIENT: <local machine>]

              – Abhilash Narayan
              Jan 1 at 16:03

















            Where are the log files generated?

            – Abhilash Narayan
            Jan 1 at 13:54





            Where are the log files generated?

            – Abhilash Narayan
            Jan 1 at 13:54













            You can specify where the log files will be created but standart configuration is like below <aspNetCore requestTimeout="00:07:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" **stdoutLogFile=".logsstdout"** />

            – Soyhan Beyazıt
            Jan 1 at 13:55







            You can specify where the log files will be created but standart configuration is like below <aspNetCore requestTimeout="00:07:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" **stdoutLogFile=".logsstdout"** />

            – Soyhan Beyazıt
            Jan 1 at 13:55















            I am getting this error :Login failed for user 'IIS APPPOOLdatingapp'. Reason: Failed to open the explicitly specified database 'DatingAppLovSolDb'. [CLIENT: <local machine>]

            – Abhilash Narayan
            Jan 1 at 16:03





            I am getting this error :Login failed for user 'IIS APPPOOLdatingapp'. Reason: Failed to open the explicitly specified database 'DatingAppLovSolDb'. [CLIENT: <local machine>]

            – Abhilash Narayan
            Jan 1 at 16:03


















            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53995867%2fgetting-500-server-error-on-login-when-hosted-on-iis-server-locally%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

            Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

            ts Property 'filter' does not exist on type '{}'

            mat-slide-toggle shouldn't change it's state when I click cancel in confirmation window