: Force HTTPS using 301 Redirect on IIS7 gets 401.1 Error I've got a site that is using an Execute URL in the 403.4 error page slot that calls a page named forcessl.aspx. Here's the contents
I've got a site that is using an Execute URL in the 403.4 error page slot that calls a page named forcessl.aspx. Here's the contents of the file:
strWork = Replace(strQUERY_STRING, "http", "https")
strWork = Replace(strWork, "403;", "")
strWork = Replace(strWork, "80", "")
strSecureURL = strWork
Response.Write(strSecureURL)
Response.Redirect(strSecureURL)
Catch ex As Exception
End Try
End If
%>
This particular site gets a 401.1 error if is not added to the URL. I have several other sites using the same method that work fine and this one mirrors those in all ways that I can tell (folder permissions, etc). This new site is just a subdomain of the same domain that the other sites are using. The main domain has a wildcard SSL cert.
From Microsoft's documentation, here is the meaning of the errors:
403.4
HTTP Error 403.4 - Forbidden: SSL Is Required To View This Resource
401.1
HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials
More posts by @Karen161
1 Comments
Sorted by latest first Latest Oldest Best
I finally found the solution to this problem.
When setting up the site I had done everything but put the site in the bindings for the domain. I hadn't added the subdomain.mysite.com to the bindings for port 80.
I had forgotten this because since I was forcing everything through port 443 with a rewrite, I didn't think I needed to add it. In digging around for the solution I saw that all the other subdomains were in the bindings and this one wasn't.
A simple little thing caused 6 months of frustration. What was weird is that it worked for some people, but not for others if you tried to access it through HTTPS.
Always learning.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.