locked
Browser error when viewing in page inspector RRS feed

  • Question

  • User844973120 posted

    I have created this in VS2012. For some reason I get the following error when I try to view it in page inspector.

    "Uh-oh, something went wrong! Error Code: 403"

    Can anyone please tell me why? Thank you.

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Registration.aspx.cs" Inherits="Registration" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>TEsting</title>
    </head> 
        <body>
        <style type="text/css">
            .auto-style1 {
                width: 100%;
            }
            .auto-style2 {
                text-align: right;
                width: 274px;
            }
            .auto-style3 {
                height: 23px;
                width: 602px;
            }
            .auto-style4 {
                text-align: right;
                height: 26px;
                width: 274px;
            }
            .auto-style5 {
                height: 26px;
                width: 602px;
                text-align: left;
            }
            .auto-style6 {
                height: 23px;
                width: 274px;
            }
            .auto-style7 {
                width: 274px;
            }
            .auto-style8 {
                width: 212px;
            }
            .auto-style9 {
                height: 26px;
                width: 212px;
            }
            .auto-style10 {
                height: 23px;
                width: 212px;
            }
            .auto-style11 {
                width: 602px;
            }
            .auto-style12 {
                width: 602px;
                text-align: left;
            }
            #Reset1 {
                width: 84px;
            }
        </style>
       
        <form id="form1" runat="server">
        <div>
        
            <table class="auto-style1">
                <tr>
                    <td class="auto-style2">User Name</td>
                    <td class="auto-style8">
                        <asp:TextBox ID="TextBoxUN" runat="server" Width="180px"></asp:TextBox>
                    </td>
                    <td class="auto-style12">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBoxUN" ErrorMessage="User Name is required" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style2">E-Mail</td>
                    <td class="auto-style8">
                        <asp:TextBox ID="TextBoxEmail" runat="server" Width="180px"></asp:TextBox>
                    </td>
                    <td class="auto-style12">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBoxEmail" ErrorMessage="E-mail is required" ForeColor="Red"></asp:RequiredFieldValidator>
                        <br />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBoxEmail" ErrorMessage="Not a valid E-mail address" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style2">Password</td>
                    <td class="auto-style8">
                        <asp:TextBox ID="TextBoxPassword" runat="server" TextMode="Password" Width="180px"></asp:TextBox>
                    </td>
                    <td class="auto-style12">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBoxPassword" ErrorMessage="Password is required" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style4">Confirm Password</td>
                    <td class="auto-style9">
                        <asp:TextBox ID="TextBoxConfirmPass" runat="server" TextMode="Password" Width="180px"></asp:TextBox>
                    </td>
                    <td class="auto-style5">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBoxConfirmPass" ErrorMessage="Confirm Password is required" ForeColor="Red"></asp:RequiredFieldValidator>
                        <br />
                        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBoxPassword" ControlToValidate="TextBoxConfirmPass" ErrorMessage="Password does not match" ForeColor="Red"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style4">Country</td>
                    <td class="auto-style9">
                        <asp:DropDownList ID="DropDownListCountry" runat="server" Width="180px">
                            <asp:ListItem>Select Country</asp:ListItem>
                            <asp:ListItem>United States</asp:ListItem>
                            <asp:ListItem>United Kingdom</asp:ListItem>
                            <asp:ListItem>Germany</asp:ListItem>
                            <asp:ListItem>France</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td class="auto-style5">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="DropDownListCountry" ErrorMessage="Select a country name" ForeColor="Red" InitialValue="Select Country"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style6"></td>
                    <td class="auto-style10">
                        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" />
                        <input id="Reset1" aria-required="False" type="reset" value="Reset" /></td>
                    <td class="auto-style3"></td>
                </tr>
                <tr>
                    <td class="auto-style7">&nbsp;</td>
                    <td class="auto-style8">&nbsp;</td>
                    <td class="auto-style11">&nbsp;</td>
                </tr>
            </table>
        
        </div>
        </form>
    </body>
    </html>

    Wednesday, March 12, 2014 1:34 PM

Answers

  • User-1454326058 posted

    Hi BLevine,

    I think there are something wrong in the IIS.

    First, please check which IIS that the project used and check whether the ASP.NET Application Development Feature has installed. (Right click the project=>Properties=>Web)

    If it used the default IIS Express please try to re-install the VS and try again. You could try to host it to local IIS and check the result.

    Secondly, please create a new project and try again.

    Thanks

    Best Regards  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 13, 2014 11:30 PM

All replies

  • User-1454326058 posted

    Hi BLevine,

    Thanks for your post!

    Based on my test with your code in VS2012 and it works fine. I can’t reproduce your scene.

    Do you get error if you view in browser (E.g. IE)?

    I suggest that you could update or repair your VS and try again.

    Thanks

    Best Regards  

    Thursday, March 13, 2014 1:47 AM
  • User844973120 posted

    It doesn't work when I try to view it in Chrome, Mozilla, or IE.  I always end up getting a 403 error or a 500 error.  I have been told the code itself is fine, there must be some other setting that is causing the problem.  Also, I updated VS2012 2 days ago and that didn't fix the issue.

    Thank you for helping!

    Thursday, March 13, 2014 10:41 AM
  • User-1454326058 posted

    Hi BLevine,

    I think there are something wrong in the IIS.

    First, please check which IIS that the project used and check whether the ASP.NET Application Development Feature has installed. (Right click the project=>Properties=>Web)

    If it used the default IIS Express please try to re-install the VS and try again. You could try to host it to local IIS and check the result.

    Secondly, please create a new project and try again.

    Thanks

    Best Regards  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 13, 2014 11:30 PM