forked from yuezhongxin/MessageManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Web.config
59 lines (58 loc) · 3.43 KB
/
Web.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<connectionStrings>
<add name="MessageManagerDB" connectionString="Server=.; Database=MessageManagerDB; Integrated Security=True; MultipleActiveResultSets=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<unity>
<container name="unity">
<!--Domain Service-->
<register type="MessageManager.Domain.DomainService.ISendMessageService, MessageManager.Domain" mapTo="MessageManager.Domain.DomainService.SendSiteMessageService, MessageManager.Domain"></register>
<!--Repository Context & Repositories-->
<register type="MessageManager.Domain.Repositories.IRepositoryContext, MessageManager.Domain" mapTo="MessageManager.Repositories.EntityFramework.EntityFrameworkRepositoryContext, MessageManager.Repositories" />
<register type="MessageManager.Domain.Repositories.IContactRepository, MessageManager.Domain" mapTo="MessageManager.Repositories.ContactRepository, MessageManager.Repositories" />
<register type="MessageManager.Domain.Repositories.IMessageRepository, MessageManager.Domain" mapTo="MessageManager.Repositories.MessageRepository, MessageManager.Repositories" />
<!--Application Service Implementations-->
<register type="MessageManager.Application.IMessageService, MessageManager.Application" mapTo="MessageManager.Application.Implementation.MessageServiceImpl, MessageManager.Application"></register>
</container>
</unity>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false -->
<serviceMetadata httpGetEnabled="true" />
<!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息 -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<!--
若要在调试过程中浏览 Web 应用程序根目录,请将下面的值设置为 True。
在部署之前将该值设置为 False 可避免泄露 Web 应用程序文件夹信息。
-->
<directoryBrowse enabled="true" />
</system.webServer>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>