Results 1 to 15 of 15

Thread: Quick IIS question [Resolved]

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Quick IIS question [Resolved]

    I have a virtual directory called "MOUSEPAD", it has no default page. In fact, it has no ASPX page in it.

    When a user requests http://machinename/mousepad, I'd like IIS to send the user to

    http://machinename/mousepad/somefoldername/abc.aspx


    How can I do this?
    Last edited by mendhak; May 19th, 2005 at 11:44 PM.

  2. #2
    Member
    Join Date
    Mar 2005
    Posts
    43

    Re: Quick IIS question

    make a index file and there you redirect your page to the correct folder??
    Or does it have to be the IIS that redirect you?

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Quick IIS question

    I would like it if I could get IIS to do this for me, I had already considered the redirect method.

  4. #4
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Quick IIS question

    Not sure if this is what you are looking for:

    1) Open IIS
    2) Right click your site, go to Properties
    3) On the Document Tab you can add / remove pages to be loaded by default, and also set the order in which they will be looked for


    Hope it helped?

  5. #5

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Quick IIS question

    Tried that, but that allows for a specific page name only, not directories followed by page names.

  6. #6
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Quick IIS question

    oooh....sorry, did not use it myself.

    see you got to type in a page name...not possible to type a path? (like /somefoldername/abc.aspx)?

  7. #7
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622

    Re: Quick IIS question

    Just Type a path like "/mousepad/somefoldername/abc.aspx" for the default document.
    Attached Images Attached Images  
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  8. #8

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Quick IIS question

    Quote Originally Posted by <ABX
    Just Type a path like "/mousepad/somefoldername/abc.aspx" for the default document.
    Strange... I did try this, and tried it again just now to confirm. I am not allowed to put a path in the default document... how did you do it?

    I'm on windows 2003, IIS 6

  9. #9
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622

    Re: Quick IIS question

    It seems that IIS 5.X supports this while IIS6 doesn't. You might try manually editing the metabase, but, I hope, microsoft had a reason for not allowing this in IIS6.
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  10. #10

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Quick IIS question

    How do I manually edit the metabase? I'm willing to try this since this is a test server I'm trying to deploy on.

  11. #11
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622

    Re: Quick IIS question

    First, Open The IIS console.

    Right Click on the IIS Server you want to Edit The Metabase on (generally there is only one)

    Select "Properties"

    Check "Enable Direct Metabase Edit"

    now type in the run menu "notepad C:\Windows\system32\inetsrv\metabase.xml" (or use your favorite xml editor)

    Code:
    <IIsWebVirtualDir	Location ="/LM/W3SVC/1/ROOT/Testing"
    		AccessFlags="AccessRead | AccessScript"
    		AppFriendlyName="Testing"
    		AppIsolated="2"
    		AppRoot="/LM/W3SVC/1/Root/Testing"
    		DefaultDoc="/Folder1/Folder2/Default.aspx"
    		DirBrowseFlags="DirBrowseShowDate | DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension | DirBrowseShowLongDate | EnableDefaultDoc"
    		Path="C:\Websites\Testing"
    	>
    </IIsWebVirtualDir>
    I cant tell you if this works because I don't have IIS6 (damn M$ for not allowing XP to run it!!!)

    Make sure you back up the the Metabase before hand.

    (not sure if an iisreset is required for changes to take place?)


    Why do you want to have IIS do this rather than a Asp.Net Page (IIS should be able to do it)?
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  12. #12

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Quick IIS question

    Excellent. That was good. It worked when I edited the metabase, shame I can't rate you though.

    -Mendhak

  13. #13
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622

    Re: Quick IIS question

    Quote Originally Posted by mendhak
    Excellent. That was good. It worked when I edited the metabase, shame I can't rate you though.

    -Mendhak
    Glad to be of service

    I'm actually surpised that would work, couldn't test it because I don't feel like running W2K3 as desktop.
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  14. #14

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Quick IIS question [Resolved]

    Just a little pointer, for any future searchers:

    DefaultDoc="/Folder1/Folder2/Default.aspx"

    wouldn't work.

    Instead, you should make it

    DefaultDoc="Folder1/Folder2/Default.aspx"

    Note the missing forwardslash.

  15. #15

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Quick IIS question [Resolved]

    Damn... just tried this 'as-is' in Inetmgr, and it worked. I should've been more careful. *slap*

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width