Welcome to MSDN Blogs Sign in | Join | Help

27th June 2008

It’s a little over 2 years that we first heard of it ...today was the inevitable day.

I wasn't fortunate enough to attend the Bill Gates town hall in person today. Though it was being webcasted to all MPRs on campus - I decided to watch it from my desk, after all I feared shedding a tear in front of a whole bunch of colleagues. But the load on the network gave me the slip and I had to go into an MPR. I couldn't help but shed a tear - but I wasn't alone - the man himself shed a few tears when the energetic Big Boy Ballmer couldn't hold himself together any longer, that moment, I’m sure the whole world broke down. Dang - Today hurts deep.

As I ask myself when the first time was I ever heard of Bill Gates. I can't even remember it’s something like how you don't even remember someone telling you – “this is your brother” or "this is your sister". I grew up knowing this chap - he wasn't just a hero, or just an inspiration, he is a way of life - someone who we look up to as a role model who we can’t replicate even a smallest fraction of how we live not just our professional life but also our personal.

The media covered the day pretty well, even my mother who is generally up to date on things but not technology in particular, was eager to speak to me today about how the media was covering Bill. However, everyone seems to be bidding farewell to Bill. This is ok for people who just saw him as an entrepreneur, as a computer industry leader. However, for people who look up to him as a role model, it’s just another chapter, they realize that Bill Gates is just being himself, doing things others didn't even dare to dream. He started this company even before I was born, I believe in everything that this company does, I'm a part of it just cause of him. ..and I hope someday, I get the courage to give up all the small little things I may have done but hold close and move on to be of any little help I can be to people around the world, be it in Education or Health.

Bill, you just didn't create Microsoft, you created the software industry. Every person in this industry, be it they work for Microsoft, its partners or even its competition, holds you in high regard, we hope to work hard, smart and in every way to push this industry and its state of the art forward and continue to make you proud!

Posted by mjeelani | 1 Comments

IIS 7 Mobile Admin

IIS 7 Mobile Admin lets you remotely administer a IIS 7 Web server right from your mobile phone. I do like the fact that this is a web application and not a smart/thick client running natively on the phone. Nothing stops you from even borrowing your friend's iPhone (I assume you use a Windows Mobile :) - feedback on how it looks on an iPhone or any other phone to sukesh) and go about administering your web site from anywhere.

Read more on Sukesh's blog at http://www.awesomeideas.net/page/IIS7-Mobile-Admin.aspx

Sukesh has also shared the source code on Codeplex, if there is a feature you'd like to contribute towards, you can find the project at http://www.codeplex.com/IIS7MobileAdmin/

Thanks a ton for this utility Sukesh, it sure rocks!

Posted by mjeelani | 1 Comments

Assigning Keyboard Shortcut / Access Keys to your WPF Application

Assigning shortcut/access keys to say a button (So instead of click on the Next Button you can press N on your keyboard) is something really trivial in a the Windows Form's world - but strangely in WPF the friendly '&' that you place in front of the Char of your Windows Forms Text property fails to work. At least at the time of writing this post all major search engines seems to return minimal information on how to set an access key for a button.

As it turns out in WPF you need to use the _ (underscore) char instead of a & to assign a shortcut key. Thanks to a colleague of mine who pointed out the reason for it being that using a '&' in XAML would require typing &amp due to XML syntax.

Rob Relyea and a few others from the VS 2008 Designer and Blend team discussed on an internal alias as to how to make it easier for developers moving from the Windows Forms/Visual Basic world to be made aware of this change. If you do have any suggestions do drop a comment below or you can also leave a comment on Rob's blog post on this topic here.

Posted by mjeelani | 1 Comments

Speaking at Tech Ed, India this Saturday

Rajesh Sampath and I will be speaking at Tech ED India (or Techmela as it’s called in its new incarnation, which is an amalgamation of Tech ED, Mix, MEDC and ITPC all happening at the same time, same place!). We will deliver a talk titled Model Driven Development using Microsoft Domain Specific Language Tools. We will start with a background on Model Driven Development, touch upon Software Factories and then dive deep into Domain Specific Language Tools, what they are, how you can create your own Domain Specific Language and at the end take a look at an implementation of a DSL within Microsoft IT.

So if you are in Mumbai attending TechMela this Saturday (16th June) and are interested in Domain Specific Languages then do drop by for our session slated at 16.20.

Posted by mjeelani | 1 Comments

"Common Language Runtime detected an invalid program" - InvalidProgramException - When your application has a really large method.

If you've written a whole bunch (and I mean a really big WHOLE bunch) of code inside a method, constructor or the like, there is a good chance you'll see this exception.

We had an application that would generate an Assembly using CodeDom based on certain parameters. The parameter list for one scenario got so huge that the app generated a class with a constructor with 39,000 lines of code. When we tried instantiating an object of this class our app would just crash with a "Common Language Runtime has detected an invalid program" - InvalidProgramException.

PEVerify.exe would not return any errors (and say that the IL is just fine) but when you try and run NGEN.exe it would fail at that gigantic method.

So the problem is with the JIT compiler. There is a limitation on the number of local variable the JIT compiler in the CLR can handle for .NET 2.0 - which was restricted to a max of 32767 (which includes the local used by the JIT itself as well). So once in a blue moon with a GIGANTIC method that you just can't do with out for some strange reason will give you this Exception. This problem is documented in KB (I would like to point out that this is not the only scenario in which the CLR would throw the InvalidProgramException, this is one of the reasons you'd see it).

There is a Hotfix available for this problem now which increases the limit of local variables from 32767 to 4 million. The problem (and hence the reason for this blog entry) is that KB 919514 (http://support.microsoft.com/?kbid=919514), which is related to the Hotfix doesn't seem related at all from the description. And the KB that does sound related KB 312544 (http://support.microsoft.com/kb/312544 - problem  #3) doesn't speak of the Hotfix. Our appologies for this confusion - I've written an email to the content team to resolve this documentation issue.

Till then please read KB 919514 and contact PSS for the Hotfix. This fix has already been branched into the Orcas release.

 UPDATE (29/12/2006) : I just got a notification that the content team has updated KB 312544 to reflect the availability of the Hotfix.

Posted by mjeelani | 7 Comments
Filed under: ,

Windows Powershell - Cooler than Cool!

As you probably know Windows Powershell has RTWed! You can find the download links and more information on the Windows Vista blog or the Windows Powershell blog.

The Windows Vista blog lists 12 Cool Features of Windows PowerShell. I just wanted to add a couple more. So here goes…

[upto #12 here]

13) Native support for navigating the Windows Registry & Windows Certificate store

Browse through the Windows Registry and Windows Certificate store like how you would browse through a folder structure on a Hard drive

Switch to the registry by typing cd hklm:

PS C:\> cd hklm:

Browse hives like Directories/Folders  

PS HKLM:\> cd software

PS HKLM:\software> dir

   Hive: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software

SKC  VC Name                           Property
---  -- ----                           --------
  1   1 C07ft5Y                        {(default)}
647   0 Classes                        {}
 10   0 Clients                        {}
  3   0 ComputerAssociates             {}
  1   0 Crystal Decisions              {}
  1   0 Gemplus                        {}
  1   0 InstallShield                  {}
  1   0 L&H                            {}
  1   0 Macromedia                     {}
146   0 Microsoft                      {}
  2   0 ODBC                           {}
  1   0 Policies                       {}
  0   1 Program Groups                 {ConvertedToLinks}
  1   0 Schlumberger                   {}
  0   1 Seagate Software               {ConfIIS4}
  0   0 Secure                         {}
  2   0 VapiVS71                       {}
  2   0 Windows 3.1 Migration Status   {}

Its the same with Certificate store - just use cd cert:  

14) Native support for XML

Windows Powershell has native support for XML, infact XML is a data type. Here’s an example, for simplicity sake I’m not reading the XML from a file but typing it in. Its really easy to ready XML off a file BTW.

PS C:\> $MyXml = [xml]"<Order><OrderNumber>11111</OrderNumber><CustomerName>Bill Gates</CustomerName><Product>Windows Vista Ultimate</Product><Qty>99</Qty></Order>"

So at the Windows Powershell prompt I create a variable $MyXml and pass it a string which contains my Order XML. Notice the [xml] casting that I’m doing, so what I end up with in $MyXml is an XML Object.

I can then access my XML Object simply by typing it out to see the root elements

PS C:\> $MyXml

Order

-----

Order

Or I can see the inner text of the Root elements, Windows Powershell infact formats the output for me in a nice table. It will be much better to view your XML in this way when you have say a lot more nodes within the Order root element.

PS C:\> $MyXml.Order

OrderNumber         CustomerName        Product             Qty

-----------         ------------        -------             ---

11111               Bill Gates          Windows Vista Ul... 99

 

If I want to I can even access a particular node in my XML like this

PS C:\> $MyXml.Order.CustomerName

Bill Gates

PS C:\>

Well there is a whole lot more, you can even use XPATH, here is a great article on MSDN if you are looking out to play with XML using Windows Powershell - http://www.microsoft.com/technet/scriptcenter/topics/winpsh/payette3.mspx

The list can just go on… I’d better stop. Windows Powershell – a shell you’ll fall in love with if you are an admin or a developer – just go try it today!

Posted by mjeelani | 7 Comments

Thursday, 15th July 2006 - Hello *New* World

The world will never be the same - at least for me. Took me a while to let the dust settle in, and to realize that the press conference and the emails that I saw on Thursday were really real. The man responsible for changing the world, to what it is today, is talking about transition plans from the company he created from scratch. Did he choke while ending his talk and introducing Ballmer? I can't believe he said all that till the end with a broad smile. Bill Gates is to Software what Einstein is to Physics. We can't imagine Einstein having had said he will work on Physics part time can we? But then again, this is Bill Gates we are talking about - he is one of a kind - he does the right thing. Software means more to me than Physics - explains why I still have to pinch myself to actually make me believe this is all real.

Where ever you are reading this blog from, I can say with 93% certainty that you are reading it on the software that Microsoft created. For me Microsoft is much more than just a software company that I work for - its a way of life, everything that you do, you impact millions of people, changing the world is a habit at Microsoft. The 70,000 of us worldwide, are inspired to do that only by the *xtra larger than life* leadership. Anybody who has had even a glimpse of the passion and aggression expressed in our annual company meetings and global briefings knows Microsoft isn't to be taken lightly; this isn't just a company, its probably 1 point less than being a religion. No matter how humble Gates was being during the press conference on Thursday in saying that his contribution to the hot new products Microsoft comes out with is over estimated - Well Mr. Gates every employee in your company can do that cause he/she is inspired by you, its not *just* your technical talent, its just the person that you are that inspires everything we do.

Being successful is probably the easy part - what is difficult is not to let success get to your head - not to let the success we've had in the past to change us, not to let that change then cause us not to be successful in the future. Gates has been an inspiration and an icon for me in this respect. Being humble when being the worlds richest man I'm sure isn't easy. I still recall from late 2005 in my second meeting with Gates, a colleague of mine asked (the most asked question) how is it being the worlds richest man? Gates giggled - and then the reply he gave was almost identical to what he said this Thursday, with wealth comes responsibility and he feels responsible on how he spends his wealth and that he has to give back to society the wealth the society has given him in the right areas which is health and education. No one can replace Gates at Microsoft - he will be very dearly missed. I'm sure he will continue to stand by us and continue to inspire the teams at Microsoft even after two years to head out and "Change the world, in ways, it needs to be changed".

In the era of the dotcom boom - I remember seeing an advertisement of a company called 3rd agenda. The advertisement carried the justification for the company's name - Gods 1st Agenda was to create the world, 2nd to send his messengers to spread religion and this company was entrusted with the 3rd agenda which was to evangelize technology. At that time, way back in the year 2000, I was amused but nothing else by the wit. Today it comes back to me. I'm a religious person, have strong belief in god and his prophets, I also believe that there will no more prophets. Maybe technology was really next on Gods agenda, maybe we really are witnessing the execution of the 3rd Agenda. Nothing has changed in the past 30 years as much as Technology and Gates was at the center and was responsible for most of this change.

Though it’s very difficult for me to accept the fact that Gates will no longer be our Cheif Software Architect but for the nobel cause that Gates will be devoting his time to two years from now, my respect for Gates has only grown many folds.

Friday morning saw the dawn of a whole new era, a whole new Microsoft, a whole new world. The leadership that gates is handing over the flag to is strong, young, energetic, inspired, aggresive and passionate about changing the world in just the same way that Gates was 31 years ago. Hello *New* World. Microsoft's leadership might have changed but not its source of inspiration - which has only got stronger, with which we will build better products that out customers can derive more value from, With Gates still as our Chairman we will continue to in Gates's words “change the world, in ways, it needs to be changed”.

Posted by mjeelani | 1 Comments

Troubleshooting problems that arise after installing the update for Microsoft Security Bulletin MS05-051

If you are running XP / Windows 2000 / Windows 2003 - you MUST apply the update on http://www.microsoft.com/technet/security/Bulletin/MS05-051.mspx to stay protected against a critical vulnerability - after you install the Microsoft Security Bulletin MS05-051 - any of the following problems may occur (as per the above mentioned bulletin - Systems that have been modified to non default Access Control List settings on the %windir%\registration directory may experience unexpected behavior)

The Windows Installer service may not start.
The Windows Firewall Service may not start.
The Network Connections folder is empty.
The Windows Update Web site may incorrectly recommend that you change the Userdata persistence setting in Microsoft Internet Explorer.
Active Server Pages (ASP) pages that are running on Microsoft Internet Information Services (IIS) return an “HTTP 500 – Internal Server Error” error message.
The Microsoft COM+ EventSystem service will not start.
COM+ applications will not start.
The computers node in the Microsoft Component Services Microsoft Management Console (MMC) tree will not expand.
Authenticated users cannot log on, and a blank screen appears after the users apply the October Security Updates.

Please take a look at the following KB for a resolution to these problems - http://support.microsoft.com/?kbid=909444 

Posted by mjeelani | 12 Comments

How ActiveSync can affect your Outlook Add-ins

If you develop / use Outlook Add-ins for quite some time you'll run into this fairly common issue with ActiveSync (or any other application that uses Outlook Automation). Users who use PDAs / SmartPhones that run Microsoft Windows Mobile use ActiveSync to synchronize their Outlook information with the mobile device. ActiveSync for this reason starts up Outlook using Outlook Automation (in pure dev language - creates an Outlook.Application object) - Outlook being a Singleton application (only one thread of Outlook.exe runs at any given point in time) if Outlook.exe is already running, ActiveSync uses the current running thread to fetch the Outlook info required to sync with the mobile device.

However, if Outlook isn’t running when ActiveSync is started then ActiveSync creates a new Outlook.exe process - It still does load your Add-ins, however, without the Outlook UI (This is true for all versions of Outlook XP SP3 and above - see http://support.microsoft.com/?id=329098). Since no UI is present the Explorer count at this point would be Zero and a call to the ActiveExplorer() method of the Application class would return a null.

This is fairly important and something that you should always keep in mind when you develop an Outlook Add-in. Always check if the Explorer count is greater than Zero before you make a call to ActiveExplorer. If the count is indeed Zero (which means Outlook has started by Outlook Automation and not using the UI) handle your application gracefully.

A fairly common scenario where developers hit upon is that they try to add buttons to a toolbar on the Explorer - which don’t seem to appear when ActiveSync is started before Outlook. This is because most of the time developers try to add buttons using the ActiveExplorer in the OnConnection event. Since the ActiveExplorer will return a null when there is no Outlook UI - no buttons are added (this can also lead someone to believe that the Addin is not loading though it’s not in the Disabled Items either).

The way you can fix this is by not adding the buttons to the Explorer in the OnConnection event but instead to trap the NewExplorer event, get hold of the Explorer object in this event handler and wire up its Activate event and then add the buttons in the Activate Event instead. Additionally, note that the Activate event fires every time your Explorer object receives focus - so you must check if the buttons already exist on the Explorer before you add them to avoid the buttons being added multiple times.

Posted by mjeelani | 7 Comments

Top 3 Reasons for the "The server instance specified was not found. Please specify the server's address and port." Error

The easiest way to install web parts is probably to use this utility from Microsoft called Install Assemblies - very simple and intuitive interface, takes care of creating the Safe Control entries and even creating DWPs for your web part assemblies.

Install Assemblies internally uses STSADM.EXE - more than often you will face the infamous "The server instance specified was not found. Please specify the server's address and port." error. There can be many reasons why you will face this problem, here are top three reasons I've seen in the field either while installing web parts or while using Object Model code -

1) WSS SP1 not installed on all components

Diagnosis: Go to SharePoint Central Administration -> Click Windows SharePoint Services -> Click Extend or Upgrade a Virtual Server (Second Link) -> In the virtual servers listed, do you see "Upgrade" next to your SharePoint virtual server.

Resolution: Upgrade all your components to SP1 using the STSADM.EXE util -> follow steps listed in this KB article

http://support.microsoft.com/?kbid=871149


2) You receive the above error when using SharePoint Object Model code and using the Hostname/Fully Qualified Domain Name (FQDN).

Resolution: Follow this support article http://support.microsoft.com/?kbid=832816

3) You are using SSL, your code works fine while using http://sitename but not https://sitename

Resolution: Use the IP address with https:// instead of the sitename (eg SPSite testSite = new SPSite("https://65.12.12.12");

- Mohammed Jeelani

Posted by mjeelani | 20 Comments
Filed under:

Using XPath with XML returned by SharePoint Web services

I've seen quite often people writing code that parses thru XML returned by SPS Web services as strings instead of using XPath - cause the XmlDocument throws this error all the time if you dont use an XmlNameSpaceManager

"Namespace Manager or XsltContext needed. This query has a  prefix, variable, or user-defined function."

Heres a snippet that tells you how to use the XmlNameSpaceManager to use XPath with the XmlDocument.

Dim Document As New XmlDocument
Dim xml As String

xml = "<listitems xmlns:s=""uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"" xmlns:dt=""uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"" xmlns:rs=""urn:schemas-microsoft-com:rowset"" xmlns:z=""#RowsetSchema"" TimeStamp=""2004-12-20T20:57:26Z"" xmlns=""http://schemas.microsoft.com/sharepoint/soap/""><rs:data ItemCount=""0""></rs:data><rs:data ItemCount=""0""></rs:data></listitems>"
Document.LoadXml(xml)

'Since the XML returned by SPS contains namespace prefixes - we need to create a XmlNamespaceManager
Dim SharePointNamespacePrefix As String = "sp"
Dim SharePointNamespaceURI As String = "
http://schemas.microsoft.com/sharepoint/soap/"

Dim ListItemsNamespacePrefix As String = "z"
Dim ListItemsNamespaceURI As String = "#RowsetSchema"

Dim PictureLibrariesNamespacePrefix As String = "s"
Dim PictureLibrariesNamespaceURI As String = "uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"

Dim WebPartsNamespacePrefix As String = "dt"
Dim WebPartsNamespaceURI As String = "uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"

Dim DirectoryNamespacePrefix As String = "rs"
Dim DirectoryNamespaceURI As String = "urn:schemas-microsoft-com:rowset"

'now associate with the xmlns namespaces (part of all XML nodes returned
'from SharePoint) a namespace prefix which we can then use in the queries
Dim NamespaceMngr As XmlNamespaceManager
NamespaceMngr = New XmlNamespaceManager(Document.NameTable)

NamespaceMngr.AddNamespace(SharePointNamespacePrefix, SharePointNamespaceURI)
NamespaceMngr.AddNamespace(ListItemsNamespacePrefix, ListItemsNamespaceURI)
NamespaceMngr.AddNamespace(PictureLibrariesNamespacePrefix, PictureLibrariesNamespaceURI)
NamespaceMngr.AddNamespace(WebPartsNamespacePrefix, WebPartsNamespaceURI)
NamespaceMngr.AddNamespace(DirectoryNamespacePrefix, DirectoryNamespaceURI)

'run the XPath query and return the result nodes
Dim xNodeList As XmlNodeList
xNodeList = Document.SelectNodes("//z:row[@ows_Title]", NamespaceMngr)

Mohammed Jeelani

Posted by mjeelani | 8 Comments
Filed under:

Impersonation / Authentication issues when using Integrated Windows Authentication and SharePoint

With Integrated Authentication its fairly often that people find themselves in a situation where the currently logged in users credentials are not passed from the client to a SQL server / File share / some other server that they are trying to access from SPS. I bumped into it myself and was tearing my hair apart till my colleague Walter Warren told me what the "Double-Hop Issue" was.

Though I’ve titled this blog under SharePoint this actually applies to ASP.NET as well. The problem I faced was that i was creating an ASP.NET web page that consumes the SharePoint Search web service. The ASP.NET app was hosted on a different IIS machine than SPS. The ASP.NET application had Integrated Windows Authentication turned on. All was fine when I was testing the ASP.NET page right from the server where IIS was running, however, when I tried running the same page from another workstation - I kept getting 401 - Unauthorized access errors.

This problem is due to Integrated Windows Authentication that’s turned on in IIS for the ASP.NET application virtual directory. The issue is known as the "Double Hop" issue - when we use Integrated Security, the user credentials are passed from the client system (in this case the different station) to the server that’s running IIS (in this case the ASP.NET application). When the IIS running the ASP.NET app makes a request to the SharePoint server (a second hop) it cannot pass the user credentials passed from the client system. This is a little known documented limitation in IIS, you can refer to a KB on http://support.microsoft.com/default.aspx?scid=kb;en-us;264921 (check the limitations section under Windows NT Challenge/Response - Integrated Windows Authentication was formerly named NTLM, or Windows NT Challenge/Response authentication).

There are 3 ways to workaround this problem

1) Turn of Windows Integrated Authentication and turn on Basic Authentication
2) Hardcode the credentials passed to SharePoint in the ASP.NET application code
3) Turn on Kerbrose Authentication

Option 1) Turn of Windows Integrated Authentication and turn on Basic Authentication

You can turn off Integrated Authentication and turn on Basic Authentication on the virtual directory running the ASP.NET application. With this you should be prompted for your user name and password every time you try to access the ASP.NET application and unlike Integrated Windows Authentication - your credentials are passed even in the second hop.

Note that the drawbacks of this option are
 i) in Basic Authentication the user credentials are passed as clear text
 ii) users will get a pop-up asking for user credentials every time they try to access your page.

Option 2) Pass user credentials using code

My code used the default credentials from the credential cache - however you can hardcode the credentials that are passed to SharePoint. In the SPS web service case i had to create a NetworkCredential object with the user credentials hardcoded and set the object to the Credentials property of the QueryService proxy object.

Changed the line from

 qs.Credentials = System.Net.CredentialCache.DefaultCredentials;

To
 qs.Credentials = new System.Net.NetworkCredential("<User Name", "<Password>", "<Domain Name>"); 

In the case of a Fileshare, etc - you will need to use an unmanaged API to impersonate the user on the SPS machine, here is an MSDN article to do that http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemSecurityPrincipalWindowsIdentityClassImpersonateTopic.asp

You can alternatively instead of hardcoding the credentials in code - you can put them in the Web.Config file and retrieve at run time. If you do this - you should also encrypt the password.

Option 3) Turn on Kerberos Authentication

You need to turn on Kerberos on IIS and configure SharePoint for this - you can refer to this KB article for the exact steps http://support.microsoft.com/?id=832769

Any of these three options should resolve the problem.

Mohammed Jeelani

Posted by mjeelani | 26 Comments
Filed under:

Creating a WebPart that works both as a consumer and a provider

If you ever have to create a web part that needs to act both like a provider and a consumer in which case you'll need to implement more than one Interface, you'll need to create separate classes that implement the separate interfaces...

To make a web part work both as a provider and a consumer you'll need to create three classes...

1) public class CellProviderInterface : ICellProvider
2) public class CellConsumerInterface : ICellConsumer
3) public class WebPart1 : Microsoft.SharePoint.WebPartPages.WebPart

In classes CellProviderInterface and CellConsumerInterface you'll have to implement the ICellProvider and ICellConsumer interfaces.

In your WebPart class you need to instantiate the two classes that implement the ICellProvider and ICellConsumer (viz. CellProviderInterface and CellConsumerInterface)

//instantiate your classes
CellConsumerInterface oCellConsumerInterface = new CellConsumerInterface();
CellProviderInterface oCellProviderInterface = new CellProviderInterface();

And When you register your interface's in the overridden EnsureInterfaces() you need use the instances of these two classes.

public override void EnsureInterfaces()
{
 // Register the ICellProvider interface
 RegisterInterface("CellProvider_WPQ_",
  "ICellProvider",
  WebPart.UnlimitedConnections,
  ConnectionRunAt.Server,
  oCellProviderInterface,
  "CellProvider_WPQ_",
  "Provides a cell to",
  "Provides a cell of data");


 // Register the ICellConsumer interface.
 RegisterInterface("CellConsumer_WPQ_",
  "ICellConsumer",
  WebPart.UnlimitedConnections,
  ConnectionRunAt.Server,
  oCellConsumerInterface,
  "CellConsumer_WPQ_",
  "Consumes a cell from",
  "Consumes a cell of data");
}

Here’s some sample code that does something very similar….

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/smpxCreateConnectableWPMultipleInterface_SV01080585.asp?frame=true

Jeelani

Posted by mjeelani | 7 Comments
Filed under:
 
Page view tracker