Switching from http to https and back

Discussion in 'ASP .Net' started by Mark Rae, Jan 5, 2006.

  1. Mark Rae

    Mark Rae Guest

    Hi,

    I'm presently upgrading a v1.1 ASP.NET app to v2. Parts of site run under
    SSL and parts don't, and the site uses this code:

    http://www.codeproject.com/aspnet/WebPageSecurity.asp

    to switch between them - works perfectly.

    Setting up which files and/or folders need to run under https is a simple
    matter of adding some web.config settings. The code appears to run perfectly
    well under v2, but gives lots of warnings when the site is compiled. The
    relevant settings in web.config are as follows:

    <?xml version="1.0"?>
    <configuration>
    <configSections>
    <section name="secureWebPages"
    type="Hyper.Web.Security.SecureWebPageSectionHandler, WebPageSecurity"
    allowLocation="false"/>
    </configSections>
    <secureWebPages>
    <directory path="security"/>
    </secureWebPages>
    <system.web>
    <httpModules>
    <add name="SecureWebPage"
    type="Hyper.Web.Security.SecureWebPageModule, WebPageSecurity"/>
    </httpModules>
    </system.web>
    </configuration>

    The warnings messages are:

    Could not find schema information for the element 'secureWebPages'.
    Could not find schema information for the element 'directory'.
    Could not find schema information for the attribute 'path'.

    As I said, the assembly appears to work perfectly under v2 of the Framework,
    so:

    1) Do I need to be concerned about the warning messages?

    2) Is there a way to specify the settings in web.config which the assembly
    needs which will not generate the warning messages?

    3) There doesn't appear to be a v2 version of the assembly available, but is
    there a "native" v2 way of achieving the same functionality?

    Any assistance gratefully received.

    Mark
    Mark Rae, Jan 5, 2006
    #1
    1. Advertising

  2. Mark,

    I'm afraid that I don't know how to eliminate the warnings, but (and anyone
    please correct me if I'm wrong) I don't think you need to worry about them.

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche
    "Mark Rae" <> wrote in message
    news:%...
    > Hi,
    >
    > I'm presently upgrading a v1.1 ASP.NET app to v2. Parts of site run under
    > SSL and parts don't, and the site uses this code:
    >
    > http://www.codeproject.com/aspnet/WebPageSecurity.asp
    >
    > to switch between them - works perfectly.
    >
    > Setting up which files and/or folders need to run under https is a simple
    > matter of adding some web.config settings. The code appears to run
    > perfectly well under v2, but gives lots of warnings when the site is
    > compiled. The relevant settings in web.config are as follows:
    >
    > <?xml version="1.0"?>
    > <configuration>
    > <configSections>
    > <section name="secureWebPages"
    > type="Hyper.Web.Security.SecureWebPageSectionHandler, WebPageSecurity"
    > allowLocation="false"/>
    > </configSections>
    > <secureWebPages>
    > <directory path="security"/>
    > </secureWebPages>
    > <system.web>
    > <httpModules>
    > <add name="SecureWebPage"
    > type="Hyper.Web.Security.SecureWebPageModule, WebPageSecurity"/>
    > </httpModules>
    > </system.web>
    > </configuration>
    >
    > The warnings messages are:
    >
    > Could not find schema information for the element 'secureWebPages'.
    > Could not find schema information for the element 'directory'.
    > Could not find schema information for the attribute 'path'.
    >
    > As I said, the assembly appears to work perfectly under v2 of the
    > Framework, so:
    >
    > 1) Do I need to be concerned about the warning messages?
    >
    > 2) Is there a way to specify the settings in web.config which the assembly
    > needs which will not generate the warning messages?
    >
    > 3) There doesn't appear to be a v2 version of the assembly available, but
    > is there a "native" v2 way of achieving the same functionality?
    >
    > Any assistance gratefully received.
    >
    > Mark
    >
    S. Justin Gengo, Jan 6, 2006
    #2
    1. Advertising

  3. Mark Rae

    Mark Rae Guest

    "S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
    message news:elVM%...

    > I'm afraid that I don't know how to eliminate the warnings, but (and
    > anyone please correct me if I'm wrong) I don't think you need to worry
    > about them.


    Thanks for that - like I said, my initial testing shows that it works
    perfectly in v2 despite the warnings from VS.NET 2005.

    I'd still be interested to know if there's a different / better way of
    achieving this in ASP.NET 2...
    Mark Rae, Jan 6, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerry III

    Re: Switching Between HTTP and HTTPS

    Jerry III, Oct 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    924
    Jerry III
    Oct 15, 2003
  2. Hemant

    switching between https and http

    Hemant, Sep 16, 2009, in forum: ASP .Net
    Replies:
    0
    Views:
    281
    Hemant
    Sep 16, 2009
  3. Tony Wright

    Switching between http and https popping up a login box

    Tony Wright, May 28, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    115
    Tony Wright
    May 28, 2004
  4. CS

    Switching between http and https

    CS, Apr 29, 2005, in forum: ASP .Net Security
    Replies:
    1
    Views:
    150
    Jason Brown [MSFT]
    Apr 29, 2005
  5. MattC
    Replies:
    1
    Views:
    121
Loading...

Share This Page