PageRenderTime 39ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/Sample Website/Web.config

http://viewstatehandlers.codeplex.com
ASP.NET | 162 lines | 100 code | 13 blank | 49 comment | 0 complexity | bba3eb68ebfd0e60a909e8366e2ca305 MD5 | raw file
  1. <?xml version="1.0"?>
  2. <configuration>
  3. <configSections>
  4. <sectionGroup name="viewStateHandlers">
  5. <!-- Important configuration with definition of persisters -->
  6. <section name="viewStatePersisters" type="Rioshu.Web.ViewStateHandlers.ViewStatePersistersConfigurationHandler" />
  7. <!-- Needed for compressed hidden field in page persister -->
  8. <section name="tinyPagePersister" type="Rioshu.Web.ViewStateHandlers.TinyPagePersisterConfigurationHandler"/>
  9. <!-- Needed for out of page ASP.NET cache persister -->
  10. <section name="cachePersister" type="Rioshu.Web.ViewStateHandlers.CachePersisterConfigurationHandler"/>
  11. <!-- Needed for out of page SQL Server persister -->
  12. <section name="sqlPersister" type="Rioshu.Web.ViewStateHandlers.SqlPersisterConfigurationHandler" />
  13. </sectionGroup>
  14. <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  15. <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  16. <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
  17. <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  18. <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
  19. <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
  20. <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
  21. <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
  22. </sectionGroup>
  23. </sectionGroup>
  24. </sectionGroup>
  25. </configSections>
  26. <appSettings/>
  27. <connectionStrings>
  28. <add name="viewstateDatabase" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog=ViewStatePersistence;Integrated Security=SSPI;" />
  29. </connectionStrings>
  30. <viewStateHandlers>
  31. <!-- Definition of persisters for viewstate storage, you need to define at least one and set its name in default -->
  32. <viewStatePersisters default="sqlPersister">
  33. <persisters>
  34. <!-- Compressed hidden field page persister -->
  35. <add name="pagePersister" type="Rioshu.Web.ViewStateHandlers.TinyPagePersister, Rioshu.Web.ViewStateHandlers" />
  36. <!-- Out of page ASP.NET cache persister -->
  37. <add name="cachePersister" type="Rioshu.Web.ViewStateHandlers.WebCachePersister, Rioshu.Web.ViewStateHandlers" />
  38. <!-- Out of page ASP.NET sql persister -->
  39. <add name="sqlPersister" type="Rioshu.Web.ViewStateHandlers.SqlPersister, Rioshu.Web.ViewStateHandlers" />
  40. </persisters>
  41. </viewStatePersisters>
  42. <!--
  43. compressionType is the compression algorith to apply, GZip is default algorith, other options:
  44. * Zip : Using ICSharp Zip Compression
  45. * SevenZip : Using Seven Zip Compression
  46. fieldName is the hidden field name and id in the page with the compressed viewstate, default is __VSTATE
  47. -->
  48. <tinyPagePersister compressionType="GZip" fieldName="__VSTATE" />
  49. <!--
  50. fieldName is the field name in the page with the viewstate id stored in the cache
  51. slideTime is the slide time or time out to keep the viewstate data in the cache if it is not used
  52. -->
  53. <cachePersister fieldName="__VSTATEID" slideTime="00:20:00" />
  54. <!--
  55. connectionStringName is the name of the connection string section with the sql server database for viewstate persistence
  56. fieldName is the field name in the page with the viewstate id stored in the cache
  57. -->
  58. <sqlPersister fieldName="__VSTATEID" connectionStringName="viewstateDatabase" />
  59. </viewStateHandlers>
  60. <system.web>
  61. <!--
  62. Set compilation debug="true" to insert debugging
  63. symbols into the compiled page. Because this
  64. affects performance, set this value to true only
  65. during development.
  66. -->
  67. <compilation debug="true">
  68. <assemblies>
  69. <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  70. <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  71. <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  72. <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  73. </assemblies>
  74. </compilation>
  75. <!--
  76. The <authentication> section enables configuration
  77. of the security authentication mode used by
  78. ASP.NET to identify an incoming user.
  79. -->
  80. <authentication mode="Windows"/>
  81. <!--
  82. The <customErrors> section enables configuration
  83. of what to do if/when an unhandled error occurs
  84. during the execution of a request. Specifically,
  85. it enables developers to configure html error pages
  86. to be displayed in place of a error stack trace.
  87. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
  88. <error statusCode="403" redirect="NoAccess.htm" />
  89. <error statusCode="404" redirect="FileNotFound.htm" />
  90. </customErrors>
  91. -->
  92. <pages>
  93. <controls>
  94. <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  95. <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  96. </controls>
  97. </pages>
  98. <httpHandlers>
  99. <remove verb="*" path="*.asmx"/>
  100. <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  101. <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  102. <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
  103. </httpHandlers>
  104. <httpModules>
  105. <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  106. </httpModules>
  107. </system.web>
  108. <system.codedom>
  109. <compilers>
  110. <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  111. <providerOption name="CompilerVersion" value="v3.5"/>
  112. <providerOption name="WarnAsError" value="false"/>
  113. </compiler>
  114. </compilers>
  115. </system.codedom>
  116. <!--
  117. The system.webServer section is required for running ASP.NET AJAX under Internet
  118. Information Services 7.0. It is not necessary for previous version of IIS.
  119. -->
  120. <system.webServer>
  121. <validation validateIntegratedModeConfiguration="false"/>
  122. <modules>
  123. <remove name="ScriptModule"/>
  124. <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  125. </modules>
  126. <handlers>
  127. <remove name="WebServiceHandlerFactory-Integrated"/>
  128. <remove name="ScriptHandlerFactory"/>
  129. <remove name="ScriptHandlerFactoryAppServices"/>
  130. <remove name="ScriptResource"/>
  131. <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  132. <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  133. <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  134. </handlers>
  135. </system.webServer>
  136. <runtime>
  137. <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  138. <dependentAssembly>
  139. <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
  140. <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
  141. </dependentAssembly>
  142. <dependentAssembly>
  143. <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
  144. <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
  145. </dependentAssembly>
  146. </assemblyBinding>
  147. </runtime>
  148. </configuration>