Bonjour,
Je voudrais déployer une application silverlight 4
sur un serveur IIS 6 avec l'authentification windows intégrée.
Pour ce faire j'ai lu beaucoup de tutoriel et je vous montre ma configuration :
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <sectionGroup name="system.serviceModel"> <section name="domainServices" type="System.ServiceModel.DomainServices.Hosting.DomainServicesSection, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" allowDefinition="MachineToApplication" requirePermission="false" /> </sectionGroup> </configSections> <system.web> <httpModules> <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </httpModules> <customErrors mode="Off"/> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </assemblies> </compilation> <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/> <authentication mode="Windows"> <forms name=".BusinessApplicationAnance_ASPXAUTH" /> </authentication> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="true" /> <modules runAllManagedModulesForAllRequests="true"> <add name="DomainServiceModule" preCondition="managedHandler" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </modules> </system.webServer> <system.serviceModel> <bindings /> <client /> ...
Comme vous pouvez le voir j'ai pas configuré le <membership /> et <profile />
je ne trouve pas de tutoriel qui explique comment le configurer... Donc je ne sais pas si c'est à cause de ça...
Voici le code applicatif pour l'authentification :
Code c# : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 public partial class App : Application { private BusyIndicator busyIndicator; /// <summary> /// Creates a new <see cref="App"/> instance. /// </summary> public App() { InitializeComponent(); // Create a WebContext and add it to the ApplicationLifetimeObjects // collection. This will then be available as WebContext.Current. WebContext webContext = new WebContext(); //webContext.Authentication = new FormsAuthentication(); webContext.Authentication = new WindowsAuthentication(); this.ApplicationLifetimeObjects.Add(webContext); } private void Application_Startup(object sender, StartupEventArgs e) { // This will enable you to bind controls in XAML files to WebContext.Current // properties this.Resources.Add("WebContext", WebContext.Current); // This will automatically authenticate a user when using windows authentication // or when the user chose "Keep me signed in" on a previous login attempt WebContext.Current.Authentication.LoadUser(this.Application_UserLoaded, null); // Show some UI to the user while LoadUser is in progress this.InitializeRootVisual(); }
Je sais pas si il faut créer une connection dans le web.config vers le serveur de l'active directory et crée le provider pour le membership avec la connection...
Quelqu'un pourrait il m'aider svp ??? Je deviens fou
Merci d'avance !
Partager