Which folders should I setup as web applications?

Discussion in 'ASP.NET / ASP.NET Core' started by ultimatebra, Jan 29, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I had a couple of questions I was hoping someone could help me with.

    1) In the Web Application Tool, it allows you to setup a folder as a web application. My site is coded in ASP.NET 1.1 so I have a "bin" folder and then several other folders which house the .aspx files. Which folders should I setup as web applications? Just the "bin" folder?

    2) My site does not seem to be finding either my images or my .css file. I assume I have the wrong path in my code, how would I correct that?

    3) When a user types in www.mysite.com i want it to redirect to www.mysite.com/login/userloginpage.aspx. I couldn't seem to make this work with the Default Documents tab in IIS manager. How would I do this?

    thanks.

    Post Edited By Moderator (mjp [DASP]) : 1/30/2008 1:30:46 AM GMT
     
  2. 1)Your root has an application by default, the application pool.
    Your Bin folder should never need an application.
    You can create applications in your DASP Control Panel as needed.


    2) What is the path to your images?
    This would be a working example:
    body
    {
    background-image: url(assets/bcg.jpg);
    background-color: #000000;
    }


    3) You'll have to redirect from a code page or your web.config
     
  3. Thanks, wisemx.

    I am using something similar to this in my code to get the path to my style sheet.

    m_rootUrl = Page.Request.ApplicationPath + '/';

    //Add link to the stylesheet
    this.Controls.Add(new LiteralControl('<link href=''
    + m_rootUrl + 'layout.css'
    + '' type='text/css' rel='stylesheet'>'));

    Should I use a different path for the m_rootUrl?
     
  4. There's an easier way to use a virtual path with Master pages and CSS.

    Use your App_Themes folder then link the CSS in your Master page like this:

    <link href="App_Themes/sdknuts/sdknuts.css" rel="stylesheet" type="text/css" />

    Then on pages using that Master page and CSSdo this:

    <%@ PageMasterPageFile="~/MasterPage.master"%>
    <%@ MasterType VirtualPath="~/MasterPage.master" %>

    I've found that to work better than other virtual methods I've tested.
     
  5. Gosh, I really didn't like v1.1 at all so all I can say is please, pretty please, upgrade soon. [​IMG]
     
  6. thanks, and i have used that before. unfortunately, i'm using asp.net version 1.1 for this site. thoughts for this case?
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page