2013-10-26 3 views
23

Wenn ich ein vorhandenes Projekt in Visual Studio 2013 haben, wie ändere ich die Authentifizierung? Während einer neuen Projekteinrichtung gibt es eine Schaltfläche "Change Authentication", aber ich kann die Entsprechung für ein vorhandenes Projekt nicht finden.Visual Studio 2013 ändern Authentifizierung auf Vorhandenes Projekt

+0

In Visual Studio Posting 2013 würde ich das Identity und Access-Tool, das von der rechten Maustaste auf das Projekt erneut aus. – Travis

+0

Meinst du VS 2012? Rechtsklick in VS 2013 zeigt nichts! – nzpcmad

+0

@nzpcmad, ja, argh! VS2012 hat das IATool. VS2013 hat nichts. :-( – Travis

Antwort

0

Bis jemand kommt mit einer besseren Antwort auf:

Bearbeiten Sie Ihre web.config und FederationMetadata.xml manuell.

0

Wenn Ihr Projekt ist ASP.NET MVC und ist die neue Vorlage im Jahr 2013 verwenden, sollten Sie sich auf OWIN ausgeführt werden, so gibt es eine Teilklasse Startup nach innen schauen und falls Sie es dort eine Datei Startup.Auth ist CS-, die dort teilweise von Startup ist ich diesen Es

public partial class Startup 
{ 
    // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 
    public void ConfigureAuth(IAppBuilder app) 
    { 
     // Enable the application to use a cookie to store information for the signed in user 
     app.UseCookieAuthentication(new CookieAuthenticationOptions() 
     { 
      AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, 
      LoginPath = new PathString("/Authentication/Login") 
     }); 

     // Use a cookie to temporarily store information about a user logging in with a third party login provider 
     app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); 

     // Uncomment the following lines to enable logging in with third party login providers 
     //app.UseMicrosoftAccountAuthentication(
     // clientId: "", 
     // clientSecret: ""); 

     //app.UseTwitterAuthentication(
     // consumerKey: "", 
     // consumerSecret: ""); 

     //app.UseFacebookAuthentication(
     // appId: "", 
     // appSecret: ""); 

     //app.UseGoogleAuthentication(); 

    } 
} 

haben, ist Ihre Authentifizierungskonfiguration

+0

Dies setzt voraus, dass "Open Web Interface für .NET" (Owin) über die Package Manager Console installiert wurde: Install-Package Owin –

8

Dies kann von der Projekteigenschaften erfolgen. Ich bin ein Link auf die article which explains how to do this.

enter image description here

enter image description here

+2

Schauen Sie sich die Sektion Header im Eigenschaftenfenster an, es ist * Development Server * Projektauthentifizierung, nicht die des Servers. – Travis

Verwandte Themen