locked
Serve files from a specific folder / Change Web root folder RRS feed

  • Question

  • User-483481931 posted

    Hello,

    i'm quite new to ASP.net and IIS and everything Smile.

    Right now i'm facing this problem:

    I want to move my aspx file to a folder named "web" and that the IIS takes the files from this folder, but servers them under

    http://myfancyname.com/ and not http://myfancyname.com/web/ 

    I thought that this is possible in the web.config file, but was not able to find a solution so far.

    Any hints?

    Thanks so far! :-)

    Best,

    Markus

    Friday, March 11, 2016 1:33 PM

All replies

  • User-2057865890 posted

    Hi Markus,

    You could create a virtual directory by using IIS Manager.

    1.Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).

    2.In the Connections pane, expand the Sites node in the tree, and then click to select the site in which you want to create a virtual directory.

    3.In the Actions pane, click View Virtual Directories.

    4.On the Virtual Directories page, in the Actions pane, click Add Virtual Directory.

    5.In the Add Virtual Directory dialog box, type a name in the Alias text box. This alias is used to access the content from a URL.

    6.In the Physical path text box, type the physical path of the content folder, or click Browse to navigate through the file system to find the folder.

    7.Optionally, click Connect as to specify credentials that have permission to access the physical path. If you do not use specific credentials, select the Application user (pass-through authentication) option in the Connect As dialog box.

    8.Optionally, click Test Settings to verify the settings that you specified for the virtual directory.

    9.Click OK.

    reference:

    #Create a Virtual Directory

    https://technet.microsoft.com/en-us/library/cc771804(v=ws.10).aspx

    By the way, Please consider postinig IIS related questions to http://forums.iis.net/.
    You may get quicker and better responses there.

    Best Regards,

    Chris Zhao

    Tuesday, March 15, 2016 9:27 AM
  • User-483481931 posted

    Thank you Chris for your reply. I asked in this section, as i was looking for an option to change the root folder in web.config and not in IIS. 

    But now i guess: it is not possible.

    Thanks again and all the best,

    Markus

    Wednesday, March 16, 2016 4:29 PM