HELP!!!!!!!!!! MEMBERSHIP/ROLES(CAN'T USE LOGIN ACCOUNT ON HOST SERVER BUT WORKS ON LOCAL HOST)

Discussion in 'Databases' started by Dipset, May 8, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. here below is the source code of my ''login' page

    <%@ Page Language='VB' MasterPageFile='~/Romiwa.master' Title='Dicon - Admin Login Page' %>


    <asp:Content ID='Content1' ContentPlaceHolderID='ContentPlaceHolder1' Runat='Server'>
    <div class='fullwidth' style='width: 611px; height: 100px; margin-left: 130px; position: absolute; top: 366px;'>
    <table style='border-right: #ccffff thin solid; border-top: #ccffff thin solid; border-left: #ccffff thin solid;
    width: 709px; border-bottom: #ccffff thin solid; background-color: #009900; height: 156px; margin-top: 0px;'>
    <tr>
    <td style='width: 100px; height: 61px;'>
    <asp:Login ID='Login1' runat='server' DestinationPageUrl='~/READ/All_Products_Items.aspx'
    FailureText='Your login attempt was not successful, Please try again.' Height='122px'
    MembershipProvider='AspNetSqlMembershipProvider' Style='color: #339966' Width='280px'>
    <LayoutTemplate>
    <table border='0' cellpadding='1' cellspacing='0' style='width: 388px; border-collapse: collapse'>
    <tr>
    <td style='width: 469px; height: 170px;'>
    <table border='0' cellpadding='0' style='width: 615px; height: 107px'>
    <tr>
    <td align='center' colspan='2' style='font-weight: bold; font-size: 11px; color: #339966'>
    <span style='color: #ffffff'>
    </span></td>
    </tr>
    <tr>
    <td align='right' style='width: 192px'>

    <asp:Label ID='UserNameLabel' runat='server' AssociatedControlID='UserName' Font-Size='12px'
    ForeColor='#0000C0' Style='color: #ffffff' Width='84px'>User Name:</asp:Label></td>
    <td style='width: 159px'>
    <asp:TextBox ID='UserName' runat='server' Height='21px' Width='229px' style='color: #006600'></asp:TextBox>
    <asp:RequiredFieldValidator ID='UserNameRequired' runat='server' ControlToValidate='UserName'
    ErrorMessage='User Name is required.' ToolTip='User Name is required.' ValidationGroup='Login1'>*</asp:RequiredFieldValidator>
    </td>
    </tr>
    <tr>
    <td align='right' style='width: 192px'>
    <asp:Label ID='PasswordLabel' runat='server' AssociatedControlID='Password' Font-Names='Tahoma'
    Font-Size='12px' ForeColor='#0000C0' Style='color: #ffffff'>Password:</asp:Label></td>
    <td style='width: 159px'>
    <asp:TextBox ID='Password' runat='server' Height='22px' TextMode='Password' Width='229px' style='color: #006600'></asp:TextBox>
    <asp:RequiredFieldValidator ID='PasswordRequired' runat='server' ControlToValidate='Password'
    ErrorMessage='Password is required.' ToolTip='Password is required.' ValidationGroup='Login1'>*</asp:RequiredFieldValidator>
    </td>
    </tr>
    <tr>
    <td colspan='2'>


    <asp:CheckBox ID='RememberMe' runat='server' Font-Names='Tahoma' Font-Size='12px'
    ForeColor='#0000C0' Style='color: #ffffff' Text='Remember me next time.' />



    <asp:Button ID='LoginButton' runat='server' CommandName='Login' ForeColor='Green'
    Height='22px' Text='Log In' ToolTip='Click here to login' ValidationGroup='Login1'
    Width='63px' /></td>
    </tr>
    <tr>
    <td align='center' colspan='2' style='font-size: 11px; color: red; font-family: Tahoma;
    height: 13px'>
    <asp:Literal ID='FailureText' runat='server' EnableViewState='False'></asp:Literal>
    </td>
    </tr>
    <tr>
    <td align='right' colspan='2' style='height: 3px'>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </LayoutTemplate>
    <FailureTextStyle Font-Names='Tahoma' />
    </asp:Login>
    </td>
    </tr>
    </table>


    </div>







    </asp:Content>


    here also is the source code of one of the web forms that uses the connection string. this pages can only be viewed by users in the roles i created.

    <%@ Page Language='VB' MasterPageFile='~/Romiwa.master' Title='Dicon - Search Products/Items' %>




    <script runat='server'>
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    GridSqlDataSource2.SelectParameters('DESIGNATION').DefaultValue = _
    '%' + DropDownList1.Text + '%'
    End Sub

    </script>

    <asp:Content ID='Content1' ContentPlaceHolderID='ContentPlaceHolder1' Runat='Server'>
    <div class='fullwidth' style='width: 607px; margin-left: 130px;'>
    <table style='width: 711px; border-right: #ccffff thin solid; border-top: #ccffff thin solid; border-left: #ccffff thin solid; border-bottom: #ccffff thin solid; background-color: #339966;'>
    <tr>
    <td style='width: 125px'>
    <strong><span style='color: #ffffff; font-family: Nina'>Choose Product/Item
    :</span></strong></td>
    <td style='width: 100px'>

    <asp:DropDownList ID='DropDownList1' runat='server' DataSourceID='SqlDataSource1'

    DataTextField='DESIGNATION' DataValueField='DESIGNATION' Width='246px'>
    </asp:DropDownList><asp:SqlDataSource ID='SqlDataSource1' runat='server' ConnectionString='LocalSqlServer' SelectCommand='SELECT DISTINCT [DESIGNATION] FROM [RECORDS] ORDER BY [DESIGNATION]'>
    </asp:SqlDataSource>

    </td>
    <td style='width: 100px'>
    <asp:Button ID='Button1' runat='server' Text='Search' Width='66px' OnClick='Button1_Click' /></td>
    </tr>
    </table>














































    <strong>
    </strong>


    <asp:panel ID='Panel1' runat='server' Direction='LeftToRight' ScrollBars='Horizontal'
    Width='728px'>
    <asp:GridView ID='GridView1' runat='server' AllowPaging='True'
    AllowSorting='True' AutoGenerateColumns='False' DataSourceID='GridSqlDataSource2' style='font-size: 11px;

    color: #ffffff; font-family: Tahoma; background-color: #339966; text-decoration: none' CellPadding='2' CellSpacing='1'

    ShowFooter='True' Width='800px' EmptyDataText='No record found in this Category' PageSize='50'>
    <Columns>
    <asp:BoundField DataField='STORENAME' HeaderText='STORE NAME' SortExpression='STORENAME' />
    <asp:BoundField DataField='LOCATION' HeaderText='LOCATION' SortExpression='LOCATION' />
    <asp:BoundField DataField='SNUM' HeaderText='S-NUM' SortExpression='SNUM' />
    <asp:BoundField DataField='DESIGNATION' HeaderText='DESIGNATION' SortExpression='DESIGNATION' />
    <asp:BoundField DataField='SVC' HeaderText='SVC' SortExpression='SVC' />
    <asp:BoundField DataField='UNSVC' HeaderText='UNSVC' SortExpression='UNSVC' />
    <asp:BoundField DataField='TOTAL' HeaderText='TOTAL' ReadOnly='True' SortExpression='TOTAL' />
    <asp:BoundField DataField='DATE' HeaderText='DATE' SortExpression='DATE' DataFormatString='{0:d}' />

    </Columns>
    <PagerSettings Mode='NumericFirstLast' Position='TopAndBottom' />
    <HeaderStyle BackColor='#004000' />
    </asp:GridView>

    <asp:SqlDataSource ID='GridSqlDataSource2' runat='server' ConnectionString='<%$ ConnectionStrings:RomiwaConnectionString %>'
    SelectCommand='SELECT STORENAME, LOCATION, SNUM, DESIGNATION, SVC, UNSVC, SUM(TOTAL) AS TOTAL, DATE FROM ALL_CATEGORY WHERE (DESIGNATION = @DESIGNATION) GROUP BY STORENAME, LOCATION, SNUM, DESIGNATION, SVC, UNSVC, DATE ORDER BY STORENAME'>
    <SelectParameters>
    <asp:ControlParameter ControlID='DropDownList1' Name='DESIGNATION' PropertyName='SelectedValue' Type='String' />
    </SelectParameters>
    </asp:SqlDataSource>
    </asp:panel>




    </div>

    </asp:Content>

    please check it out if there are any mistakes, thank you
     
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