Question

I'm getting the following exception from System.IO.Path.CheckInvalidPathChars() in mscorlib:

[ArgumentException: Illegal characters in path.]
System.IO.Path.CheckInvalidPathChars(String path) +142
System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength) +100
System.IO.Path.GetFullPath(String path) +187
System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri) +114
System.Xml.XmlTextReaderImpl..ctor(String url, XmlNameTable nt) +135
System.Xml.XmlDocument.Load(String filename) +85
Sitecore.Web.UI.WebControls.WebEditRibbon.ConvertToJson(String layout) +210
Sitecore.Web.UI.WebControls.WebEditRibbon.Render(HtmlTextWriter output, Item item) +1268
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter output) +387
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +11279890 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5274

The thing is, I don't what the path value is that's causing this error. It would help if I could debug the method so I can see the value of the path parameter. I enabled stepping into the .Net Framework code in Visual Studio 2010. I've also loaded the related .Net Framework Symbols from the Microsoft Symbol Servers. However, it seems these PDBs don't include the source; so I can't step into CheckInvalidPathChars and retrieve the path value.

Is it possible to debug mscorlib and step through its source?

Relevant info:

  • .Net Framework 4.0.
  • Visual Studio 2010

Any constructive input is greatly appreciated.

Thanks, Frank

Was it helpful?

Solution

You can get the reference source for the .NET libraries.
http://referencesource.microsoft.com/

Looking at your stacktrace, the problem appears to be originating in Sitecore.Web.UI.WebControls.WebEditRibbon.ConvertToJson. That thing is trying to load an XML file.

OTHER TIPS

Using reflector would allow you to do that.
Is it possible that you enabled to break on all exceptions? Doing that would certainly account for internal exceptions showing up in the debugger. If this is the case, you can safely ignore the exception.

Well mscorlib.dll on your machine is of release build so even though you can very well debug into it, you won't be able to see values local variables/objects etc. The code in this binary is optimized. If you want perfect debugging experience of Microsoft .NET code then you will need to install debug version of .NET on your machine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top