Sub Domain Help

Discussion in 'ASP.NET 2.0' started by rocketdog, Sep 4, 2007.

  1. Hi All

    I just added on 'unlimited' subdomains as an option. I read the knowledge base article and a couple of questions here in the forums,
    but I can't seem to get things to work.

    I created adirectory named 'demo' to show a client a design idea.

    I put the following code in:
     
  2. Try inputting it as Server.Mappath.
     
  3. Hi rcp


    Thank youfor answering.


    I tried using server.mappathbut itdidn't change the outcome. It seems a bit stubborn.[​IMG]


    I'm not sure what to try next.


    Do i need to tell iis there's an application in the folder?
     
  4. Why don't you just use Response.Redirect('/demo/Default.aspx')?

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    You actually don't want to use mappath. Mappath function will give you the physical path, ie. e:\web\something\something.

    Try this

    Dim str As String = "/demo/Default.aspx"

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  6. Hi All

    Thanks for all your replies.

    Bruce, I made the change you suggested - well, here's the error that pops




    Server Error in '/' Application.


    Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

    Source Error:





    Code:
    Line 49:             ASP.NET to identify an incoming user. 
    Line 50:         -->
    Line 51:         <authentication mode="Windows" />
    Line 52:         <!--
    Line 53:             The <customErrors> section enables configuration 
    Source File: E:\web\rocketdogwe\htdocs\demo\web.config Line: 51


    I'm not exactly sure what it's looking for? Any Ideas............</CODE>
     
  7. Okay[​IMG], Finally figured this thing out

    The code you guys had was right on the money!

    However, I needed to use the web application tool (from control panel)to have iis recognizemy newdirectory as an application and PRESTO! it's up!

    So for all you noob's out there (like me), don't forget to use the web ap tool (and save yourself a lot of aggrevation). Just click on thedirectory in the root you created for your subdomain and click 'install application'.

    CYA
     

Share This Page