Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Use multiple web.config in one application

Use multiple web.config in one application

Scheduled Pinned Locked Moved ASP.NET
securityquestion
9 Posts 5 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sushant Duggal
    wrote on last edited by
    #1

    Hi Friends, I have two modules in my website. One is user end and other is the admin section. I want to implement form based authentication for both. In the web.config, I set the authentication to "Forms" and mentioned the loginURL i.e. login.aspx which is at root. But when I traverse the admin section pages, it still redirects me to the login of the user end. I want it to redirect to the login page of the administrator (adminLogin.aspx) Can i add a new web.config in admin part?????? If you know the answer ... please reply. Thanks,

    Sushant Duggal.

    _ S R 3 Replies Last reply
    0
    • S Sushant Duggal

      Hi Friends, I have two modules in my website. One is user end and other is the admin section. I want to implement form based authentication for both. In the web.config, I set the authentication to "Forms" and mentioned the loginURL i.e. login.aspx which is at root. But when I traverse the admin section pages, it still redirects me to the login of the user end. I want it to redirect to the login page of the administrator (adminLogin.aspx) Can i add a new web.config in admin part?????? If you know the answer ... please reply. Thanks,

      Sushant Duggal.

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      Yes you can have a separate web.config file for your admin part provided your admin section is in a separate folder.

      Best Regards, Apurva Kaushal

      1 Reply Last reply
      0
      • S Sushant Duggal

        Hi Friends, I have two modules in my website. One is user end and other is the admin section. I want to implement form based authentication for both. In the web.config, I set the authentication to "Forms" and mentioned the loginURL i.e. login.aspx which is at root. But when I traverse the admin section pages, it still redirects me to the login of the user end. I want it to redirect to the login page of the administrator (adminLogin.aspx) Can i add a new web.config in admin part?????? If you know the answer ... please reply. Thanks,

        Sushant Duggal.

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        You can put credentials to each user i.e. user or admin store along with login id and password so that from single login page you can make athentication as well as autherisation

        S 2 Replies Last reply
        0
        • S Sandeep Akhare

          You can put credentials to each user i.e. user or admin store along with login id and password so that from single login page you can make athentication as well as autherisation

          S Offline
          S Offline
          Sushant Duggal
          wrote on last edited by
          #4

          can u tell me how to set the redirect URL for the site admin folder??? it redirects me to the login page of the user section.

          Sushant Duggal.

          P 1 Reply Last reply
          0
          • S Sandeep Akhare

            You can put credentials to each user i.e. user or admin store along with login id and password so that from single login page you can make athentication as well as autherisation

            S Offline
            S Offline
            Sushant Duggal
            wrote on last edited by
            #5

            can u tell me how to set the redirect URL for the site admin folder??? it redirects me to the login page of the user section. I added web.config in the folder, it gives error when i try to change the redirect URL.

            Sushant Duggal.

            1 Reply Last reply
            0
            • S Sushant Duggal

              Hi Friends, I have two modules in my website. One is user end and other is the admin section. I want to implement form based authentication for both. In the web.config, I set the authentication to "Forms" and mentioned the loginURL i.e. login.aspx which is at root. But when I traverse the admin section pages, it still redirects me to the login of the user end. I want it to redirect to the login page of the administrator (adminLogin.aspx) Can i add a new web.config in admin part?????? If you know the answer ... please reply. Thanks,

              Sushant Duggal.

              R Offline
              R Offline
              Ravi Shankar43
              wrote on last edited by
              #6

              Hi sushant, Add new folder to your project, copy all forms related to admin module to that folder, Add another web.config for that folder and make changes according to your requirement. New web.config will override the functionality of rootfolder web.config. D.kiran Kumar reddy

              S 2 Replies Last reply
              0
              • R Ravi Shankar43

                Hi sushant, Add new folder to your project, copy all forms related to admin module to that folder, Add another web.config for that folder and make changes according to your requirement. New web.config will override the functionality of rootfolder web.config. D.kiran Kumar reddy

                S Offline
                S Offline
                Sushant Duggal
                wrote on last edited by
                #7

                Hi Kiran, I did similar to what you said... but i cant add

                again in the web.config which i recently added .. it generates error Thanks for ur further help, Sushant Duggal.

                1 Reply Last reply
                0
                • R Ravi Shankar43

                  Hi sushant, Add new folder to your project, copy all forms related to admin module to that folder, Add another web.config for that folder and make changes according to your requirement. New web.config will override the functionality of rootfolder web.config. D.kiran Kumar reddy

                  S Offline
                  S Offline
                  Sushant Duggal
                  wrote on last edited by
                  #8

                  Hi Kiran, I did similar to what you said... but i cant add

                  again in the web.config which i recently added .. it generates error Thanks for ur further help,

                  Sushant Duggal.

                  1 Reply Last reply
                  0
                  • S Sushant Duggal

                    can u tell me how to set the redirect URL for the site admin folder??? it redirects me to the login page of the user section.

                    Sushant Duggal.

                    P Offline
                    P Offline
                    PavanPareta
                    wrote on last edited by
                    #9

                    Response.Redirect("admin/adminlogin.aspx") :) Cheer

                    Pavan Pareta

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups