Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

moving website to new hosting causes "forbidden"

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.

like image 422
renathy Avatar asked Apr 04 '15 13:04

renathy


People also ask

Why would a website come up as forbidden?

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.


Video Answer


1 Answers

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:

  • Either create default document as per default IIS configuration
  • or change IIS configuration to make login.aspx your default document

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.

enter image description here

like image 98
user2316116 Avatar answered Oct 04 '22 20:10

user2316116