Forms Authentication not working

Discussion in 'Databases' started by rrkky, Jan 11, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Have made all the suggested changes, result is still the same.............

    I have spent days reading every asp.net doc and forumn I can find..............

    I am at wits end with this one......... any other suggestions?

    Could it be something that is missing with my login control?




    <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Yellow Brick Road Tech Login" %>


    <script runat="server">


    Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs)


    End Sub


    </script>


    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


    &amp;nbsp;





    <asp:Login ID="Login1" runat="server" DestinationPageUrl="~/k5/default.aspx" DisplayRememberMe="False"


    Style="position: relative">


    </asp:Login>


    </asp:Content>
     
  2. I have been dealing with the DASP folks for days, and they don't seem to know any more than I do on how to resolve this issue.

    This really should be something simple, so I must be overlooking something. Issue is obviously that my login control is not looking at my SQL 2005 database in Discount ASP, most likely an issue with the web config. I am getting
    "Your login attempt was not successful. Please try again." while using any valid account that is in the database.

    See below for the full TT that I submitted and could not be resolved. Any help is appreciated.





    am running SQL 2005 developer edition, however I have not created a database, I used Visual Web Developer to connect to my database at DASP

    The database info is

    "Data Source=tcp:sql2k505.discountasp.net;Initial Catalog=SQL2005_294046_ybr;User ID=SQL2005_294046_ybr_user;Password=******;"

    password btw is cecelia

    Anyway, when I update my users etc, I can see them in the table both from within Visual Web Developer and via SQL Server Management studio, this would indicate that it is indead updating the tables on my remote SQL database at DASP.

    When I try to log on as any user account I get the error
    Your login attempt was not successful. Please try again.

    I upgraded from SQL Express to SQL 2005 per your previous response, yet this obviously did not resolve the issue.


    My entire web config is below:

    ?xml version="1.0" encoding="utf-8" ?>

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <!--
    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
    -->
    <connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k505.discountasp.net;Initial Catalog=SQL2005_294046_ybr;User ID=SQL2005_294046_ybr_user;Password=******;"/>
    </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.

    Visual Basic options:
    Set strict="true" to disallow all data type conversions
    where data loss can occur.
    Set explicit="true" to force declaration of all variables.
    -->
    <authentication mode="Forms" />
    <roleManager enabled="true" />
    <compilation debug="true" strict="false" explicit="true">
    <assemblies>
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
    <pages>
    <namespaces>
    <clear/>
    <add namespace="System"/>
    <add namespace="System.Collections"/>
    <add namespace="System.Collections.Specialized"/>
    <add namespace="System.Configuration"/>
    <add namespace="System.Text"/>
    <add namespace="System.Text.RegularExpressions"/>
    <add namespace="System.Web"/>
    <add namespace="System.Web.Caching"/>
    <add namespace="System.Web.SessionState"/>
    <add namespace="System.Web.Security"/>
    <add namespace="System.Web.Profile"/>
    <add namespace="System.Web.UI"/>
    <add namespace="System.Web.UI.WebControls"/>
    <add namespace="System.Web.UI.WebControls.WebParts"/>
    <add namespace="System.Web.UI.HtmlControls"/>
    </namespaces>
    </pages>
    <!--
    The <authentication> section enables configuration
    of the security authentication mode used by
    ASP.NET to identify an incoming user.
    -->
    <!--
    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="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
    <error statusCode="403" redirect="NoAccess.htm" />
    <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->
    </system.web>
    <system.net>
    <mailSettings>
    <smtp from="support">
    <network host="smtp.yellowbrickroadtech.com" password="HanksYounger"
    userName="[email protected]" />
    </smtp>
    </mailSettings>
    </system.net>
    </configuration>




    PLEASE HELP ME to resolve this issue. I have been working on it for DAYS on end, I am obviously missing something.



    From: [email protected]
    1/10/2007 3:04:04 PM


    Dear Customer,

    Please try changing the password in your db connection string from ***** to the actual db password.
    Please let us know the exact error message that you are receiving. Please also provide the exact URL and detailed instructions on how we can replicate the error on our end.

    DiscountASP.NET
    The power of ASP.NET for less



    From: [email protected]
    1/10/2007 3:47:26 PM


    Changed the password to actual password

    Still same

    Go to www.yellowbrickroadtech.com

    Click the login

    Login as KoriYounger

    Password cecelia!
     
  3. ...There is of course a lot to getting this to work right and I'd like to help you but can only do so much from here so I'll provide a few insights;


    1) Your web.config authentication section is weak, you should look at the examples at www.asp.net


    i.e., a stronger authentication section would look like this:


    <authentication mode="Forms">
    <forms loginUrl="Default.aspx" protection="Validation" timeout="300"/>
    </authentication>



    2) You shouldcontinue adding this line before your conn string, (as you have):


    <remove name="LocalSqlServer"/>


    3) localhost should be used for the smtp host on DASP accounts.


    i.e.


    <smtp>
    <network host="localhost" port="25" />
    </smtp>


    Salute,


    Mark






    Post Edited (wisemx) : 1/11/2007 12:53:31 PM GMT
     
  4. Hi, Noticed that you have only a LocalSqlServer connection string. Mark
     
  5. Don't know if you've solved this or not, but I've been fighting the same problem for two days. I finally found the answer to my issue in this forum (my thanks to all the help from the posters). If you haven't tried this fix, it may help you also. It's at:


    http://community.discountasp.net/post.aspx?f=16&amp;r=r&amp;m=12381


    It refers to an excellent article on the same problem at Scott's Blog, which step-walks you through the fix and tells you how to avoid it to begin with. That article is at:


    http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx


    Anyway, I hope this helps!


    Take care,


    Lar
     
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