Thursday, 10 May 2012

Timeouts when debugging in VS

If you are debugging a  w3wp process in VisualStudio, but it always breaks after some short time of inactivity, go to inetmgr, open Application Pools, select your pool, Advanced properties, and set Ping property to False:


Thursday, 3 May 2012

WinDBG bible. Chapter one.

And here I am, starting bunch of posts (I hope there will be more than one!) about simple windbg usage. All you need to know if you are new to memory debugging, but want to step in it.



First of all. What is memory dump? Memory dump can be simply explained as "photo" taken of all memory consumed by our process at some point of time. Looking at this photo, we can everybody pictured in it, and blame somebody for taking too much space or jumping into the foreground scene :)

How to create memory dump?

Thursday, 19 April 2012

I've just got in the situation where simple code like:

using (new SecurityDisabler()){
//publish item
}

didn't work.

I was so sure in fact that it should work because of my previous experience with Sitecore, that it took me some time to find the problem. And here it is: there is a setting Publishing.CheckSecurity in web.config. When it is set to true, Sitecore uses SecurityEnabler when publishes, so turning on SecurityDisabler before it makes no sense.

If you run into same question, just use UserSwitcher or disable Publishing.CheckSecurity.

Wednesday, 18 April 2012


To filter comments like <!-- smth with linebreaks --> in WinMerge:

1. Go to C:\Program Files (x86)\WinMerge, open IgnoreSectionMarkers.ini file
2. Delete everything that is there.
3. Put next lines in the file:


[set0]
StartMarker=<!--
EndMarker=-->
InlineMarker=<!--
FileType0=xml
FileType1=config

4. Save file and restart WinMerge.

To make these changes take effect, you need also next changes to WinMerge options:
"Compare" section: 
  • disable "Match similar lines" checkbox
  • enable "Filter comments" checkbox

Thursday, 12 April 2012


Simple WinMerge filter:


---
def: include ##will select all files without [filter below] in name

f: (2) ## Match all files with (2) in name
f: \.disable$
f: \.example$
f: \.bak$

Thursday, 5 April 2012

Very useful for Reflector:


If you use auto-properties instead of traditional ones they are named <Name>k__BackingField instead something like _Name.  

Monday, 19 March 2012

And I'm still discovering ECM :)

There is a new version of ECM that is going to be released soon. Well, now, when I'm going to publish this post, new version is officially released as ECM 1.3.2

Yesterday I had an informative meeting with Ivan Korshun about "what's new" in this upcoming version. Two main features are Emulation mode for concrete mails and DispatchSummary.aspx page.

Tip 1. First thing to remember is that DispatchSummary shows only current dispatch tasks, and doesn't show test task.

Tip 2. Another fun thing that I want to notice is understanding on generating and sending threads. Actually, there are 2 settings - NumberThreads and MaxGenerationThreads. Surprisingly, they are tied up with each other. For example, we can have 8 generating threads and 100 threads at all. This means, that we can generate 8 emails simultaneously. As soon as thread finishes generating email, it becomes a sending thread. Next free thread for generation is taken from the thread pool. And so on, until job is finished or until we reach end of pool.

Tip 3. Required Bandwidth = V/T. Amount of mails divided by time of sending (if only not local MTA is used).

All other information that we have discuseed, and consequently all dispatch real-time info that we can oversee, is described thoroughly in Sitecore ECM Tuning guide (http://sdn.sitecore.net/Products/ECM/ECM%201,-d-,3/Documentation.aspx). Looks like really powerful feature. Happy tuning!