Trouble with a subdirectory

Discussion in 'General troubleshooting' started by objester, Oct 18, 2010.

  1. I've written a 4.0 framework web site which contains a content management system in the 'admin' subdirectory. I've set this 'admin' directory as an application starting point in the control panel, and when I publish the web site, I've unchecked the "Allow this precompiled site to be updatable" box.

    The site works fine from the root directory, but when I try to go to the admin directory in a browser, I get the dreaded "This is a marker file generated by the precompilation tool, and should not be deleted!" message instead of my content management system index page.

    Could someone enlighten me as to what I'm doing wrong?

    Thank you for your help!
     
  2. Ray

    Ray

    Do you have a URL and instructions on how I can see this error on my browser?
     
  3. Last edited by a moderator: Oct 14, 2015
  4. Ray

    Ray

    What is http://watch4be.w04.Winhost.com/admin/ suppose to do?

    What are the codes on this page.

    When I view the page source all I get is ---This is a marker file generated by the precompilation tool, and should not be deleted!--

    Are you sure you are coding this right?
     
    Last edited by a moderator: Oct 14, 2015
  5. Ray

    Ray

    In addition to your subdirectory, did you try running this app on your local machine? Did you make sure you uploaded all the necessary files and folders to the subdirectory admin?
     
  6. Yeah, I've uploaded everything from the development directory on my machine. The code works when I run it from localhost, and it looks like this:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="admin_default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    <link href="~/images/style.css" rel="stylesheet" type="text/css" />
    <style>
    body {
    background-image: none;
    background-repeat:repeat-x;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    }
    </style>
    <script language="JavaScript" type="text/javascript">
    function placeFocus() {
    document.forms[0].MainContent_btnLogin.focus();
    }
    </script>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>

    <table>
    <tr>
    <td>

    <table border="0" width="500">
    <tr>
    <td align="center" colspan="3">
    <font face="Verdana" size="5"><strong>WATCH Admin System</strong></font>
    </td>
    </tr>
    <tr>
    <td align="right" width="150">
    <asp:Label ID="lblUserID" runat="server" CssClass="LabelText" Font-Bold="True">User Name:&nbsp;</asp:Label>
    </td>
    <td align="left" width="150">
    <asp:TextBox ID="txtUserID" runat="server" CssClass="TextboxText" Width="128px" TabIndex="1"></asp:TextBox>
    </td>
    <td align="left" width="200">
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUserID" CssClass="ValidatorText" Display="Dynamic" ErrorMessage="User ID is required"></asp:RequiredFieldValidator>
    </td>
    </tr>
    <tr>
    <td align="right">
    <asp:Label ID="lblPassword" runat="server" CssClass="LabelText" Font-Bold="True">Password:&nbsp;</asp:Label>
    </td>
    <td align="left">
    <asp:TextBox ID="txtPassword" runat="server" CssClass="TextboxText" Width="128px" TabIndex="2"
    TextMode="Password"></asp:TextBox>
    </td>
    <td align="left">
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword" CssClass="ValidatorText" Display="Dynamic" ErrorMessage="Password is required"></asp:RequiredFieldValidator>
    </td>
    </tr>
    <tr>
    <td align="right">
    <asp:CheckBox ID="chkSavePassword" runat="server" CssClass="LabelText" TabIndex="3"
    Text="Save my password" />
    </td>
    <td>
    <asp:Button ID="btnLogin" runat="server" CssClass="ButtonText" TabIndex="4" Text="Log In" OnClick="btnLogin_Click" />
    </td>
    <td align="right">
    </td>
    </tr>

    <tr>
    <td colspan="3">
    <asp:Label ID="lblMessage" runat="server" Text="" Font-Bold="True" Visible="False"></asp:Label>
    </td>
    </tr>

    </table>

    </td>
    </tr>
    </table>

    </div>
    </form>
    </body>
    </html>
     
    Last edited by a moderator: Oct 14, 2015
  7. Ray

    Ray

    Can you try making admin a normal folder and not as an application folder. Log into your Winhost control panel go to Site Manager/Application Starting Point and remove "Admin" as an application folder.
     
    Last edited by a moderator: Oct 14, 2015
  8. Wow, that worked! I purposely went in and set it as an application starting point, but apparently I should not have. I was thinking of the pages in the admin folder as a separate application, but actually what I have is one application which just happens to have a subdirectory.

    Thank you for enlightening me! I appreciate your tenacity.
     
  9. Ray is nothing if not tenacious!

    Glad it's working for you.
     

Share This Page