Friday, December 14, 2012

Stealth Settings for Skype


For a very long time, I have been dying to see the Invisible Mode applied selectively.

There are many times, or perhaps daily, when I want to be Invisible only to certain Contacts, or just one Contact, but not to everyone else.

This feature is available in various Instant Messengers, such as the Stealth Settings (for individual Contacts) in the Yahoo Messenger.

But there is no such setting in Skype as of now. There is a workaround however.

I simply block the contacts when I don't want to talk to them, then just unblock them when I want to.  If you block a contact, you will appear as offline to them regardless of the status you selected.  They will also receive no notification or warnings when you block or unblock them.

Wednesday, December 5, 2012

What does Operation is not valid due to current state of the object exception mean?


Error message

System.InvalidOperationException: Operation is not valid due to the current state of the object.

Stack trace

[InvalidOperationException: Operation is not valid due to the current state of the object.]
at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()
at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding\ encoding)
at System.Web.HttpRequest.FillInFormCollection()

[HttpException: The URL-encoded form data is not valid.]
at System.Web.HttpRequest.FillInFormCollection()
at System.Web.HttpRequest.get_Form()
at System.Web.HttpRequest.get_HasForm()
at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
at System.Web.UI.Page.DeterminePostBackMode()
at System.Web.UI.Adapters.PageAdapter.DeterminePostBackMode()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)

Cause:
  • Microsoft’s Security update MS11-100 released on December 28, 2011, limits the max no. of form keys, files and JSON members to 1000 in an HTTP request. 
  • ASP.NET rejects requests that have more than 1000 of these elements and the user sees an error in the browser.
  • In the older version of ASP.NET( i.e prior to this update) HTTPValueCollectionClass did not have the ThrowIfMaxHttpCollectionKeysExceeded method. This method was introduced in the class after this update. So if the request contains more than 1000(default value) elements, we see this exception.
Solution: 
Increase the value of key aspnet:MaxHttpCollectionKeys to a higher number for example 1500.


Side-effect
The amount we specify has an impact on upload speed of our content, which will be proportionally slower. Therefore, it’s better to set the value, that should be enough for the exception to not occur.