Reputation: 1163
My server for hosting my websites and domains is Godaddy. I bought a service that let me to add different domains in one host. It is working properly and the host is established Plesk. It uses one of my domains as the primary ones and others are relating to this primary domain somehow. My primary website is implemented by ASP.Net MVC
The problem starts when I received an email alerting for 5xx error in my google console for a URL that is not one of my URLs. It was a creation of what I have in my root something like this :
www.My primary domain.com/name one of the folders in my host available in the root/one of the pages in views folder
(The primary website implemented with ASP.net MVC).
And I went through it and I found that there is many strange behaviour there. Here is my scenario:
www.my primary domain.com ----> works fine
www.my primary domain.com/a random text ----> The resource cannot be found.HTTP 404. The resource you are looking for....
www.my primary domain.com/name of a folder in my root --->Configuration Error. An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.Source File: G:\PleskVhosts\my primary domain.com\httpdocs\foldername\web.config Line: 9
www.my primary domain.com/some other folder names like content or fonts or Scripts----> 403 - Forbidden: Access is denied.
and the last one has me confused and surprised.
www.my primary domain.com/name of a folder that I create a test web project on it ---> it shows in browser properly
I cannot understand all these confused behaviour. How can I resolve these kinds of behaviours?
Upvotes: 0
Views: 334
Reputation: 1520
www.my primary domain.com/a random text ----> The resource cannot be found.HTTP 404. The resource you are looking for.
the above is good - that is throwing a 404 for something not found which make sense.
www.my primary domain.com/name of a folder in my root --->Configuration Error. An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.Source File: G:\PleskVhosts\my primary domain.com\httpdocs\foldername\web.config Line: 9
also very good. You have an error occurring and asp.net will not display that error to users visiting your site by default. in order to view this error you can enable remote viewing of errors in the web.config file.
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
www.my primary domain.com/some other folder names like content or fonts or Scripts----> 403 - Forbidden: Access is denied.
a user permission problem. The web user does not have permission to access these folders on the server. I am not familiar with plesk and not sure if you can control that but this is the reason you would throw this exception.
and the last one i cannot say why it is working. It must not be hitting whatever exception you are throwing above. But if you enable viewing of your errors remotely you should see what is failing and be able to troubleshoot.
Upvotes: 1