<?xml version="1.0"?> <!-- 有关如何配置 ASP.NET 应用程序的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=152368 --> <configuration> <configSections> <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /> <section name="autofac" type="Autofac.Configuration.SectionHandler, Autofac.Configuration" /> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> </configSections> <connectionStrings> <add name="ApplicationServices" connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> <add name="jinxiaocunConnectionString" connectionString="Data Source=.;Initial Catalog=jinxiaocun;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> <appSettings> <add key="UseCache" value="true" /> <add key="ExcelTemplate" value="~ExcelTemplate" /> <add key="ExcelFile" value="~ExcelFile" /> </appSettings> <autofac> <components> <component type="CJCMS.Data.IRepository`1, CJCMS.Data" service="CJCMS.Data.Repository`1, CJCMS.Data" /> </components> </autofac> <!--日志--> <log4net> <logger name="logerror"> <level value="ERROR" /> <appender-ref ref="ErrorAppender" /> </logger> <logger name="loginfo"> <level value="INFO" /> <appender-ref ref="InfoAppender" /> </logger> <appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender"> <param name="File" value="Error" /> <param name="AppendToFile" value="true" /> <param name="StaticLogFileName" value="false" /> <param name="MaximumFileSize" value="10MB" /> <param name="Threshold" value="ALL" /> <param name="DatePattern" value="yyyyMM"\log_"yyyyMMdd".log"" /> <param name="RollingStyle" value="Composite" /> <param name="CountDirection" value="1" /> <param name="AppendToFile" value="true" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%-5p %d [%c] %m%n" /> </layout> </appender> <appender name="InfoAppender" type="log4net.Appender.RollingFileAppender"> <param name="File" value="Info" /> <param name="AppendToFile" value="true" /> <param name="StaticLogFileName" value="false" /> <param name="MaximumFileSize" value="10MB" /> <param name="Threshold" value="ALL" /> <param name="DatePattern" value="yyyyMM"\log_"yyyyMMdd".log"" /> <param name="RollingStyle" value="Composite" /> <param name="CountDirection" value="1" /> <param name="AppendToFile" value="true" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%-5p %d [%c] %m%n" /> </layout> </appender> </log4net> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="dialect">NHibernate.Dialect.SQLiteDialect</property> <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property> <property name="connection.connection_string"> Data Source=D:jinxiaocun1jindingjindingCJCMS.Web.CompanyApp_Datadb.db; </property> <!--<property name="connection.connection_string">Server=.;initial catalog=jinxiaocun;Integrated Security=SSPI;Pooling=False</property>--> <!--<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>--> <property name="show_sql">true</property> <mapping assembly="CJCMS.Domain" /> </session-factory> </hibernate-configuration> <system.web> <httpHandlers> <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" /> </httpHandlers> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> </assemblies> <buildProviders> <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </buildProviders> </compilation> <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="60" /> </authentication> <pages controlRenderingCompatibilityVersion="4.0"> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> </namespaces> </pages> <httpRuntime /> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <defaultDocument> <files> <add value="Admin/Index" /> </files> </defaultDocument> <handlers> <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </handlers> </system.webServer> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="0.9.0.2" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>