skip to Main Content

i am trying to publish my API on my web hosting service using PLESK and i DO the following thing below :

  1. Publish The Solution on visual Studio
  2. Zip The Publish folder
  3. Upload on my host
  4. check the connection string and web config file
  5. check the database to ensure be created
  6. enter the url of host and /swagger(i use that for my api) and nothing works
    not even the single line of error

2

Answers


  1. Chosen as BEST ANSWER

    finally i solve the problem by test it on local with the same dll exported to webhost and enable logs for it . it shows the error

    the error was the xml file who created on debug folder nor release and i copy that to release and boom! it works!


  2. First of all, after deployment open your web.config on the host and set stdoutLogEnabled="true".

    Create a "logs" folder nearby and grant permissions to write to this folder from IIS worker account (Either "IIS AppPoolYourApplicationPoolName" or IUSR depending on your server config). Alternatively you can set stdoutLogFile to somewhere else.

    After this restart the web site and you will get a log files with any startup error that is happening here. Most often cases are lack of appsettings.Production.json with all necessary configs or lack of database access, etc.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search