diff options
Diffstat (limited to 'samples/OpenIdRelyingPartyMvc')
-rw-r--r-- | samples/OpenIdRelyingPartyMvc/Global.asax.cs | 3 | ||||
-rw-r--r-- | samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj | 6 | ||||
-rw-r--r-- | samples/OpenIdRelyingPartyMvc/Web.config | 28 |
3 files changed, 35 insertions, 2 deletions
diff --git a/samples/OpenIdRelyingPartyMvc/Global.asax.cs b/samples/OpenIdRelyingPartyMvc/Global.asax.cs index d57a13f..8b117c0 100644 --- a/samples/OpenIdRelyingPartyMvc/Global.asax.cs +++ b/samples/OpenIdRelyingPartyMvc/Global.asax.cs @@ -18,13 +18,16 @@ "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = string.Empty }); // Parameter defaults +#if !Mono routes.MapRoute( "Root", string.Empty, new { controller = "Home", action = "Index", id = string.Empty }); +#endif } protected void Application_Start(object sender, EventArgs e) { + log4net.Config.XmlConfigurator.Configure(); RegisterRoutes(RouteTable.Routes); } } diff --git a/samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj b/samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj index a6fab7c..563cdbc 100644 --- a/samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj +++ b/samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>TRACE;DEBUG;Mono</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> @@ -30,6 +30,10 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\log4net.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Core"> diff --git a/samples/OpenIdRelyingPartyMvc/Web.config b/samples/OpenIdRelyingPartyMvc/Web.config index 8becaf6..bf37616 100644 --- a/samples/OpenIdRelyingPartyMvc/Web.config +++ b/samples/OpenIdRelyingPartyMvc/Web.config @@ -10,6 +10,7 @@ <configuration> <configSections> <section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler" requirePermission="false" /> <section name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection" requirePermission="false" allowLocation="true"/> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> @@ -33,7 +34,7 @@ </uri> <system.net> - <defaultProxy enabled="true" /> + <!--<defaultProxy enabled="true" />--> <!-- mono unsupported --> <settings> <!-- This setting causes .NET to check certificate revocation lists (CRL) before trusting HTTPS certificates. But this setting tends to not @@ -64,6 +65,31 @@ </messaging> </dotNetOpenAuth> + <!-- log4net is a 3rd party (free) logger library that dotnetopenid will use if present but does not require. --> + <log4net> + <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> + <file value="RelyingParty.log" /> + <appendToFile value="true" /> + <rollingStyle value="Size" /> + <maxSizeRollBackups value="10" /> + <maximumFileSize value="100KB" /> + <staticLogFileName value="true" /> + <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="RollingFileAppender" /> + </root> + <!-- Specify the level for some specific categories --> + <logger name="DotNetOpenAuth"> + <level value="INFO" /> + </logger> + </log4net> + <appSettings/> <connectionStrings/> <system.web> |