skip to Main Content

I published an aps.net core 2.0 mvc app to a shared web hosting server that uses Plesk as control panel. The app works fine. However, I got the following error message when trying to access the web statistics:

This example.com page can’t be found
No webpage was found for the web address: https://example.com/plesk-stat/webstat/
HTTP ERROR 404

I contacted their support and got the answer “the .net core application settings aren’t allowing the webstats to load. We recommend you consult with an experienced website developer to customize the web.config code accordingly for the website.”, but they don’t know how to configure the web.config file.

I really want to make the webstat to work. Any suggestion will be appreciated.

2

Answers


  1. If URL Rewrite is blocking the access, try adding this string to the <conditions> section of the rule which is affecting webstat page:

    <add input="{REQUEST_URI}" pattern="^/(plesk-stat/webstat)" negate="true" />
    

    If that does nor help, configure failed request tracing to find which exact module is performing a redirect.

    Login or Signup to reply.
  2. Along with changes in the web.config of the ASP.Net Core site itself to send the /plesk-stat/ url to IIS, a web.config must be added in the following directory:

    C:Inetpubvhosts{domain.tld}.pleskstatistics{domain.tld}
    

    (replace {domain.tld} with your domain), with the following contents:

    <configuration>
        <system.webServer>
            <handlers>
                <remove name="aspNetCore" />
            </handlers>
        </system.webServer>
    </configuration>
    

    This has to be done by the hosting provider on the server. Maybe you should contact the support of your hosting provider.

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