Sunday, May 11, 2008

Microsoft Visual Studio - Web development quickie tip: Quick GAC deployment

I've been across this one so many times before, so I'm adding this entry to remind myself how to automatically deploy compiled libraries to the GAC and recycle the application pool after a successful compilation in Visual Studio 2005/2008:

Add this on the post build events of the Class Library project for quick GAC deployment
“C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil" -i "$(TargetPath)" | C:\Recycle.vbs

Then create a VB Script file using Notepad in location
C:\Recycle.vbs:
strAppPoolName = "DefaultAppPool"
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:{authenticationLevel=pktPrivacy}\\" _
& strComputer & "\root\microsoftiisv2")

Set colItems = objWMIService.ExecQuery _
("Select * From IIsApplicationPool Where Name = " & _
"'W3SVC/AppPools/" &strAppPoolName & "'")

For Each objItem in colItems
objItem.Recycle
Next

Wscript.echo "Recycle Completed"

Change the value of the variable "strAppPoolName" to the name of the application pool that needs recycling.

Tuesday, March 25, 2008

Microsoft SharePoint 2007 - Stsadm extensions

"The branding tool is out. What next? How about an stsadm tool for themes?"

After a search on google, it seems Gary Lapointe has beat me to it:
http://stsadm.blogspot.com/2008/01/apply-theme.html

He's created a very useful list of stsadm extended commands found here.
(http://stsadm.blogspot.com/2007/08/stsadm-commands_09.html)

The source code can be downloaded here:
http://www.thelapointes.com/blog/stsadm.zip

The installation file can be downloaded here:
http://www.thelapointes.com/blog/Lapointe.SharePoint.STSADM.Commands.wsp

Here's a listing of the additional commands:


  1. createquotatemplate

  2. editquotatemplate

  3. setmastersitedirectory

  4. setallowaccesstoonlinegallery

  5. disableuserpermissionforwebapp

  6. enableuserpermissionforwebapp

  7. setselfservicesitecreation

  8. connecttoportalsite

  9. setsitegeneralsettings

  10. setuserprofiledefaultaccessaccount

  11. setuserprofileimportschedule

  12. gen2003to2007profilepropertymap

  13. migrate2003profilesto2007

  14. setpictureurlnewpath

  15. setsitenamingformat (use mysitesettings instead)

  16. enuminstalledsitetemplates

  17. enumavailablesitetemplates

  18. addavailablesitetemplate

  19. removeavailablesitetemplate

  20. enumnavigation

  21. addnavigationnode

  22. setnavigationnodes

  23. copynavigation

  24. enumfeatures

  25. copycontenttypes

  26. enumavailablepagelayouts

  27. fixpublishingpagespagelayouturl

  28. repairsitecollectionimportedfromsubsite

  29. convertsubsitetositecollection

  30. setsitedirectoryscanviewurls

  31. enumtimerjobdefinitions

  32. exportlist

  33. importlist

  34. copylist

  35. getlistschemaxml

  36. enumunghostedfiles

  37. reghostfile

  38. deletelistfield

  39. moveweb

  40. managecontentdbsettings

  41. addsiteadmin

  42. deleteweb2

  43. mysitesettings

  44. upgrade2

  45. enumpagewebparts

  46. movewebpart

  47. setwebpartstate

  48. retargetcontentquerywebpart

  49. replacefieldvalues

  50. applyupgradeareaurlmappings

  51. publishitems

  52. setlocalsitedirectory

  53. import2

  54. setsearchcenter

  55. replacewebpartcontent

  56. enumeffectivebaseperms

  57. createwebapp

  58. deletewebapp

  59. exportlistitem

  60. importlistitem

  61. copylistitem

  62. deletelistitem

  63. setnavigationsettings

  64. enumprofileprivacypolicies

  65. setprofileprivacypolicy

  66. enumprofileproperties

  67. editprofileproperty

  68. exportlistfield

  69. importlistfield

  70. updatelistfield

  71. deletelist

  72. copylistsecurity

  73. updatelistview

  74. setsspacl

  75. createsearchscope

  76. updatesearchscope

  77. addsearchrule

  78. setauditsettings

  79. setusageanalysis

  80. adduser2

  81. adduserpolicyforwebapp

  82. addlistitem

  83. exportlistitem2

  84. movesite

  85. applytheme

  86. retargetgroupedlistingswebpart

  87. sitewelcomepage

  88. enumwelcomepages

  89. createcontentdb

  90. createsiteindb

  91. exportcontenttypes

  92. exportsitecolumns

  93. importsitecolumns

  94. setanonymousaccess

Monday, March 24, 2008

Microsoft SharePoint 2007 - SharePoint Branding Tool v1.6.0 (Custom tool for themes, masterpages, site logos...)

This is an update for this article.

I spent a few more hours trying to update the user interface and to make the tool a little easier to use.

Update 1: New options
The interface is more refined and has shortcuts to open the site directly from a context menu. New items in the "File" menu for easy access to SharePoint Theme files and folders.


Update 2: More Information at a glance
I've added an extra DataGrid View to show properties of the selected site or selected theme. This version also shows the theme preview.


Update 3: Easier to use interface
I've reduced the pop-ups and tried to bring is all together in the one window.


Enjoy!

You can get the latest (v1.6.3) SharePoint Branding Tool here:
http://www.codeplex.com/BrandingTool

Thursday, March 20, 2008

Microsoft SharePoint 2007 - SharePoint Branding Tool v1.5.1 (Custom tool for themes, masterpages, site logos...)

I got a little bored and a little sick at home, so I started finishing off some code I worked on with my colleagues Andrey Shchurov and Alexandre Bacchin (I'm no geek though).

This is meant to be a tool that will aid the Web Designer or the SharePoint Developer in applying look and feel to their SharePoint sites. It also doubles up as a great tool to update multiple SharePoint sites manually (including MySites).


This is how the tool looks like. You can select from a list of web applications, select the sites to apply changes, and then apply your theme! (If you've got lots of sites, that's ok, you can filter them by the site template the site uses)


It's got other features as well to quickly update your MasterPage URL, and your Applications MasterPage URL(CustomMasterUrl) as well:


So this is before the Theme application:


This is after. It doesn't only apply it for the top level site, but also did it for one of the child sites (which is 2 level below the above site):


Need to change the site logo and description for multiple sites? No problem:

Boom! In just a few seconds just took a few seconds...

And the Master Page URL? How does it work? Here's a screen shot:

After the update of the property via the code:

Not to mention, it also logs what it does in a text file, so it's easy to revert in case of mistakes. It's developed with .NET 2.0 and uses the SharePoint 2007 API, so it'll work with WSSv3 and MOSS2007.

The code doesn't have good naming conventions, but we'll leave that to be a to-do. For now, I've tested it enough to prove it works with no problems. Any suggestions of feedback, please post it on the codeplex page.

A newer version is available. More information here:
http://sharepointsix.blogspot.com/2008/03/microsoft-sharepoint-2007-sharepoint_24.html


You can get the SharePoint Branding Tool here:
http://www.codeplex.com/BrandingTool

Saturday, March 08, 2008

Microsoft SharePoint 2007 - Silverlight Blueprint for SharePoint

I'd have to say this is pretty exciting stuff from Microsoft. Examples of implementation of SharePoint components using Silverlight! The most impressive blueprint is the social networking tool which sources its information from the User Profile that is ultimately imported from AD.

Impressive because, it surfaces the information in a very intuitive UI, and not only that, it also links back to the user's public "My Profile" page.

For more information, the Silverlight Blueprint for SharePoint site is:
http://www.ssblueprints.net/sharepoint/

Saturday, December 22, 2007

Microsoft SharePoint 2007 - MySites and Facebook (Part 1)

A little background on my work...
I would like to start this blog off with a little background into myself... actually if you've been reading only my blog articles, you'll probably still be under the impression that I may have only have knowledge and interest in Microsoft CRM. Making that assumption would be invalid, because as a matter of fact, I am ALSO engaged in SharePoint work!

Over the last few months I have been busy developing SharePoint that I haven't got the chance to blog anything about CRM. I actually had a dilemma if I should start posting SharePoint posts on this blog, as the main intension of this blog was to discuss about CRM and SharePoint integration.

I have come to a decision to dedication this blog to to all new technology with a focus on both CRM and Sharepoint (not only CRM-SharePoint integration).

Back to the topicSo back to the topic of MySites and Facebook...

-Intro
Over the last year, I have worked with various clients on Corporate Directories, web 2.0 tools, collaboration tools and tools that help businesses improve communication and personal information sharing. This work surrounded a SharePoint component called MySites.

-History of these technologies?
MySites has historical roots all the way back to SharePoint 2001! MySites didn't exist in SharePoint 2001. From an article I found from Microsoft, in SharePoint 2001, the "MySite" concept was...

"a workspace is used to group a collection of personal dashboards, and little, if any, use is made of the top-level workspace dashboard. Each personal dashboard site consists of the Home dashboard page and an additional Reports subdashboard page."
In SharePoint 2003 Portal Server, MySites (Personal sites) was an official component. Here is an official extract about what it is:
"...in SharePoint Portal Server 2003, all users...with the Create Sites and Create Personal Site rights automatically have a personal site created for them when they click the My Site link on the portal site home page.

My Site is a personal SharePoint site created on the portal site that provides personalized and customized information for each user. Your personal site consists of two views: A private view for personal information that only you can see, and a public view seen by everyone else. The private view is shown by default when you view your personal site."
Users were able to search and view other users profile information, based on information from Active Directory and other information entered by that user.

SharePoint 2003 Portal Server: Public MySite


SharePoint 2003 Portal Server: Private MySite



In SharePoint 2007 (MOSS not WSSv3), this concept and idea has evolved even more with new SharePoint web parts like the RSS Viewer, In Common Web Parts, Colleague Tracker Web Parts, Document Agregation web parts and more...

With these components and a few others, businesses can enable employees/users to leverage the office-social network to find information and access much tacit knowledge. (There was also once an introduction of the Knowledge Network concept which extends on tacit knowledge sharing, but Microsoft has not yet official released this component.)

MOSS 2007: Public Sites


MOSS 2007: Private Sites


MOSS 2007: Custom Tabs and role based templates
http://office.microsoft.com/en-us/sharepointserver/HA102147321033.aspx

And.... Facebook? According to wikipedia:

"Facebook is a social networking website, launched on February 4, 2004. Facebook was founded by Mark Zuckerberg, a former Harvard student. Initially the membership of Facebook was restricted to students of Harvard College. It was subsequently expanded to MIT, Boston University, Boston College, and all Ivy League schools within two months."

The highlights of Facebook which businesses are interested in is the way in which personal information can be shared across the network without having two users being online at the same time. I recall from the facebook f8 conference video Mark Zuckerberg mentioned that Facebook allows for a larger communication channels between users.

Facebook has an interface for user information, web 2.0 collaboration applications and tools, and widgets that allow for this to happen. Recently, Facebook exposed their API, allowing the outside world to develop applications that can pull information from Facebook, that can integrate into Facebook, etc.

-A possible new way for Customer Relationship Bonding/Management??I had a few open-ended ideas and questions on social networking within the enterprise which could start you up for a good deep thought.... some of these:
* Facebook contains groups for universities, companies and interests. Perhaps we could do the same for all customers, employees/ex-employees, and stakeholders of the company to share information?
* Can we use this technology to improve how the customers, employees/ex-employees, and stakeholders feel they bond with the company? (On top of sending personalised letters from MS CRM and analysing data)
* Can we import this information into CRM systems to form even more accurate reports about customers?

-What have I done to MySites?A recent client, there were requirements for the business to implement an advanced "Phone Book/User Directory". They had a look at SharePoint MySites and decided that it is perfect for their use, and not only that it had tools very similar to Facebook (which many people are hooked onto!)

The requirements evolved and hence now after a few months of development and hard work, they've got themselves their own "Social Networking tools" with part Facebook capabilities.

In the next few articles, I will discuss on the what I have done and the challenges I had to get it all working... Stay tuned...

Microsoft CRM 4.0 - Whats new reading material...

If you've had access to MS CRM 3.0 and want to know more about MS CRM 4.0.. theres a very good material here which talks about what is new in Microsoft CRM 4.0:



http://download.microsoft.com/documents/australia/dynamics/CRM4.0_Whats_New.pdf

Microsoft CRM 4.0 - Installing it... where to start? The Implementation Guide!

With the release of the downloadable Microsoft CRM 4.0 trials, you'll also need the implementation guide. If you've installed MS CRM 3.0 in the past, this is official documentation from Microsoft on how to install Microsoft CRM.

Here is the link:
http://www.microsoft.com/downloads/details.aspx?FamilyId=1CEB5E01-DE9F-48C0-8CE2-51633EBF4714&displaylang=en

Microsoft CRM 4.0 - Trial Product Downloads available Now!

Microsoft has released its latest CRM trial software on the Internet for downloads!

"Microsoft Dynamics CRM 4.0 is available as a 90-day trial version at the Microsoft Downloads center. The download page will be updated with new languages as they are released."

Download the Microsoft Dynamics CRM 4.0 Trial Versions in either 32 or 64-bit!
Download the Microsoft Dynamics CRM for Outlook (For On-Premise and Hosted Editions) 32 bit!

Download the Microsoft Dynamics CRM 4.0 Data Migration Manager 32 bit!
Download the Microsoft Dynamics CRM 4.0 E-mail Router (On-Premise and Hosted Editions) in either 32 or 64-bit!

Source:
http://blogs.msdn.com/crm/archive/2007/12/18/microsoft-dynamics-crm-4-0-ready-for-download.aspx

Microsoft CRM and Silverlight - "Adding client side business logic to CRM forms using Silverlight managed code"

Silverlight is an exciting technology with a very high degree of highlight and focus for web technology enthusiasts because it has the potential to bring to the web user an enhanced, lifted and interesting user experience.

Microsoft CRM, being a technology that is closely shaped by business processes, has also a very strong focus on usability. CRM technology is data and information based, and how well we utilise the information from these systems is, in my opinion, very closely tied with the effectiveness of usability.

Microsoft CRM is a very exciting and fun product to develop (technically and business wise) with because it offers the flexibility and power to adapt to a business's needs. Just imagine if we surface the information from CRM and create new applications to embed within the CRM application, the possibilities that I see are quiet "uniquely" cool and awesome!

I found the following post by Arash, which talks about developing a basic Silverlight 1.1 (Javascript and C# Managed code) application. This is the starting point for the imaginations to become a reality...

http://blog.arash.cc/post/Adding-client-side-business-logic-to-CRM-forms-using-Silverlight-managed-code.aspx