Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3970408
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:04:56+00:00 2026-05-20T04:04:56+00:00

I’ve got a single directory in my ASP.Net website that I need to have

  • 0

I’ve got a single directory in my ASP.Net website that I need to have SSL Enabled. For all other directories, I don’t want SSL Enabled.

Using IIS, I’ve checked the Require secure channel (SS) and 128-bit encryption checkboxes for the folder I want to require SSL.

Now, when a user types in “http://”, for my secure directory, I want to automatically redirect them to “https://”. I’ve tried two approaches, and both have failed.

Approach 1: Change the IIS Custom Errors page for the directory for 403;4 to a URL pointing to : “/Intranet2/SSLRedirect.aspx”. The SSLRedirect will point them to the correct site. When I do that, I get “The specified request cannot be executed from current Application Pool” error, even though the url is a part of the website and I only have one app pool for the entire website (not the DefaultAppPool).

Approach 2: Add a web.config in the directory to overide the 403 error code. Looks like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.web>
        <customErrors defaultRedirect="../Default.aspx" mode="On">
            <error statusCode="403" redirect="../SSLRedirect.aspx" />
        </customErrors>
    </system.web>
</configuration>

But when I make this change, I always get the default 403.4 defined in IIS.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:04:57+00:00Added an answer on May 20, 2026 at 4:04 am

    Approach 1: You appear to be mistaken in thinking that you only have one app pool configured for the entire website. You probably have one for the default site and another for a virtual directory you are working with. Your choices are either :

    a) Reconfigure it so that you really do have only one app pool for the entire site,

    b) Serve the error page out of a directory that is in the same app pool as the page generating the error

    c) Tweak the registry to shut this error off: Set IgnoreAppPoolForCustomErrors to 1 in HKLM\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters . See http://blogs.msdn.com/b/rakkimk/archive/2006/09/01/735684.aspx

    Approach 2: Custom Errors in web.config are only used if asp.net is handling the error. I believe IIS isn’t engaging asp.net handling engine here because the ssl check failed. So this simply won’t work here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I'm trying to create an if statement in PHP that prevents a single post
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.