Can't publish asp.net2.0 web site

Discussion in 'ASP.NET 2.0' started by saad1200, Apr 28, 2005.

  1. Hi,

    I am having trouble publishing a stock standard web site to the ASP Discount sandbox.
    The error I receive is:
    The Web Server does not appear to have the Frontpage server extensions installed.

    Can anyone please tell me what is wrong? It used to work fine under 2003 so what is so different about 2005?

    http://beta-88745.server1.dotnetsandbox.net/

    Thanks,
    Andrew.
     
  2. This is my code for login.aspx, Welcome.aspx, and web.config. It works on the localhost, but not the server.

    Thanks

    =================================
    Login.aspx
    ----------------



    <%@ Page Language="C#" MasterPageFile="~/login/MasterPage.master"%>


    <script runat="server">





    void Login1_LoggedIn(object sender, EventArgs e)


    {


    this.Session.Add("UserName", this.Login1.UserName);


    }


    </script>


    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">


    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;


    <asp:Login ID="Login1" Runat="server" CreateUserUrl="~/login/CreateUser.aspx" CreateUserText="New User?"


    PasswordRecoveryUrl="~/login/PasswordRecovery.aspx" PasswordRecoveryText="Fogot Your Password?" ForeColor="White"


    Height="153px" Width="244px" DestinationPageUrl="~/login/Welcome.aspx" OnLoggedIn="Login1_LoggedIn" Font-Bold="True">


    </asp:Login></asp:Content>


    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;





    </asp:Content>


    ==============================


    Welcome.aspx


    ------------------------------


    <%@ Page Language="C#" %>


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


    <script runat="server">


    void Page_Load(object sender, EventArgs e)


    {


    this.Session.Add("CompanyId", "1");


    this.Session.Add("UserId","1");


    Response.Redirect("~/LoanOfficer/Default.aspx");





    }


    </script>


    <html xmlns="http://www.w3.org/1999/xhtml" >


    <head runat="server">


    <title>Untitled Page</title>


    </head>





    <form runat=server>


    <asp:DropDownList ID="DropDownList1" Runat="server" DataSourceID="AccessDataSource1" DataTextField="CompanyId" DataValueField="CompanyId">


    </asp:DropDownList>


    </form>


    <asp:AccessDataSource ID="AccessDataSource1" Runat="server" DataFile="~/App_Data/company.mdb"


    SelectCommand="SELECT Employee.CompanyId, Employee.OID FROM (Employee INNER JOIN Person ON Employee.OID = Person.OID) WHERE (Person.UserName = ?)">


    <SelectParameters>


    <asp:SessionParameter Name="UserName" Type="String" SessionField="UserName"></asp:SessionParameter>


    </SelectParameters>


    </asp:AccessDataSource>


    <asp:Label ID="Label1" Runat="server" Text="Label" Width="291px" Height="19px"></asp:Label>


    </body>


    </html>


    ============================


    web.config


    ----------------------





    <!--


    Note: As an alternative to hand editing this file you can use the


    web admin tool to configure settings for your application. Use


    the Website->Asp.Net Configuration option in Visual Studio.


    A full list of settings and comments can be found in


    machine.config.comments usually located in


    \Windows\Microsoft.Net\Framework\v2.x\Config


    -->


    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


    <appSettings/>


    <connectionStrings/>


    <system.web>


    <!--


    Set compilation debug="true" to insert debugging


    symbols into the compiled page. Because this


    affects performance, set this value to true only


    during development.


    -->


    <authentication mode="Forms" />


    <roleManager enabled="true" />


    <compilation debug="true"/>


    <!--


    The <authentication> section enables configuration


    of the security authentication mode used by


    ASP.NET to identify an incoming user.


    -->


    <anonymousIdentification enabled="true" />





    <!--


    The <customErrors> section enables configuration


    of what to do if/when an unhandled error occurs


    during the execution of a request. Specifically,


    it enables developers to configure html error pages


    to be displayed in place of a error stack trace.


    -->


    <customErrors mode="Off">


    <error statusCode="403" redirect="NoAccess.htm"/>


    <error statusCode="404" redirect="FileNotFound.htm"/>


    </customErrors>


    </system.web>


    </configuration>
     
  3. The error you are receiving isof typeSystem.Data.SqlClient.SqlException. I've also noticed your code is calling SqlMembershipProvider as the MembershipProvider.

    Though I do not see where the settings for the sql server or MembershipProvider are in your web.config.

    It sounds like the problem is the server cannot connect to the sql server for the SqlMembershipProvider object.

    My guess is you have SQL installed on localhost in your dev environment, which is why it would work without an error. Though you will have to point (in your web.config) the SqlMembershipProvider to your sql server as well as provide the user and pass to your database for this to work.

    I do not know what is missing from your web.config, you will need to research it.
     
  4. Andrew - VS.NET 2005 is designed to NOT rely on FrontPage extension to function (though it can still connect w/ FP)

    Configure the client to use FTP connection and you should be able to publish.
     
  5. Saad, I think you have a differnet problem than Andrew's. Can you post your code so we can see why the SQLClient is timing out?
     
  6. Regarding Publishing, this is from the VWD Express Help File:


    After developing a Web site, you can deploy it to a Web server for testing (a staging server) or to a server where users can work with the site (a production server). Visual Studio provides the following options for deploying your site:
    • The Copy Web tool, which copies the current Web site directly to the target server.

    • The Publish Web utility, which compiles your Web site into a set of executable files. You can then copy the files using any method you choose to the target server.






      [​IMG]</IMG>Note:

      The Publish Web utility is not available in Visual Web Developer Express Edition.
     

Share This Page