Guru Prasad 的个人资料SharePoint Journey照片日志列表更多 工具 帮助

日志


2月27日

Introducing the SharePoint Knowledge Base

First of all, I would like to say that SharePoint Community Rocks!!!  Glen Cooper (my colleague and great SharePoint expert)  has started a site called The SharePoint Knowledge Base.  I think,  the SharePoint Knowledge Base will be a great and single place to look for solutions/how-tos/tips& tricks etc., once sharepoint community starts contributing to this site. Please pass on the information about this site to our great SharePoint community for the benefit of the SharePoint community!!!
 
Here is the introduction from Glen Cooper  about his site(http://sharepointkb.org).
 
Happy SharePointing!! :)
 
-Guru
11月16日

A nice blog post on Debugging in the GAC

I just came across this nice article and thought I will share it.
 
 
-Guru
 
 
11月14日

Talking about BDC ADF and your friend, CDATA

Nice one! Thanks to Paul Galvin for pointing this to the SharePoint community. I am sure there will be few people(including me) writing SQL queries in the BDC definition file as shown in the MSDN documentation. SOME times we ignore to try to take that extra-mile and blindly keep doing in the same way as pointed in the documentation:)

Quote

BDC ADF and your friend, CDATA

I've noticed some awkward and unnecessary hand-encoding of RdbCommandText in some examples (including MSDN documentation).

I wanted to point out to newcomers to BDC that commands can be wrapped inside a CDATA tag in their "natural" form.  So, this awkward construction:

<Property Name="RdbCommandText" Type="System.String">
SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
    WHERE (id &gt;= @MinId) AND (id &lt;= @MaxId)
</Property>

can be better represented this way:

<Property Name="RdbCommandText" Type="System.String">
  <![CDATA[
    SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
      WHERE (id >= @MinId) AND (id <= @MaxId)
 
]]>
</Property>

</end>

BDC Primer

Intro to BDC

10月11日

New Microsoft Security Bulletin for WSS3.0

Here is the new patch for the Vulnerability in Windows SharePoint Services 3.0 and Office SharePoint Server 2007 Could Result in Elevation of Privilege Within the SharePoint Site (942017)

Read more...

Also, read this from Ian Morrish (WSS Demo Blog), where he shares his experience about installing this patch.

 

-Guru

InfoPath Development Tip : Use relative path to access node within Node Collection

Use Relative node name within Node collection to access the properties. Do not use absolute path to access the values.

Let us say, you wanted to loop through the node collection and access the value for the child node for each node in the collection.

//Parent Node

XPathNavigator selectNode = tempXPath.SelectSingleNode("/my:ExpenseReport/my:TravelExpenses/my:travelExpense[" + i + "]", NamespaceManager);

//Do not use the below mentioned way(Absolute path) to access the values of the elements

//XPathNavigator tempNode = selectNode.SelectSingleNode("/my:ExpenseReport/my:TravelExpenses/my:travelExpense/my:travelExpenseCategory", NamespaceManager);

//Instead use relative node name like show below, to access the child node

XPathNavigator tempNode = selectNode.SelectSingleNode("my:travelExpenseCategory", NamespaceManager);

Hint: "my:travelExpenseCategory" is the child node under my:travelExpense

Note: If you use absolute path, you will always end up getting the Value from the first element, even though your cursor is at the specified(by variable i) element.

This may be not be a common mistake, nonetheless, I just wanted to share this piece.

Hope that helps!
Thanks
Guru
9月26日

SharePoint Search Workshop - Ontolica from Mondosoft

I happened to attend the SharePoint Search Workshop(on Sep 13, 2007) conducted by Mondosoft here in Seattle,WA. It is a kind of a marketing event, but handful of technical information was also covered. They let us play around with the tool in the pre-configured environment. I am very impressed with the product and it is an awesome extension to the MOSS 2007 OOB Search.

I honestly feel, although the MOSS Search very powerful, there is very little that is exposed via the UI(as pointed out by Robert Bogue, I totally agree with him). And I think, Ontolica from Mondosoft bridges the gap within OOB MOSS Search, to a great extent. It is a neat extension to the MOSS Search.

And, if any one of you is looking forward to attend the workshop, you can find the schedule here at http://www.ontolica.com/services/workshops.aspx . Note that this is free event and seats get filled up very quickly.

FYI. Mondosoft is giving wildcard search for MOSS for FREE.  Also, Mondosoft has chosen couple of SharePoint MVPs to deliver their workshops; Bob Mixon and Robert Bogue. They are great presenters!!

For more information:

http://bobmixon.com/BLOG/archive/2007/09/24/Ontolica-Search-Workshop-in-Boston.aspx

http://sharepointsearch.com/cs/blogs/notorioustech/archive/2007/09/20/ontolica-sharepoint-workshop-day.aspx

http://thorprojects.com/blog/archive/2007/08/14/686.aspx

Happy SharePointing!

Thanks
Guru

9月21日

Workflow & Anonymous Access issue

A requirement for one of the pages in an externally faced MOSS 2007(turned on for anonymous access) site was to submit feedback and update a list item with the user submitted it.

If anonymous access was not turned on, to accomplish this task is like a piece of cake! But unfortunately, workflow seems to run under the context of the currently logged in user. Apparently this will be fixed SP1.

I set out to write custom code to send email and update the list item(using SPSecurity.RunWithElevatedPrivileges).

But, interestingly, I got an error when I try to update a list item(SPListItem.Update()) in the following code:

        SPWeb web = null;
        SPSite site = null;
        SPSecurity.RunWithElevatedPrivileges(delegate()
        {
            try
            {
                site = new SPSite(this.ListSiteUrl);
                web = site.OpenWeb();
                SPList list = web.Lists[new Guid(this.ListGuid)];
                string internalName = list.Fields[this.ColumnName].InternalName;
                SPListItem listItem = list.GetItemById(this.ListItemID);  //the first item
                string countValue = listItem[internalName].ToString();
                listItem[internalName] = "asdf"; //modified purposely
                listItem.Update();
                web.Dispose();
                site.Dispose();
            }
            catch (Exception ex1)
            {
                lblError.Visible = true;
                lblError.Text = "An error occurred :" + ex1.Message;
            }
        });

When I googled for this error, I found the following article really very helpful. SharePoint community, rocks!

http://howtocode.blogspot.com/2007/06/moss-splistitemupdate-throws-error.html

With the code in the above article as a reference, I changed the above code as the following and it worked like a charm.

SPWeb web = null;
        try
        {
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                using (SPSite site = new SPSite(this.CounterListSiteUrl))
                {
                    web = site.OpenWeb();
                }
            });
            SPList list = web.Lists[new Guid(this.CounterListGuid)];
            string internalName = list.Fields[this.CounterColumnName].InternalName;
            SPListItem listItem = list.GetItemById(this.CounterListItemID);  //the first item
            string countValue = listItem[internalName].ToString();
            listItem[internalName] = "asdf"; //modified purposely
            bool bUnsafeUpdates = web.AllowUnsafeUpdates;
            web.AllowUnsafeUpdates = true;
            listItem.Update();
            web.AllowUnsafeUpdates = bUnsafeUpdates;
            web.Dispose();
        }
        catch (Exception ex1)
        {
            lblError.Visible = true;
            lblError.Text = "An error occurred :" + ex1.Message;
        }

 

Happy SharePointing!

Thanks
Guru

Error when Hosting MySites in separate Web Application

When you host MySites in a separate web application, you may get the following error when you try to access My Site.

Your personal site cannot be created because Self-Service Site Creation is not enabled. Contact your site administrator for more information.

To solve this problem, make sure you have enabled Self-Service Site Creation for the Web Application where you have hosted MySites.

Here is how to do enable it:

  1. Go to Central Administration --> Application Management.
  2. Click on Self-Service site management, under the section Application Security.
  3. Make sure to select the right web application. Click On and then click OK.

Now, when you click on the My Site link, your my site will be created and provisioned.

Happy SharePointing!

Thanks
Guru

8月31日

OPML - SharePoint Bloggers

Here is the OPML file that contains a list of active SharePoint bloggers. Updated on 08/30/2007.Feel free to drop a line If I have missed any SharePoint blogger.

Initially taken from Mark Kruger's blog.

Also, here is the XSD (XML Schema, reverse engineered from an OPML file, not an official one though. Not intended for production use!) file that if you want to use to create your own OPML file.

 

 Thanks
Guru
8月30日

Good list of POINTS to remember!

Good article for SharePoint Administrators from Joel Oleson. Perhaps, some of them are MUST to be in the Todo list.

More..

Happy SharePointing! :)

-Guru

White Paper: Working with large lists in Office SharePoint Server 2007

Good one! Deals with different data access methods for SharePoint Lists and their performance characteristics against

different user loads and modes of operation.

Excerpt:

The test results in this white paper are intended to demonstrate the difference in the performance characteristics of SharePoint lists containing large numbers of items when different data access types are used to present list contents. Test results in this white paper show how to optimize list performance through limits on the number of items that appear in a list, and by choosing the most appropriate method of retrieving list contents.  More..

Download 

 Plan for software boundaries (Office SharePoint Server) related to this post.

8月28日

Microsoft BDC Metadata Editor announced!

 

I just noticed that Microsoft has announced BDC Metadata Editor. This is cool! It will save a lot of time when it comes

to creating BDC application definition. I like the part that it creates Associations when foreign key are selected.

Highlights

  • Tool supports databases (SQL, Oracle, OLEDB, and ODBC) and web services
  • Drag and drop design surface for selecting DB tables or web methods:
  • Metadata is automatically extracted from databases by dragging and dropping tables
  • Web Services require a few additional steps to completely configure the connection
  • Users can import and export Application Definition XML files
  • Users are able to test method instances incrementally from within the tool
  • The tool is not required to run on a web front-end
  • Associations are created automatically when foreign keys are selected; they can also be created easily for web services by adding an Association method instance

For more details click here 

-Guru

3月1日

Debug SharePoint WebParts - VS 2005

With VS 2003 and SPS 2003/WSS2.0, it was totally different. There was just one w3wp process you need to attach the debugger to.

How to debug in VS 2005?

    1. Click on Debug, and then on Attach to Process...
    2. Look for w3wp.exe process. If you don't see one,check "Show processes from all users" and "Show Processes in all sessions".
    3. Select all w3wp.exe processess that run under the security account that sharepoint is running under. If you are not sure about the security account you may select all w3wp.exe processess listed in there.
      • If you select only one and if it happens to be not the right process, you may see  this icon(which means, The breakpoint will not be currently hit. No symbols have been loaded for this document) instead of  at  your breakpoint. You may want to check to see if there are additional w3wp.exe processes running or the check boxes mentioned in the step 2 are checked.
    4. Click on Attach
    5. Open the page that includes your WebPart.
    6. You will now notice that as the page renders the control switches to the VS Debugger.

Click here to know Which w3wp.exe process belongs to which App Pool in IIS6.0

Quick Access Keyboard shortcut Tip for attaching the processes to the debugger: ALT + D, then hit P, and then hit W. 

 

Hope this will be useful for beginners in the WebPart development.

First Post!

 I have been thinking about blogging for a long time ever since I have sneaked into the SharePoint platform.  Finally, here I am with my First Blog Post. I will be updating this space as frequently as possible with both SharePoint and personal musings.