forked from JeffreySu/WeiXinMPSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWeb.config
240 lines (226 loc) · 12.5 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
<!--<section name="RedisConfig" type="Senparc.Weixin.Cache.Redis.RedisConfigInfo, Senparc.Weixin.Cache.Redis" />-->
</configSections>
<!--<RedisConfig ServerList="127.0.0.1:6379" MaxWritePoolSize="60" MaxReadPoolSize="60" AutoStart="true" LocalCacheTime="180" RecordeLog="false" />-->
<!--<RedisConfig WriteServerList="127.0.0.1:6379" ReadServerList="127.0.0.1:6379" MaxWritePoolSize="60" MaxReadPoolSize="60" AutoStart="true" LocalCacheTime="180" RecordeLog="false" />-->
<connectionStrings>
<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-Senparc.Weixin.MP.Sample-20130112153722;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-Senparc.Weixin.MP.Sample-20130112153722.mdf" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<!-- 以下信息会被自动识别,如无特殊说明,不用的参数可以删除,但修改 key 后将会无法自动识别! -->
<!-- 自动识别参数开始 -->
<!-- 以下为 CO2NET 的 SenparcSetting 全局配置,请勿修改 key,勿删除任何项 -->
<!-- 默认缓存命名空间配置 -->
<add key="DefaultCacheNamespace" value="DefaultCache" />
<!-- Cache.Redis连接配置 -->
<add key="Cache_Redis_Configuration" value="Redis配置" />
<!--<add key="Cache_Redis_Configuration" value="localhost:6379" />-->
<!-- Cache.Memcached连接配置 -->
<add key="Cache_Memcached_Configuration" value="Memcached配置" />
<add key="SenparcUnionAgentKey" value="SenparcUnionAgentKey" />
<!-- 以下为 Senparc.Weixin 的 SenparcWeixinSetting 微信配置,不使用的参数可以删除 -->
<!-- 微信公众号URL对接信息 -->
<add key="WeixinToken" value="应用服务器(开发者服务器)URL对应的Token" />
<add key="WeixinEncodingAESKey" value="应用服务器(开发者服务器)URL对应的消息加解密密钥" />
<!-- 高级接口信息 -->
<add key="WeixinAppId" value="微信AppId" />
<add key="WeixinAppSecret" value="微信AppSecret" />
<!-- SDK提供的代理功能设置 -->
<add key="WeixinAgentUrl" value="外部代理Url" />
<add key="WeixinAgentToken" value="外部代理Token" />
<add key="SenparcAgentKey" value="盛派代理系统通用Key" />
<add key="WeixinAgentWeiweihiKey" value="外部代理WeiWeiHiKey" />
<!-- 微信支付相关参数 -->
<!-- 微信支付V2 -->
<add key="WeixinPay_Tenpay" value="WeixinPay_Tenpay" />
<add key="WeixinPay_PartnerId" value="WeixinPay_PartnerId" />
<add key="WeixinPay_Key" value="WeixinPay_Key" />
<add key="WeixinPay_AppId" value="WeixinPay_AppId" />
<add key="WeixinPay_AppKey" value="WeixinPay_AppKey" />
<add key="WeixinPay_TenpayNotify" value="WeixinPay_TenpayNotify" />
<!-- 微信支付V3 -->
<add key="TenPayV3_MchId" value="TenPayV3_MchId" />
<add key="TenPayV3_Key" value="TenPayV3_Key" />
<add key="TenPayV3_AppId" value="TenPayV3_AppId" />
<add key="TenPayV3_AppSecret" value="TenPayV3_AppSecret" />
<add key="TenPayV3_TenpayNotify" value="http://YourDomainName/TenpayV3/PayNotifyUrl" />
<!-- 如果不设置TenPayV3_WxOpenTenpayNotify,默认在 TenPayV3_TenpayNotify 的值最后加上 "WxOpen" -->
<add key="TenPayV3_WxOpenTenpayNotify" value="http://YourDomainName/TenpayV3/PayNotifyUrlWxOpen" />
<!-- 开放平台 -->
<add key="Component_Appid" value="Component_Appid" />
<add key="Component_Secret" value="Component_Secret" />
<add key="Component_Token" value="Component_Token" />
<add key="Component_EncodingAESKey" value="Component_EncodingAESKey" />
<!-- 微信企业号 -->
<add key="WeixinCorpId" value="WeixinCorpId" />
<add key="WeixinCorpSecret" value="WeixinCorpSecret" />
<!-- 小程序 -->
<!-- 小程序消息URL对接信息 -->
<add key="WxOpenToken" value="小程序消息URL对应的Token" />
<add key="WxOpenEncodingAESKey" value="小程序消息URL对应的消息加解密密钥" />
<!-- 小程序秘钥信息 -->
<add key="WxOpenAppId" value="微信小程序AppId" />
<add key="WxOpenAppSecret" value="微信小程序AppSecret" />
<!-- 自动识别参数结束 -->
</appSettings>
<!--
有关 web.config 更改的说明,请参见 http://go.microsoft.com/fwlink/?LinkId=235367。
可在 <httpRuntime> 标记上设置以下特性。
<system.Web>
<httpRuntime targetFramework="4.5" />
</system.Web>
-->
<!--<system.diagnostics>
<trace autoflush="true">
<listeners>
<add type="System.Diagnostics.TextWriterTraceListener" name="TextWriter"
initializeData="trace.log" />
</listeners>
</trace>
</system.diagnostics>-->
<system.web>
<trace enabled="true" pageOutput="true" writeToDiagnosticsTrace="true" />
<compilation debug="true" targetFramework="4.5" />
<authentication mode="None" />
<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.Optimization" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
<profile defaultProvider="DefaultProfileProvider">
<providers>
<add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</profile>
<membership defaultProvider="DefaultMembershipProvider">
<providers>
<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<roleManager defaultProvider="DefaultRoleProvider">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</roleManager>
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
<providers>
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
</providers>
</sessionState>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
</httpModules>
<!-- Memcached 配置-->
<!--<sessionState customProvider="Memcached" mode="Custom">
<providers>
<add name="Memcached" type="Enyim.Caching.Web.MembaseSessionStateProvider, Enyim.Caching.Web" />
</providers>
</sessionState>-->
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
</modules>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers></system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<!--<dependentAssembly>
<assemblyIdentity name="Enyim.Caching" publicKeyToken="cec98615db04012e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.16.0.0" newVersion="2.16.0.0" />
</dependentAssembly>-->
<dependentAssembly>
<assemblyIdentity name="Enyim.Caching" publicKeyToken="cec98615db04012e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.11.0.0" newVersion="2.11.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
</assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" culture="neutral" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
<elmah>
<!--
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on remote access and securing ELMAH.
-->
<security allowRemoteAccess="false" />
</elmah>
<location path="elmah.axd" inheritInChildApplications="false">
<system.web>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
<!--
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on using ASP.NET authorization securing ELMAH.
<authorization>
<allow roles="admin" />
<deny users="*" />
</authorization>
-->
</system.web>
<system.webServer>
<handlers>
<add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
</handlers>
</system.webServer>
</location>
</configuration>