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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to work multiple web.config files in sub domains?

How to work multiple web.config files in sub domains?

Scheduled Pinned Locked Moved ASP.NET
securityhelptutorialquestion
6 Posts 4 Posters 0 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
    sri_con3
    wrote on last edited by
    #1

    Hi this is Sri, I am working on a online shopping cart project. This project contain three Modules 1 Online Shopping a. Adminb. Vender c. User So I created three sub domains for each Module In domain (online Shopping) root web.conif is set authentication mode as “Forms” loginUrl = “login.aspx” which is in domain root folder default.aspx is the start up page for whole domain which in root folder in my sub domains (Admin,Vender) is also having the login.aspx and default.aspx files My prob is tat when ever Admin or Vender try to log in with respect of their login pages (admin/login.aspx, vender/login.aspx) after authentication is completed they are transferring to root default.aspx page bec it is the startup page for the appdomin But I want to transfer them to their respective home pages(admin/default.aspx, vender/default.aspx) So I have to override the startup page to the appdomain. Is it possible overrideing of start page is yes how? Or is there any alternate solution for this task? pls Help on it sri -- modified at 3:01 Friday 31st March, 2006

    V N 2 Replies Last reply
    0
    • S sri_con3

      Hi this is Sri, I am working on a online shopping cart project. This project contain three Modules 1 Online Shopping a. Adminb. Vender c. User So I created three sub domains for each Module In domain (online Shopping) root web.conif is set authentication mode as “Forms” loginUrl = “login.aspx” which is in domain root folder default.aspx is the start up page for whole domain which in root folder in my sub domains (Admin,Vender) is also having the login.aspx and default.aspx files My prob is tat when ever Admin or Vender try to log in with respect of their login pages (admin/login.aspx, vender/login.aspx) after authentication is completed they are transferring to root default.aspx page bec it is the startup page for the appdomin But I want to transfer them to their respective home pages(admin/default.aspx, vender/default.aspx) So I have to override the startup page to the appdomain. Is it possible overrideing of start page is yes how? Or is there any alternate solution for this task? pls Help on it sri -- modified at 3:01 Friday 31st March, 2006

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      Sri, Check out http://www.4guysfromrolla.com/webtech/110701-1.2.shtml[^] Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
      http://deepakvasudevan.blogspot.com/
      http://deepak.blogdrive.com/

      S 1 Reply Last reply
      0
      • S sri_con3

        Hi this is Sri, I am working on a online shopping cart project. This project contain three Modules 1 Online Shopping a. Adminb. Vender c. User So I created three sub domains for each Module In domain (online Shopping) root web.conif is set authentication mode as “Forms” loginUrl = “login.aspx” which is in domain root folder default.aspx is the start up page for whole domain which in root folder in my sub domains (Admin,Vender) is also having the login.aspx and default.aspx files My prob is tat when ever Admin or Vender try to log in with respect of their login pages (admin/login.aspx, vender/login.aspx) after authentication is completed they are transferring to root default.aspx page bec it is the startup page for the appdomin But I want to transfer them to their respective home pages(admin/default.aspx, vender/default.aspx) So I have to override the startup page to the appdomain. Is it possible overrideing of start page is yes how? Or is there any alternate solution for this task? pls Help on it sri -- modified at 3:01 Friday 31st March, 2006

        N Offline
        N Offline
        nnabuikem
        wrote on last edited by
        #3

        u can direct the user to their various startup pages from the login page. u can use response.redirect to direct the users after authentication. I'll show u a what it could look like: If Not (UserID Is Nothing) And UserID <> "" Then FormsAuthentication.RedirectFromLoginPage(Username.Text, False) If accountSystem.RoleName = "Admin" Then Response.Redirect("../Modules/admin/index.aspx") ElseIf accountSystem.RoleName = "CampBoss" Then Response.Redirect("../Modules/Campboss/") ElseIf accountSystem.RoleName = "Store" Then Response.Redirect("../Modules/store/") End If End If Nnabuikem - MCAD

        S 1 Reply Last reply
        0
        • V Vasudevan Deepak Kumar

          Sri, Check out http://www.4guysfromrolla.com/webtech/110701-1.2.shtml[^] Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
          http://deepakvasudevan.blogspot.com/
          http://deepak.blogdrive.com/

          S Offline
          S Offline
          sri_con3
          wrote on last edited by
          #4

          thanks for tat url its a good one but its not containing the info abt the subdomain web.config task sri

          1 Reply Last reply
          0
          • N nnabuikem

            u can direct the user to their various startup pages from the login page. u can use response.redirect to direct the users after authentication. I'll show u a what it could look like: If Not (UserID Is Nothing) And UserID <> "" Then FormsAuthentication.RedirectFromLoginPage(Username.Text, False) If accountSystem.RoleName = "Admin" Then Response.Redirect("../Modules/admin/index.aspx") ElseIf accountSystem.RoleName = "CampBoss" Then Response.Redirect("../Modules/Campboss/") ElseIf accountSystem.RoleName = "Store" Then Response.Redirect("../Modules/store/") End If End If Nnabuikem - MCAD

            S Offline
            S Offline
            sri_con3
            wrote on last edited by
            #5

            hi, thanks for ur response. in my appdomain i have different login.aspx pages for each user so i dont have to find the user Role name just i have to tranfer the authenicated user to specified aspx page. if u have any solution for it please post it tat will be helpfull for me sri

            S 1 Reply Last reply
            0
            • S sri_con3

              hi, thanks for ur response. in my appdomain i have different login.aspx pages for each user so i dont have to find the user Role name just i have to tranfer the authenicated user to specified aspx page. if u have any solution for it please post it tat will be helpfull for me sri

              S Offline
              S Offline
              sudharsong
              wrote on last edited by
              #6

              why don't you go for a common login page becoz u can redirect according to the user and u can maintain authorisation for every user.that would be eating less resource. with regards, susa

              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