I am moving website from one hosting server to another hosting server. I have uploaded files. I am using forms authentification. Basically, I am moving to GoDaddy.
I can access login form directly: www.mysite.com/login.aspx
However, when I open www.mysite.com
it shows
Forbidden
You do not have permission to access this document.
What can cause this problem? Which files do not have permissions? Should I modify web.config
or anything else?
I am using asp.net version 3.5.
You might encounter the 403 forbidden error when you visit an empty website directory or a specific page that has a permission error. This is because most websites are set up to disallow directory browsing to prevent attackers from accessing sensitive files.
Problem:
IIS has configuration for default document, which is typically default.htm, default.aspx, etc. but not login.aspx. If site has no default document in the root folder and directory browsing feature is disabled you will get the Forbidden message.
Solution:
To create default document, add a new file, name it as default.htm and copy to the root directory of your site
<html>
<head>
<meta http-equiv="REFRESH" content="0;url=login.aspx">
</head>
<body></body>
</html>
To change IIS configuration, go to your hosting settings panel and find Web Server Settings feature where you could add login.aspx to the list of default documents for your account.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With