Feeds:
Posts
Comments

Archive for July, 2011

Here is a NLog config file that generates a similar log file layout as with the (default) Log4Net settings.

This NLog configuration also includes the date in the log file name to mimic the Log4Net ‘rollingFileAppender’ behavior.

file: NLog.config

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      autoReload="true">

  <targets>
    <target name="logfile" xsi:type="File" fileName="C:\Projects\logs\MainLog.${shortdate}.log" layout="${level:padding=-6}  ${threadid:padding=-4} ${processid}   ${longdate}  ${logger:shortName=true:padding=-24} ${message} ${exception:format=ToString,StackTrace}"/>
  </targets>

  <rules>
    <logger name="*" minlevel="Trace" writeTo="logfile" />
  </rules>

</nlog>

Read Full Post »

When using a custom master page and editing a page in SharePoint 2010 I received a dialog box the following error:

“You must specify a value for this required field”.

This error is caused when you set the contentplaceholder ‘PlaceHolderPageTitleInTitleArea’ to: Visible=”False”. After removing the Visible=False attribute from the contentplaceholder the error disappeared.

As a workaround you can wrap the contentplaceholder in a <div> and hide the div with a little CSS. That way the contentplaceholder is still in place but hidden for the user.

<div style="display: none;">
    <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" >&nbsp;</asp:ContentPlaceHolder>
</div>

Hope it helps.

Read Full Post »

Follow

Get every new post delivered to your Inbox.