Revision: 4357
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4357&view=rev
Author: fabiomaulo
Date: 2009-05-22 16:29:11 +0000 (Fri, 22 May 2009)
Log Message:
-----------
Minor
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate.Example.Web/App_Code/ExampleApplication.cs
trunk/nhibernate/src/NHibernate.Example.Web/Web.Config
Property Changed:
----------------
trunk/nhibernate/src/NHibernate.Example.Web/App_Data/
Modified: trunk/nhibernate/src/NHibernate.Example.Web/App_Code/ExampleApplication.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Example.Web/App_Code/ExampleApplication.cs 2009-05-22 12:55:51 UTC (rev 4356)
+++ trunk/nhibernate/src/NHibernate.Example.Web/App_Code/ExampleApplication.cs 2009-05-22 16:29:11 UTC (rev 4357)
@@ -1,22 +1,26 @@
-using System;
using System.IO;
using System.Web;
using System.Web.Hosting;
-using NHibernate;
+using NHibernate.Cfg;
using NHibernate.Example.Web.Domain;
namespace NHibernate.Example.Web
{
public class ExampleApplication : HttpApplication
{
- public static readonly Cfg.Configuration Configuration;
+ public static readonly Configuration Configuration;
public static readonly ISessionFactory SessionFactory;
static ExampleApplication()
{
log4net.Config.XmlConfigurator.Configure();
- Configuration = new NHibernate.Cfg.Configuration()
- .SetDefaultAssembly(typeof(Item).Assembly.FullName)
+ Configuration = new Configuration();
+ string nhConfigPath = HostingEnvironment.MapPath("~/App_Data/hibernate.cfg.xml");
+ if (File.Exists(nhConfigPath))
+ {
+ Configuration.Configure(nhConfigPath);
+ }
+ Configuration.SetDefaultAssembly(typeof(Item).Assembly.FullName)
.SetDefaultNamespace(typeof(Item).Namespace)
.AddDirectory(new DirectoryInfo(HostingEnvironment.MapPath("~/App_Data/")));
Property changes on: trunk/nhibernate/src/NHibernate.Example.Web/App_Data
___________________________________________________________________
Added: svn:ignore
+ hibernate.cfg.xml
Modified: trunk/nhibernate/src/NHibernate.Example.Web/Web.Config
===================================================================
--- trunk/nhibernate/src/NHibernate.Example.Web/Web.Config 2009-05-22 12:55:51 UTC (rev 4356)
+++ trunk/nhibernate/src/NHibernate.Example.Web/Web.Config 2009-05-22 16:29:11 UTC (rev 4357)
@@ -46,7 +46,8 @@
</customErrors>
-->
<pages enableViewState="false" enableViewStateMac="false" />
- <trust level="Medium" />
+ <!-- <trust level="Medium" /> -->
+
<httpModules>
<add name="CurrentSessionModule" type="NHibernate.Example.Web.CurrentSessionModule" />
</httpModules>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|