summaryrefslogtreecommitdiffstats
path: root/samples/OAuthServiceProvider/Web.config
blob: 4a75422515e5c07e0461ed5f5a928ab2a64f7983 (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<configSections>
		<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler" requirePermission="false" />
		<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core">
			<section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" />
			<section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
			<section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
		</sectionGroup>
	</configSections>

	<!-- The uri section is necessary to turn on .NET 3.5 support for IDN (international domain names),
	     which is necessary for OpenID urls with unicode characters in the domain/host name. 
	     It is also required to put the Uri class into RFC 3986 escaping mode, which OpenID and OAuth require. -->
	<uri>
		<idn enabled="All" />
		<iriParsing enabled="true" />
	</uri>

	<system.net>
		<defaultProxy enabled="true" />
		<settings>
			<!-- This setting causes .NET to check certificate revocation lists (CRL) 
			     before trusting HTTPS certificates.  But this setting tends to not 
			     be allowed in shared hosting environments. -->
			<!--<servicePointManager checkCertificateRevocationList="true"/>-->
		</settings>
	</system.net>

	<!-- this is an optional configuration section where aspects of dotnetopenauth can be customized -->
	<dotNetOpenAuth>
		<!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. -->
		<reporting enabled="true" />
		<messaging>
			<untrustedWebRequest>
				<whitelistHosts>
					<add name="localhost" />
				</whitelistHosts>
			</untrustedWebRequest>
		</messaging>
	</dotNetOpenAuth>

	<appSettings>
		<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
	</appSettings>
	<connectionStrings>
  <add name="DatabaseConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
 </connectionStrings>

	<system.web>
		<httpRuntime targetFramework="4.5" />
		<!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
		<compilation debug="true" targetFramework="4.0">
			<assemblies>
				<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
				<add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
			</assemblies>
		</compilation>
		<authentication mode="Forms">
			<forms name="oauthSP" />
		</authentication>
		<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
	</system.web>
	<!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
	<log4net>
		<appender name="TracePageAppender" type="OAuthServiceProvider.Code.TracePageAppender, OAuthServiceProvider">
			<layout type="log4net.Layout.PatternLayout">
				<conversionPattern value="%date (GMT%date{%z}) [%thread] %-5level %logger - %message%newline" />
			</layout>
		</appender>
		<!-- Setup the root category, add the appenders and set the default level -->
		<root>
			<level value="INFO" />
			<!--<appender-ref ref="RollingFileAppender" />-->
			<appender-ref ref="TracePageAppender" />
		</root>
		<!-- Specify the level for some specific categories -->
		<logger name="DotNetOpenAuth">
			<level value="ALL" />
		</logger>
	</log4net>
	<system.serviceModel>
		<behaviors>
			<serviceBehaviors>
				<behavior name="DataApiBehavior">
					<serviceMetadata httpGetEnabled="true" />
					<serviceDebug includeExceptionDetailInFaults="true" />
					<serviceAuthorization serviceAuthorizationManagerType="OAuthServiceProvider.Code.OAuthAuthorizationManager, OAuthServiceProvider" principalPermissionMode="Custom" />
				</behavior>
			</serviceBehaviors>
		</behaviors>
		<services>
			<service behaviorConfiguration="DataApiBehavior" name="OAuthServiceProvider.DataApi">
				<endpoint address="" binding="wsHttpBinding" contract="OAuthServiceProvider.Code.IDataApi">
					<identity>
						<dns value="localhost" />
					</identity>
				</endpoint>
				<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
			</service>
		</services>
	</system.serviceModel>
	<system.webServer>
		<modules runAllManagedModulesForAllRequests="true" />
	</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-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>