SYSK 389: How to set ClientCredentials via Configuration file in Client

I’m working on a project where a service hosted elsewhere requires Windows authentication.  As a consultant, my computer is not on the customer’s domain, so, using my logged-on Windows credentials won’t do any good.  And, doing nothing results in the following exception:  “The caller was not authenticated by the service.” and inner exception is “The…


SYSK 380: How to Get Rid of Double Scroll Bar in Microsoft Report Viewer Control

Special thanks to David Petersen who has submitted this post!   If you ASP.NET page that contains the Report Viewer Control, has double scroll bars, you can remove them by including two separate form elements on the page: 1.    First <form> element Includes your Headers and so forth (notice the absence of runat=”server” attribute in…


SYSK 373: How to Impersonate the Original Caller When Calling the WCF Service in ASP.NET by Configuration Only

If your WCF services use role based authorization, and you need to pass the identity of the end user (original caller), you have a few options:   1.    Use <identity impersonate=”true” /> in web.config   This is not my preference since there is quite a bit of overhead with doing security context switching for every…


SYSK 364: AJAX Extensions 1.0 Source Code and Debug Symbols

Did you know that AJAX Extensions source code and debugging symbols are available to everybody at    


SYSK 339: Menus and Other Popups Without Any JavaScript

The other day I came across the following article by Eric Meyer —    Basically, instead of using JavaScript, you use CSS to change an element style that results in some other element(s) appearing (e.g. submenu when user hovers over the top menu item).   Below is a simple example that demonstrates this concept:…


SYSK 337: JavaScript – Should You Define Functions Inside a Prototype or Outside?

Yesterday’s post described three ways to extend an existing type.  It occurred to me that there is one more, slightly different mechanism, for defining a prototype function… you can think of it as Method 2-b.   Consider the following:   function TestClass(param1) {     this._param1 = param1;             TestClass.prototype.get_param1 = function()     {        …


SYSK 336: Three Ways to Extend a Existing JavaScript Type

Since I haven’t seen a clear and a relatively concise explanation on this topic, I decided to create this blog post…   If you want to add a function (i.e. extend) to an existing type, there are three ways that I know of to accomplish this.  For example, take the existing String object which comes…


SYSK 332: How To Register Custom Controls Once For All Web Pages

Did you know that since .NET 2.0 you can define register directives in the <pages> element in your configuration instead of using @Register directive on every page?  It’s especially useful if you’re using a custom control(s) in multiple web pages.  Here is an example of registering controls from MyControlLibrary assembly and controls from the web…


SYSK 331: How To Expose A Client-Side Event From Your ASP.NET Control

Consider the following scenario – you create your own calendar control and you’d like to raise an event when a date is selected (e.g. OnDateClicked)… and you’d like for the users of your calendar control to process the event using JavaScript on the client (or think of any other scenario of when a custom client-side…