Skip to content

Instantly share code, notes, and snippets.

View bleroy's full-sized avatar

Bertrand Le Roy bleroy

View GitHub Profile
@bleroy
bleroy / blog-rss.xml
Created April 2, 2015 00:25
CodePlex Issue #16552 Plain Text Attachments
<rss version="2.0"><channel><title>Richard's blog</title><link>/blog</link><description>Richard's blog</description><item><title>Sending XML to an ASP.NET MVC Action Method Argument</title><link>/blog/xml-to-asp.net-mvc-action-method</link><description>&lt;p&gt;I read a great article recently by Phil Haack on &lt;a href="http://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx"&gt;sending JSON to an action method&lt;/a&gt;. This was very timely as I wanted to do exactly that in the REST API I've been created for a &lt;a href="http://www.kenseimedia.com/"&gt;video hosting website&lt;/a&gt;. However, I wanted to make it work with XML as well as JSON.&lt;/p&gt;
&lt;p&gt;Phil Haack creates something called a JSON value provider, so I followed his example and created an XML value provider. I've used it on two projects now and it's worked a treat. I thought I'd share it with the world in the hope that it will be useful to others.&lt;/p&gt;
&lt;h2&gt;Source code&lt;/h2&gt;
&lt
@bleroy
bleroy / errorlog.txt
Created April 2, 2015 00:27
CodePlex Issue #16558 Plain Text Attachments
Server Error in '/' Application.
null id in Orchard.Roles.Models.RoleRecord entry (don't flush the Session after an exception occurs)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: NHibernate.AssertionFailure: null id in Orchard.Roles.Models.RoleRecord entry (don't flush the Session after an exception occurs)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
@bleroy
bleroy / errorlog.txt
Created April 2, 2015 00:27
CodePlex Issue #16561 Plain Text Attachments
Server Error in '/' Application.
The data was truncated while converting from one data type to another. [ Name of function(if known) = ]
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlServerCe.SqlCeException: The data was truncated while converting from one data type to another. [ Name of function(if known) = ]
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
@bleroy
bleroy / ErrorReport.htm
Created April 2, 2015 00:37
CodePlex Issue #16599 Plain Text Attachments
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Multiple types were found that match the controller named
'admin'. This can happen if the route that services this request
('Admin/Blogs/{action}/{id}') does not specify namespaces to search for a
controller that matches the request. If this is the case, register this
route by calling an overload of the 'MapRoute' method that takes a
'namespaces' parameter.&lt;br&gt;&lt;br&gt;The request for 'admin' has
found the following matching
@bleroy
bleroy / AzurePackage.proj
Created April 2, 2015 01:09
CodePlex Issue #16615 Plain Text Attachments
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Initialization -->
<PropertyGroup>
<LibFolder>$(MSBuildProjectDirectory)\lib</LibFolder>
<SrcFolder>$(MSBuildProjectDirectory)\src</SrcFolder>
<BuildFolder>$(MSBuildProjectDirectory)\build</BuildFolder>
<ArtifactsFolder>$(MSBuildProjectDirectory)\artifacts\Azure</ArtifactsFolder>
@bleroy
bleroy / MenuItem.cshtml
Created April 2, 2015 01:10
CodePlex Issue #16616 Plain Text Attachments
@{
// odd formatting in this file is to cause more attractive results in the output.
var items = (IEnumerable<dynamic>)Enumerable.Cast<dynamic>(Model);
}
@{
if (!HasText(Model.Text)) {
@DisplayChildren(Model)
} else {
if (Model.Href.TrimEnd('/').ToUpperInvariant() == Request.Path.TrimEnd('/').ToUpperInvariant()) {
Model.Classes.Add("current");
@bleroy
bleroy / TinyMCE-windowparent.patch
Created April 2, 2015 01:13
CodePlex Issue #16624 Plain Text Attachments
# HG changeset patch
# User Zibings
# Date 1285341698 14400
# Node ID 657d4b68bfc8595e621b04145f5d9699f2ed6451
# Parent aecd221c2b15bef78139896f331ed9265a9df77c
Modifying TinyMCE 'addmedia' plugin to account for modal dialogs.
diff -r aecd221c2b15 -r 657d4b68bfc8 src/Orchard.Web/Modules/TinyMce/Scripts/plugins/addmedia/js/addmedia.js
--- a/src/Orchard.Web/Modules/TinyMce/Scripts/plugins/addmedia/js/addmedia.js Tue Sep 21 14:30:52 2010 -0700
+++ b/src/Orchard.Web/Modules/TinyMce/Scripts/plugins/addmedia/js/addmedia.js Fri Sep 24 11:21:38 2010 -0400
@bleroy
bleroy / Modules.htm
Created April 2, 2015 02:00
CodePlex Issue #16706 Plain Text Attachments
<html>
<head>
<title>Invalid object name 'default_Orchard_Email_SmtpSettingsPartRecord'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
@bleroy
bleroy / trace.log
Created April 2, 2015 02:06
CodePlex Issue #16732 Plain Text Attachments
*** MapPathBasedVirtualPathEnumerator..ctor
00000001`012088a4 "/Prchard/Core/Settings/Views/"
Call Site
System_Web_ni!System.Web.Hosting.MapPathBasedVirtualPathEnumerator..ctor(System.Web.VirtualPath, System.Web.Hosting.RequestedEntryType)
System_Web_ni!System.Web.Hosting.MapPathBasedVirtualPathCollection.System.Collections.IEnumerable.GetEnumerator()
System_Core_ni!System.Linq.Enumerable+<OfTypeIterator>d__aa`1[[System.__Canon, mscorlib]].MoveNext()
System_Core_ni!System.Linq.Enumerable+WhereSelectEnumerableIterator`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].MoveNext()
@bleroy
bleroy / CreateDelegateTraceSummary.txt
Created April 2, 2015 02:08
CodePlex Issue #16738 Plain Text Attachments
Total Number of calls to CreateDelegate per Request = 115
Total Number of Unique Stack Traces = 28
Number of Occurrences = 1
mscorlib_ni!System.Reflection.Emit.DynamicMethod.CreateDelegate(System.Type, System.Object)
System_Core_ni!System.Linq.Expressions.Compiler.LambdaCompiler.Compile(System.Linq.Expressions.LambdaExpression, System.Runtime.CompilerServices.DebugInfoGenerator)
Autofac!Autofac.Core.Lifetime.MatchingScopeLifetime..ctor(System.Linq.Expressions.Expression`1<System.Func`2<Autofac.ILifetimeScope,Boolean>>)
Autofac!Autofac.Builder.RegistrationBuilder`3[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]].InstancePerMatchingLifetimeScope(System.Object)
Autofac!Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(System.Object, System.Action`1<Autofac.ContainerBuilder>)
Orchard_Framework!Orchard.Environment.DefaultWorkContextAccessor.CreateWorkContextScope(System.Web.HttpContextBase)