Click here to Skip to main content
15,887,998 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Beginner to Visual Studio Pin
Richard Deeming3-Jun-14 2:49
mveRichard Deeming3-Jun-14 2:49 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 5:07
Member 87616673-Jun-14 5:07 
GeneralRe: Beginner to Visual Studio Pin
Richard Deeming3-Jun-14 5:45
mveRichard Deeming3-Jun-14 5:45 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 6:14
Member 87616673-Jun-14 6:14 
GeneralRe: Beginner to Visual Studio Pin
Richard Deeming3-Jun-14 6:36
mveRichard Deeming3-Jun-14 6:36 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 6:58
Member 87616673-Jun-14 6:58 
GeneralRe: Beginner to Visual Studio Pin
Richard Deeming3-Jun-14 7:20
mveRichard Deeming3-Jun-14 7:20 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 7:32
Member 87616673-Jun-14 7:32 
The error message I get now doesn't even seem related to my code. I get:

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: 'DefaultAuthenticationTypes' is not declared. It may be inaccessible due to its protection level.

Source Error:


Line 10: ' This is required if your application allows users to login
Line 11: app.UseCookieAuthentication(New CookieAuthenticationOptions() With {
Line 12: .AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
Line 13: .LoginPath = New PathString("/Account/Login")})
Line 14: app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie)

Source File: C:\Users\Steve\Documents\Visual Studio 2013\WebSites\WebSite5\App_Code\Startup.Auth.vb Line: 12

There is no reference in my code to AuthenticationType or LoginPath

I have this in Web.config as per your good self:

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="PageInspector:ServerCodeMappingSupport" value="Disabled"/>
  </appSettings>
</configuration>


And this in my aspx page:

<%@ Page Title="Register" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Register.aspx.vb" Inherits="Account_Register" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <h2><%: Title %>.</h2>
    <p class="text-danger">
        <asp:Literal runat="server" ID="ErrorMessage" />
    </p>

    <div class="form-horizontal">
        <h4>Create a new account.</h4>
        <hr />
        <asp:ValidationSummary runat="server" CssClass="text-danger" />
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="UserName" CssClass="col-md-2 control-label">User name</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="UserName" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="UserName"
                    CssClass="text-danger" ErrorMessage="The user name field is required." />
            </div>
        </div>
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="Password" CssClass="col-md-2 control-label">Password</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="Password" TextMode="Password" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="Password"
                    CssClass="text-danger" ErrorMessage="The password field is required." />
            </div>
        </div>
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="ConfirmPassword" CssClass="col-md-2 control-label">Confirm password</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="ConfirmPassword" TextMode="Password" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="ConfirmPassword"
                    CssClass="text-danger" Display="Dynamic" ErrorMessage="The confirm password field is required." />
                <asp:CompareValidator runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword"
                    CssClass="text-danger" Display="Dynamic" ErrorMessage="The password and confirmation password do not match." />
    </div>
       </div>


          <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="Email" CssClass="col-md-2 control-label">Email</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="strEmail" TextMode="Email" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="strEmail"
                    CssClass="text-danger" Display="Dynamic" ErrorMessage="The email field is required." />
               <asp:RegularExpressionValidator runat="server" ControlToValidate="strEmail" 
    CssClass="text-danger" Display="Dynamic" ErrorMessage="Please enter a valid email address."
    ValidationExpression="^.+@.+$" />
  
   </div>
      </div>

     <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <asp:Button runat="server" OnClick="CreateUser_Click" Text="Register" CssClass="btn btn-default" />
            </div>
        </div>
    </div>
</asp:Content>


That's it, in its entirety.
GeneralRe: Beginner to Visual Studio Pin
Richard Deeming3-Jun-14 7:49
mveRichard Deeming3-Jun-14 7:49 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 8:12
Member 87616673-Jun-14 8:12 
QuestionHttpApplicationState Pin
jkirkerx2-Jun-14 13:17
professionaljkirkerx2-Jun-14 13:17 
Answer[SOLVED] Pin
jkirkerx2-Jun-14 13:26
professionaljkirkerx2-Jun-14 13:26 
SuggestionRe: [SOLVED] Pin
thatraja3-Jun-14 21:13
professionalthatraja3-Jun-14 21:13 
GeneralRe: [SOLVED] Pin
jkirkerx4-Jun-14 5:52
professionaljkirkerx4-Jun-14 5:52 
QuestionMicrosoftAjax.js broken in Windows 8.1? Pin
Richard Deeming2-Jun-14 8:49
mveRichard Deeming2-Jun-14 8:49 
QuestionDirect Print Pin
Dana_Wahab1-Jun-14 23:58
Dana_Wahab1-Jun-14 23:58 
AnswerRe: Direct Print Pin
Kornfeld Eliyahu Peter2-Jun-14 0:42
professionalKornfeld Eliyahu Peter2-Jun-14 0:42 
QuestionI have problem with my nested control in datalist Pin
marjan_198630-May-14 22:09
marjan_198630-May-14 22:09 
AnswerRe: I have problem with my nested control in datalist Pin
DamithSL31-May-14 4:32
professionalDamithSL31-May-14 4:32 
QuestionBackUp... Pin
Kamran Ilyas30-May-14 21:46
Kamran Ilyas30-May-14 21:46 
AnswerRe: BackUp... Pin
Richard MacCutchan30-May-14 22:15
mveRichard MacCutchan30-May-14 22:15 
AnswerRe: BackUp... Pin
ZurdoDev2-Jun-14 9:47
professionalZurdoDev2-Jun-14 9:47 
Questionbus status active after mentioned Departure time Pin
rinku baruah30-May-14 18:55
rinku baruah30-May-14 18:55 
QuestionRe: bus status active after mentioned Departure time Pin
Richard MacCutchan30-May-14 22:12
mveRichard MacCutchan30-May-14 22:12 
AnswerRe: bus status active after mentioned Departure time Pin
rinku baruah1-Jun-14 18:57
rinku baruah1-Jun-14 18:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.