Where do you deploy custom SharePoint web service files to? (.asmx, disco.aspx and wsdl.aspx)

Recently someone asked me to troubleshoot the problem he had with the custom web service he created.

He followed the instructions from MSDN article "Walkthrough: Creating a Custom Web Service" and generated MyWebservice.asmx, MyWebservicedisco.aspx and MyWebservicewsdl.aspx files. He also made changes to contract reference and SOAP address in both disco.aspx and wsdl.aspx to provide the necessary redirection and maintain the URL virtualization.

Web service was deployed to 12\TEMPLATE\LAYOUTS in file system and can be viewed from URL http://<site>/_layouts/MyWebservice.asmx or http://<site>/<subsite>/_layouts/MyWebservice.asmx without any issues.

"Everything looks fine except..." - he said

At this stage I knew what the problem was and his description of the problem confirmed it.

"Everything looks fine except the web service function call returns an incorrect and unexpected result"

Yes, it could be the code logic errors. But I sticked to the one obvious mistake he has made. I told him that "Only deploy your custom web service files to 12\ISAPI (\_vti_bin\) folder unless you know what you are doing"

I have seen this problem many times before from different developers, third party vendor's and IT supports. They all have their own reasons (wrong reasons) for not to deploy their custom web service files to 12\ISAPI.

Why _vti_bin folder



Showing "my links" with QuickLinksMicroView web part - Issues you should know about

Ishai's post - Showing "my links" on a web page has explained how you can use the QuickLinksMicroView web part to show users "my links" on SharePoint web part page.

The web part looked great when I first added it to the web part page, but it wasn't long before I discovered some of "bugs" in this web part. Bugs or by design?

I will show you what those bugs are by using following configurations: Two groups, 6 links in the first group and 3 links in the second group.

James Tsai .Net SharePoint Blog - QuickLinksMicroView Items

Now let's change the default "Number of rows to display" value from 10 to 2

 James Tsai .Net SharePoint Blog - QuickLinksMicroView Configuration

Click Ok and see what it gets us.

1. "Show/Hide additional links" hyperlink will not work without "portal.css" CSS registration

James Tsai .Net SharePoint Blog - QuickLinksMicroView No Portal CSS

As you can see there is a "show 4 additional links" hyperlink at bottom of the first group (Don't worry about the second group for now, I will get to that later).  Click on the link toggles the display text (hide/show 4 additional links) without change the number of displayed items in group (no actual hide or show for additional items).

The problem here is More...


How To Create AJAX-enabled SharePoint Web Part with UpdatePanel and UpdateProgress in 10 minutes

In this post I am going to show you how you can setup your SharePoint site to support Microsoft ASP.NET AJAX framework and create a basic AJAX-enabled SharePoint Web Part. You can find many great articles on MSDN on how to do these and they explained in more details, but if you are looking for a way to get it up and running in 10 minutes, this is it.

James Tsai .NET SharePoint Blog - AJAX enabled webpart 

James Tsai .Net SharePoint Blog - AJAX enabled webpart updating

An AJAX-enabled web part with update button and display current time every time when button is clicked. Loading image and text displayed during the update.


  • Enabling SharePoint site with ASP.NET AJAX framework support
  • Create AJAX-enabled SharePoint web part
    • with UpdateProgress control for visual feedback in browser when web part is updating
    • with AJAX request event script to hide UpdatePanel while web part is updating
  • Add AJAX-enabled web part to page and see it in action



How to change SharePoint Calendar default start hour and end hour of Day View

Default Day View of SharePoint Calendar control has its start hour set to 7am and end hour to 5pm.

James Tsai .Net SharePoint Blog - Default Day View Start Hour

To change this you'll need to update SPRegionalSettings.WorkDayStartHour and SPRegionalSettings.WorkDayEndtHour properties. And it is not something you can do from UI.

For example, to change start hour to 6am and end hour to 6pm you'll have to write and run this code

using (SPSite site = new SPSite("http://<YourSiteUrl>"))
    using (SPWeb web = site.RootWeb)
        SPRegionalSettings regionalSettings = web.RegionalSettings;
        regionalSettings.WorkDayStartHour = 360;
        regionalSettings.WorkDayEndHour = 1080;


The possible values you can set for WorkDayStartHour and WorkDayEndHour are 60 x (hour value in 24 hour format).

Basically, they are total number of minutes. For example,

6am = 6 x 60 = 360

6pm = 18 x 60 = 1080

9pm = 21 x 60 = 1260 and so on..

As you can see, the start hour of Day View in calendar has now changed

James Tsai .Net SharePoint Blog - Changed Day View Start Hour

Hope it helps



How to use SharePoint Delegate Control to change the navigate URL of Manage Links (My Links)

Microsoft Office Online -

By using the My Links menu, you can easily add new links, reorganize your links, access sites where you are a member, and click links to save them to you My Links list.

You can use this feature when you have "My Site" setup and running in your SharePoint Shared Services.

James Tsai .NET SharePoint Blog - My Links Manage Links menu control


Let's say you have following two site collections setup for your SharePoint intranet site and My Site.

Intranet - http://intranet/

My Site - http://mysite/

When user is accessing manage links page by clicking on My Links, Manage Links menu on Intranet site, the menu control redirects user to


And you probably don't want this to happen, because of following reasons

  • You want to hide My Site from user, but you still want to use My Links feature.
  • You don't want user to navigate away from current site collection when they clicked on the Manage Links menu.
  • You want MyQuickLinks.aspx page to inherit and use current site theme.
  • You are experiencing the MOSS SP1 bug I described in last post.
  • OR you just want to customize it to navigate to the any URL


The goal here is obvious. To customize the navigate URL of Manage Links. In the example above, user should be redirected to



You'll need following three things to achieve the goal