Minor changes to improve testability of helpers
[castle.git] / Experiments / Castle.MonoRail.Generator / templates / webconfig.vm
blobc40091dc165f43c2ecff5b0eb758ee68e26a530f
1 <?xml version="1.0" encoding="utf-8" ?>
3 <configuration>
5 <configSections>
6 <section name="monoRail"
7 type="Castle.MonoRail.Framework.Configuration.MonoRailSectionHandler, Castle.MonoRail.Framework" />
8 #if($useWindsorIntegration)
9 <section name="castle"
10 type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor" />
11 #end
12 </configSections>
14 #if($useWindsorIntegration)
15 <monoRail useWindsorIntegration="true">
16 #else
17 <monoRail>
18 <controllers>
19 <assembly>${name}</assembly>
20 </controllers>
21 #end
22 <viewEngine
23 viewPathRoot="$viewpath"
24 customEngine="$viewenginetypename" />
25 <!-- These are a few routing rules samples
26 (dont forget to enable the http module below)
27 <routing>
28 <rule>
29 <pattern>(/blog/posts/)(\d+)/(\d+)/(.)*$</pattern>
30 <replace><![CDATA[ /blog/view.rails?year=$2&month=$3 ]]></replace>
31 </rule>
32 <rule>
33 <pattern>(/news/)(\d+)/(\d+)/(.)*$</pattern>
34 <replace><![CDATA[ /news/view.rails?year=$2&month=$3 ]]></replace>
35 </rule>
36 </routing>
37 -->
38 </monoRail>
39 #if($useWindsorIntegration)
41 <castle>
42 <facilities>
43 <!-- Facilities declarations goes here -->
45 <!-- For example, to use the active record integration: -->
47 <!--
48 <facility id="arintegration" type="Castle.Facilities.ActiveRecordIntegration.ActiveRecordFacility, Castle.Facilities.ActiveRecordIntegration">
50 <assemblies>
51 <item>${name}</item>
52 </assemblies>
54 <config>
55 <add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
56 <add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
57 <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
58 <add key="hibernate.connection.connection_string" value="Data Source=.;Initial Catalog=yourdb;Integrated Security=SSPI" />
59 </config>
61 </facility>
62 -->
64 </facilities>
66 <components>
68 <!-- Components declarations/configuration goes here -->
70 </components>
72 </castle>
73 #end
75 <system.web>
76 <httpHandlers>
77 <!--
78 The .rails extension is just a suggestion, you can use
79 whatever extension you want and for shared hosting, you can use .ashx
80 -->
81 <add verb="*" path="*.rails"
82 type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, Castle.MonoRail.Framework" />
83 </httpHandlers>
85 <httpModules>
86 <!-- If'd like to enable Routing...
87 <add name="routing" type="Castle.MonoRail.Framework.RoutingModule, Castle.MonoRail.Framework" />
88 -->
89 <add name="monorail" type="Castle.MonoRail.Framework.EngineContextModule,Castle.MonoRail.Framework" />
90 </httpModules>
92 </system.web>
94 </configuration>