Tangible Thoughts

SharePoint, MOSS? and all the other questions

  Home  |   Contact  |   Syndication    |   Login
  851 Posts | 6 Stories | 426 Comments | 2142 Trackbacks

News

Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

Linky Things

SharePoint Bloggers

SharePoint Related

What I am playing

What I am Reading

Thursday, October 15, 2009 #

[code]

/// <summary>
/// Gets or sets the site URL.
/// </summary>
/// <value>The site URL.</value>
[WebBrowsable(true),
WebDescription("Url of the site to process reports on"),
WebDisplayName("Site Url"),
Personalizable(PersonalizationScope.Shared)]
public string SiteUrl
{
    get
    {
        if (string.IsNullOrEmpty(siteUrl))
        {
            return SPContext.Current.Web.Url;
        }
        return siteUrl;
    }
    set
    {
        siteUrl = value;
    }
}


[/code]

The above code snippet looks like  a  reasonable WebPart Propperty. In-fact you will find nothing weird with it untill you provision this webpart through a feature.

What happens is the reference to the SPContext…. in the property messes up the WebPart Order on the page and moves the webpart to Order 1 (i.e. first webpart on the zone), no matter what other preference you would have set in your feature.

Interesting eh? Something to keep in mind for future


Crossposted from tariqayad.com


Monday, September 07, 2009 #

I have been looking for a software for a specific purpose but havent found it yet, so was wondering if anyone out there knew of something that serves this purpose.

Let me explain.
I want to have a Centralised Media Repository at home, like  a server which other devices (laptops, pda etc) can connect to and listen to mp3s etc off the server (possibly by streaming).  Users connecting to the server should be able to search media, browse media by album, artist etc.

Does anyone know of any software that suits this purpose?

Friday, August 21, 2009 #

This is old news but still its a great tip http://www.harbar.net/archive/2007/04/25/Rightclick-a-.WSP-to-Add-Solution.aspx How to get an "Add Solution" option as a shell extention in windows explorer

Crossposted from tariqayad.com


Tuesday, August 04, 2009 #

There is a new version of Office Communicator Mobile available.

But one feature that I really want is still missing, i.e. for COMO (Communicator Mobile) to run of the storage card. Microsoft Guys please can you add this? The main memory on the phones are not huge you know, typically about 100 MB or less, which gets consumed by every other app for some reason or other wanting to dump some files into the /Windows.

Technet points to the folowing

"Can I install Communicator Mobile (2007 release) on my device’s storage card?

No. Installing Communicator Mobile (2007 release) on a storage card is not supported because a device does not necessarily immediately detect a storage card when the device starts. As a result, Communicator Mobile’s auto-start feature cannot function as intended. Installing Communicator Mobile to a storage card is also not supported because when a device’s battery is low, the operating system stops running programs that are installed on the device’s storage card."

http://technet.microsoft.com/en-us/library/bb963948.aspx

But what if I don't want communicator on my today screen or for it to auto start, then can I please still install it on my Storage card.

Crossposted from tariqayad.com


Monday, August 03, 2009 #

Over the last few months there has been quite a bit of news regarding Windows Mobile that has focused on 'pumping-up' the platform to compete with everything else out there (including the iphone)

for instance

But what has me stumped is the cost of breaking into development, the IDE Visual Studio Standard Edition still requires some hard thinking before investing for the hobby developer (which as you would notice accounts for quite a percentage of the Apps on the Apps Store)

Which brings me to the following question "What has Microsoft to lose by making a Visual Studio Express: Mobile Development Edition?". If they do make an express version for Windows Mobile development, wont there be a ROI if the apps developed make their way to the MarketPlace.

Also in my opinion the Windows OS got its leg up against all of its competitor because of the number of applications available for it.


Crossposted from tariqayad.com


Thursday, July 30, 2009 #

Its been quite a bit of struggle for me to find an accurate way of finding the netbios name of a domain from AD using System.DirectoryServices.

In case you are in the same jam here how you do it.

  1. Connect to AD using the following ldap url:

    LDAP://CN=Partitions,CN=Configuration,DC=<DomainName>,DC=<local|com>

  2. When querying AD using the Directory Searcher object uses the following filter:

    netbiosname=*

This should give you a record from AD containing the netbios name of the domain as the CN

Explanation

AD stores the the netbios name in the Partitions naming container which is stored inside the configuration naming container.

A more detailed explanation and more samples can be found in the Active Directory Cookbook or its online version

 

Code sample:

// Method call

string netBiosName = GetNetBiosName( LDAP://CN=Partitions,CN=Configuration,DC=<DomainName>,DC=<local|com>,  "<userName"", "<password>");

// Method call

 

// Method Definition

private string GetNetBiosName(
    string ldapUrl,
    string userName,
    string password)
{
    string netbiosName = string.Empty;
    DirectoryEntry dirEntry = new DirectoryEntry(ldapUrl,
            userName, password);

    DirectorySearcher searcher = new DirectorySearcher(dirEntry);
    searcher.Filter = "netbiosname=*";
    searcher.PropertiesToLoad.Add("cn");

    SearchResultCollection results = searcher.FindAll();
    if (results.Count > 0)
    {
        ResultPropertyValueCollection rpvc = results[0].Properties["CN"];
        netbiosName = rpvc[0].ToString();
    }
    return netbiosName;
}


Crossposted from tariqayad.com


Wednesday, July 29, 2009 #

From neowin.net I came across this game.

http://pagehunt.msrlivelabs.com/PlayPageHunt.aspx

Its not exactly a great timer waster but its good for a good 5 minutes before you get bored.

What I still don't get is, Bing should take into account any suggestion we may make for returning the page result, instead of saying "no thats not it".


Crossposted from tariqayad.com


Wednesday, July 15, 2009 #

Zoom SMS image, Hotlinked :) Here is a cool app for Windows Mobile. It gives you 2 neat icons on your today screen to indicate missed calls or text messages. Clicking on the icons shows you a popup with text message, or missed call phone number.

You can get it from here.


Crossposted from tariqayad.com


Saturday, July 11, 2009 #

Dr Jerald Dirks, talks about his journey of faith.

Very interesting if you are a seeker of truth

http://tinyurl.com/jdirksfaith


Crossposted from tariqayad.com


Wednesday, July 08, 2009 #

Yep, Just followed these instructions and they worked.

http://www.cognitial.com/hiccups.asp


Crossposted from tariqayad.com


Sunday, July 05, 2009 #

I was writing an extension for my blog that uses the MetaWeblog API, so here is what I have learnt about it.

It uses XML RPC for communication. So if you are coding in .NET you will need the xml-rpc library from CookComputing.

 

XML-RPC

Firstly an Introduction to XML RPC over here (I would recommend reading the whole series posted there) so that you may get an idea of

1. XML RPC Types

2. Request

3. Response

4. Errors (a.k.a. Faults)

 

Using CookComputing XML-RPC.Net

The following link shows you how to use xml-rpc.net library from cook computing connect to the WordTracker system.

Link

MetaWeblogAPI

I would recommend you reading the MetaWeblogApi spec to have an understanding of what the API is expecting as the payload of the RPC calls.

So getting down to detail

1. Making a Post

The metaWeblog api new post method signature is

metaWeblog.newPost (blogid, username, password, struct, publish) returns string

which translates as the following into csharp decorated with Xml_rpc.net

[code:c#]

[XmlRpcMethod("metaWeblog.newPost")]
        string newPost(
            string blogid,
            string username,
            string password,
            XmlRpcStruct rpcstruct,
            bool publish);

[/code]

Please note the parameter of type XmlRpcStruct, you can use a regular struct instead of this, and XmlRpc.net will translate it into a XmlRpcStruct type.

What is mandatory for this struct to have is a title, description and link. For blogengines that don't support link pass "content" as the value.

Ok so this is fine and dandy, but what about more complex blog engines that support tags, categories etc.

What I have discovered is that a well formed struct for that satisfies this requirement is as follows.

[code:c#]

public struct MetaWeblogRpcStruct

{

        public string title;

        public string link;

        public string permaLink;

        public string description;

        public  string[] categories;

        public int mt_allow_comments;

        public string mt_keywords;

        public string wp_slug;

        public string mt_basename;

        public string pubDate;

        public string mt_excerpt;

        public bool publish;

}

[/code]

so the newpost signature now is

[code:c#]

[XmlRpcMethod("metaWeblog.newPost")]
        string newPost(
            string blogid,
            string username,
            string password,
            MetaWeblogRpcStruct mwrpcstruct,
            bool publish);

[/code]

So coming back to RPC, we need an interface that defines the metaweblog api which we could base a proxy on.

hence

[code:c#]

public interface IMetaWeblog: IXmlRpcProxy
{
     [XmlRpcMethod("metaWeblog.newPost")]
     string newPost(
         string blogid,
         string username,
         string password,
         MetaWeblogRpcStruct mwrpcstruct,
         bool publish);

}

[/code]

So now that that is done, how do you make a post.

First you need to generate the proxy

[code:c#]

IMetaWeblog metaWeblog = (IMetaWeblog)XmlRpcProxyGen.Create(typeof(IMetaWeblog));

[/code]

Then set the endpoint for the RPC call (i.e. metaweblog url of the blogengine)

[code:c#]

metaWeblog.Url = "http://localhost/blog/metaweblog.axd";

// Make a post

string ret = metaWeblog.newPost(
                blogId, UserName, Password, struct, struct.publish);

[/code]

What is returned from the metaweblog api when new post is called? A GUID to the post, you will need this if you are to edit the post later on.

2. Editing a Post

The metaweblog api signature for editing a post is

metaWeblog.editPost (postid, username, password, struct, publish) returns true

which when added to our interface looks like

[code:c#]

public interface IMetaWeblog: IXmlRpcProxy

{

     [XmlRpcMethod("metaWeblog.newPost")]

     string newPost(

         string blogid,

         string username,

         string password,

         MetaWeblogRpcStruct mwrpcstruct,

         bool publish);

[XmlRpcMethod("metaWeblog.editPost")]

bool editPost(

    string postId,

    string username,

    string password,

    MetaWeblogStruct content,

    bool publish);

}

[/code]

The procedure is the same as creating a post except the fist parameter "postId" should be the GUID of the post to update.


Crossposted from tariqayad.com


Saturday, July 04, 2009 #

This is a good informative lecture on speaking about "The Way" and it similarities between Christianity and Islam.

Even if you may be resistant to this topic, its still good informative listening.

http://www.thefinestway.com/post/Till-Kingdom-Come.aspx


Crossposted from tariqayad.com


Saturday, June 27, 2009 #

If you are a Windows Mobile User, then this site should be one of your frequent haunts.

Its not? well take a look-see anyway it has a whole bunch of reviews and news.

http://wmpoweruser.com/


Crossposted from tariqayad.com


Amazon is offering pre-orders for Windows & Home Premium at $49.99 as well. Just a heads up because I thought previously thought the offer was only from store.microsoft.com

Link:http://www.amazon.com/Microsoft-Windows-Home-Premium-Upgrade/dp/B002DHLUWK


Crossposted from tariqayad.com


Did you know that Visual Web Developer 2008 can load class libraries as well. It can with SP1 installed, and it seems a bit hidden to expose this functionality.

The trick is to enable "Show Solution" in the solution pane. here is the tip on the official blog.

Once you have the solution showing on Solution Explorer, you can your class library projects. Please note this requires VWD 2008 SP1.