« Previous Next »

Thread: default page not working in iis 7.0 with asp.net

Last post 04-17-2008 11:26 AM by Rovastar. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 04-17-2008, 9:58 AM

    • elburs
    • Not Ranked
    • Joined on 01-21-2008, 5:11 PM
    • Posts 3

    default page not working in iis 7.0 with asp.net

    Hello,

    I created a site in IIS7.0, my root directory is C:\MyWebSite

    So the web.config file of my asp.Net is in C:\MyWebSite

    But i want that the users access my application by just entering http://IPAdress/

    So i configured the defaultDocuments so that a default.aspx will be accessed without naming it in the URL

    But the defaults.aspx is in a directory C:\MyWebSite\Forms\

    and after configuring iis it works well, if i tape http://IPAdress/ i am redirected on the default.aspx

    The problem is when i click a button of this page, it postbacks the page but iis thinks its on http://IPAdress/ and not http://IPAdress/Forms/Default.aspx

    the question is : can we configured a default document which is not on the root directory

  • 04-17-2008, 10:45 AM In reply to

    Re: default page not working in iis 7.0 with asp.net

    You cannot have paths in default documents in IIS (I am pretty sure 7 will have this behaviour too)

    Why would you want to?

    Why not just make the starting directory for the site.

    c:\mywebsite\forms\

     

  • 04-17-2008, 11:10 AM In reply to

    • elburs
    • Not Ranked
    • Joined on 01-21-2008, 5:11 PM
    • Posts 3

    Re: default page not working in iis 7.0 with asp.net

    Yes we can have paths in iis7 it works

    i put "Forms/Default.aspx" as default document as i already said and its ok

    but its when i post back the page that the error occures

    and how tell iis to make the starting directory for the site c:\mywebsite\forms\ without changing my architecture with web.config at root

     

  • 04-17-2008, 11:26 AM In reply to

    Re: default page not working in iis 7.0 with asp.net

    Sorry I misunderstood not used IIS 7 much at all.

    And I made a mistake too as in IIS 6 you can have paths but not in IIS 5. I remember something about paths not working it was a long time ago! I so rarely go down levels for a default page as if you change the starting dir it will mess up the whole thing. Much cleaner to have as it in the same default path.

    Ummh not sure what to suggest. 

Page 1 of 1 (4 items)
Microsoft Communities