Skip to content

Commit fb16904

Browse files
committed
move enable session
1 parent 37b6d46 commit fb16904

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

aspnetcore/migration/fx-to-core/areas/session.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,6 @@ Call `AddRemoteAppSession` and `AddJsonSessionSerializer` to register known sess
186186

187187
:::code language="csharp" source="~/migration/fx-to-core/areas/session/samples/remote/Program.cs" id="snippet_Configuration" :::
188188

189-
Session support requires explicit activation. Configure it per-route using ASP.NET Core metadata.
190-
191-
#### Option 1: Annotate controllers
192-
193-
:::code language="csharp" source="~/migration/fx-to-core/areas/session/samples/remote/SomeController.cs" id="snippet_Controller" :::
194-
195-
#### Option 2: Enable globally for all endpoints
196-
197-
:::code language="csharp" source="~/migration/fx-to-core/areas/session/samples/remote/Program.cs" id="snippet_RequireSystemWebAdapterSession" :::
198-
199189
**ASP.NET Framework configuration:**
200190

201191
Add this change to `Global.asax.cs`:
@@ -218,10 +208,21 @@ var coreApp = builder.AddProject<Projects.CoreApplication>("core")
218208
...
219209
```
220210

221-
Once this is done, it will be automatically hooked up in both the framework and core applications.
222-
223211
:::zone-end
224212

213+
### Enable session
214+
215+
Session support requires explicit activation. Configure it per-route using ASP.NET Core metadata.
216+
217+
#### Option 1: Annotate controllers
218+
219+
:::code language="csharp" source="~/migration/fx-to-core/areas/session/samples/remote/SomeController.cs" id="snippet_Controller" :::
220+
221+
#### Option 2: Enable globally for all endpoints
222+
223+
:::code language="csharp" source="~/migration/fx-to-core/areas/session/samples/remote/Program.cs" id="snippet_RequireSystemWebAdapterSession" :::
224+
225+
225226
### Communication protocol
226227

227228
#### Readonly sessions

0 commit comments

Comments
 (0)