Archives
-
ASP.NET AJAX Role Application Service – Visual Studio 2008 (Orcas)
The first version ASP.NET AJAX gave us client-side support for two application services – profile and authentication. In Visual Studio 2008 (Orcas), an additional built-in service has been added: roles. If you’ve downloaded Eilon’s ASP.NET AJAX JavaScript Class Browser and installed the beta 2 (or beta 1) version of .NET 3.5, then you’ll find the new service under the Sys.Services namespace:
Adding support for the role service
If you’re upgrading an ASP.NET 2.0 web site to .NET 3.5 and want to leverage this new built-in service, you’ll have to make a few minor adjustments to web.config (new web sites in .NET 3.5 will already have these configurations). The first change requires adding the role service to the sectionGroup of the configuration settings:
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> </sectionGroup>
Next, you need to enable the service from the list of web services under system.web.extensions: