IIS 7 - 403 Access Denied error on wwwroot trying to redirect to /owa

Posted by cparker4486 on Server Fault See other posts from Server Fault or by cparker4486
Published on 2010-06-03T17:17:44Z Indexed on 2012/04/08 17:34 UTC
Read the original article Hit count: 432

Filed under:
|

I'm trying to setup a redirect from http://mail.mydomain.com to https://mail.mydomain.com/owa. I've been unsuccessful in doing this by using IIS's HTTP Redirect so I looked to other options. The one I settled on is to create a default document in the wwwroot folder to handle the redirect.

I created a file called index.aspx (and added index.aspx to the list of default documents) and put the following code in it:

<script runat="server">
 private void Page_Load(object sender, System.EventArgs e)
 {
  Response.Status = "301 Moved Permanently";
  Response.AddHeader("Location","https://mail.mydomain.com/owa");
 }
</script>

Instead of getting a redirect I get:

403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied.

I've been trying to find an answer to this but have been unsuccessful so far. One thing I did try was to add the Everyone group to wwwroot with read access. No change.

The AppPool for Default Web Site is DefaultAppPool and the Identity is ApplicationPoolIdentity. (I don't know what these things are but maybe knowing this will help you.)

Thanks!

© Server Fault or respective owner

Related posts about iis7

Related posts about owa