Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

Web site not allowing me to log in

Hi guys/gals, I've developed this really neat web site, works a charm in debug mode, but when I try to log in or create a login it crashes on me. Any ideas ?. The site is http://www.realestaterentals.net.au/ 
0
Netlink2
Asked:
Netlink2
  • 12
  • 5
1 Solution
 
chilternPCCommented:
I can't get it to crash but it does  notcreate an account  keeps telling me the password is not valid.
the problem lies with the asp code /and/or the database checking - but for a proper answer you need to post the code for the form and more information about "the crash"
0
 
Netlink2Author Commented:
The asp code is as follows:

<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" CodeFile="Login.aspx.vb"
      Inherits="Login_aspx" Title="Login" %>

<asp:Content ID="MainContent" ContentPlaceHolderID="Main" runat="server">
      <div id="body">
            <div id="col_main_left">
                  <div id="user_assistance">
                        <a id="content_start"></a>
                        <h3>
                              Help and Other Links</h3>
                <p>
                    Need your Bond and Rent paid to you today, visit</p>
                <p>
                    <a href="http://www.bondloans.com.au"><span style="color: #0000ff">www.bondloans.com.au</span></a></p>
                <p>
                    Low Interest</p>
                <p>
                    <b>Instant Phone approval</b></p>
                <p>
                    $ 500 to $ 5,000 Paid to you today</p>
                <p>
                    Pay out early, no penalties</p>
                <p>
                    No up front fees, Save $$$</p>
                <p>
                    Phone NOW <strong>1300 555 311</strong></p>
                  </div>
            </div>
            <div id="col_main_right">
                  <h2 class="section">
                        Login</h2>
                  <div class="content_right">
                        <asp:Panel ID="AccessNoticePanel" runat="server" EnableViewState="False" Visible="False">
                              <b>New to propetyforrent.com.au? If you want to login youll need to register first,
                        its fast and free.<br />
                        <br />
                        You have accessed a page or feature that requires login information.</b><br />
                              Use the form below to log in using your account information, or <b>
                                    <asp:HyperLink ID="ProtectedPageRegisterLink" runat="server" NavigateUrl="~/Register.aspx">click here to register</asp:HyperLink></b>.<br />
                              <br />
                        </asp:Panel>
                        <asp:Login ID="LoginConrol" runat="server" TitleText="" CssClass="login_box">
                              <TextBoxStyle CssClass="text"></TextBoxStyle>
                        </asp:Login>
                        <p>
                              <asp:HyperLink ID="RegisterLink" runat="server" NavigateUrl="~/Register.aspx">Create an Account</asp:HyperLink></p>
                        <p>
                              <asp:LinkButton ID="ForgotPasswordButton" runat="server" OnClick="ForgotPasswordButton_Click">Forgot Password?</asp:LinkButton>
                        </p>
                        <asp:PasswordRecovery ID="PasswordRecovery" runat="server" Visible="False" UserNameTitleText=""
                              QuestionTitleText="Step 2: Identity Confirmation." UserNameInstructionText="Step 1: Enter your User Name."
                              Width="280px">
                              <TitleTextStyle Font-Bold="True"></TitleTextStyle>
                              <InstructionTextStyle Font-Bold="True"></InstructionTextStyle>
                              <LabelStyle Wrap="False" />
                        </asp:PasswordRecovery>
                        <p>
                              &nbsp;</p>
                        <p>
                              &nbsp;</p>
                        <p>
                              &nbsp;</p>
                        <p>
                              &nbsp;</p>
                        <p>
                              &nbsp;</p>
                  </div>
            </div>
      </div>
</asp:Content>
0
 
Netlink2Author Commented:
The vb code is as follows:

Imports System
Imports System.Web.UI.WebControls

Imports AspNet.StarterKits.Classifieds.BusinessLogicLayer

Partial Class Login_aspx
      Inherits System.Web.UI.Page

      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If (Not Page.IsPostBack) Then
                  AccessNoticePanel.Visible = Not (Request.QueryString("ReturnUrl") Is Nothing)
            Else
                  AccessNoticePanel.Visible = False
            End If
      End Sub

      Protected Sub ForgotPasswordButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ForgotPasswordButton.Click

            Me.PasswordRecovery.Visible = True

      End Sub

      Protected Sub PasswordRecovery_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles PasswordRecovery.Init
            Dim s As SiteSettings = SiteSettings.GetSharedSettings()
            PasswordRecovery.MailDefinition.From = s.SiteEmailFromField
      End Sub

      Protected Sub PasswordRecovery_SendMailError(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SendMailErrorEventArgs) Handles PasswordRecovery.SendMailError
            Dim mailLink As New System.Text.StringBuilder("<a href=""mailto:")
            Try
                  mailLink.Append(SiteSettings.GetSharedSettings().SiteEmailAddress)
            Catch
                  mailLink.Append("#")
            End Try
            mailLink.Append(""">system administrator</a>")
            PasswordRecovery.SuccessText = "A problem occurred sending the email. " & _
                  "Please contact the " & mailLink.ToString() & "."
            e.Handled = True

      End Sub


    Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
        Session("LoginUserName") = LoginConrol.UserName
    End Sub
End Class
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
Netlink2Author Commented:
I believe the code is fine, I think the problem might be in the authentication. Reason being that I noticed asp.net configuration didn't have a working link to the database. So I copied over another working version of the code and it gives the error :
" The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). "
0
 
Netlink2Author Commented:
I tried changing the web.config file (per the following) but that didn't help.
<system.web>
        <authorization>
            <allow roles="site_admin" />
            </authorization>
    </system.web>
0
 
chilternPCCommented:
you say it works in debug mode?
what's the set up that works?
0
 
Netlink2Author Commented:
Change that last post to read
    <authorization>
      <deny users="?" />
      <allow users="*" />
    </authorization>
0
 
Netlink2Author Commented:
It works in debug mode
0
 
Netlink2Author Commented:
The template code also works (all of the time), so I'm back to thinking it could be a coding error.
0
 
Netlink2Author Commented:
But I haven't changed the login.aspx code at all (the code posted above), so I know it's not that.
0
 
chilternPCCommented:
to check the code - make a change that you would see - then upload it - and run it - Its  just incase your code isn't being uploaded proper then see if your change is there.
0
 
Netlink2Author Commented:
When trying to add something to the working database I get the error " Failed to update database "C:\INETPUB\TEST\APP_DATA\CLASSIFIEDSDB.MDF"  because the database is read-only ". I think this might be a clue. How could it be read only ?.
0
 
Netlink2Author Commented:
I added IUSR_servername to the site folder in explorer, I've read other posts relating to this problem in XP, but I'm running 2003 server. Other posts say to add aspuser, but I think this is for IIS 5 because I can't find an aspuser.
0
 
Netlink2Author Commented:
I might start another question because I think this post is getting too long, I'll get back with a final answer.
0
 
Netlink2Author Commented:
I'm going to accept this as an answer because I want to research it more. I still get the same problem. Some of things I did to get further down the track was to delete all files and copy over a fresh set of files. The mdf file wouldn't delete so I restarted the server. It still won't let me log in.
0
 
chilternPCCommented:
the read only  maybe due to copyng it across - try changing the attibutes of the database (right click and click on properties)
0
 
chilternPCCommented:
or its a setting in IIS
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 12
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now