SharePoint, XBOX, .NET, Technology - What I am reading

    [Home] [Recent] [Site Map] [SharePoint] [XBOX]

   

Microsoft SharePoint Products and Technologies Team Blog

4/10/2007 Debugger "Feature" for SharePoint

While Windows SharePoint Services 3.0 provides an excellent platform for developing Web applications, debugging them can be a bit of a pain. It"s often a case of finding the process ID (PID), attach the debugger, navigate to the error, rinse, and repeat, but programmers love to write code, not navigate through menus. J Fortunately, my good ol’ buddy from Microsoft Consulting Services and developer extraordinaire, Jonathan Dibble, created a nifty “Debugger Feature” that can be installed and activated on a SharePoint site to make the debugging experience much easier to initiate. Jonathan is a brilliant guy, but he’s too shy (for now) to engage the broad SharePoint community, so he has donated his code to Scot Hillier’s SharePoint Features project on CodePlex for all to share and hopefully extend. The blog entry below was jointly written by Jonathan and Scot.

<Lawrence />

Debugger Feature for SharePoint

When activated, the Debugger Feature adds an “Attach Debugger” menu item to the Site Actions menu (see picture below). The feature provisions a simple page, which executes the System.Diagnostics.Debugger.Launch statement, causing an exception to be thrown and the debugger to be auto-attached. In some cases, the debugger cannot attach – for example, when the AppPool is running under a different user account. When that happens, the page will at least give you the correct PID, so you can attach the debugger yourself.

debugger.gif

Figure: Attaching the Debugger from SharePoint

Beyond this very basic and useful function, this is a great example of how to write a simple SharePoint feature that provisions a page. Included in the VS 2005 solution project are all of the .XML and .DDF files needed to create a feature and then a solution cab file for deployment. Let"s take a quick walkthrough of the most important files.

The first .XML file, feature.xml, is what defines the feature:

<?xml version="1.0" encoding="utf-8" ?>

<Feature Id="B5CF5C33-8178-4cb0-99DC-E14AA04D1C05"

   Title="Attach Debugger Feature"

   Description="Can be used in debug mode to attach a debugger to the site."

   Version="1.0.0.0"

   Scope="Web"

   xmlns="http://schemas.microsoft.com/sharepoint/">

   <ElementManifests>

      <ElementManifest Location="elements.xml" />

   </ElementManifests>

</Feature>

The complete set of parameters can be found at http://msdn2.microsoft.com/en-us/library/ms436075.aspx. The critical element for us is the ElementManifest element, which specifies where WSS can find the provisioning instructions for our feature. The path is relative to the feature.xml, which in turn is relative to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12. More on this when we construct our solution’s .CAB file. For now, know that the feature.xml and elements.xml are usually in the same directory.

Elements.xml:

<?xml version="1.0" encoding="utf-8" ?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

   <!-- Add Command to Site Actions Dropdown -->

   <CustomAction Id="SiteActionsToolbar"

      GroupId="SiteActions"

      Location="Microsoft.SharePoint.StandardMenu"

      Sequence="2001"

      Title="Attach Debugger"

      Description="Attaches debugger to current site">

      <UrlAction Url="~site/_layouts/Debugger/AttachDebugger.aspx" />

   </CustomAction>

</Elements>

Right now, the documentation on the contents of the elements file is fairly light. Looking briefly at our CustomAction element, the important attributes are the GroupId and Location, which tell WSS where to place our new page (the site actions standard menu). The Sequence number is for sorting the menu, 2001 should ensure we are at the bottom. And most importantly is UrlAction, which tells WSS that this will be a hyperlink to the AttachDebugger.aspx page. Notice the relative path token ~site, which indicates the page is located in our current site.

From here, I"d suggest opening the VS 2005 solution file and taking a look around. Notice how the directory layout inside the solution is similar to the layout in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE. This is also to facilitate feature development. Check out install.bat and see how we use xcopy to copy the dev tree to the template tree. (BTW, the commented lines in the install.bat should be obvious – we have no need to GAC our assembly or restart IIS for our feature, but you might in future features. It"s there if you need them.)

Finally, lets look at how the .CAB file is created. The most important file is the .DDF file in the \WSP directory:

;

.OPTION EXPLICIT; Generate errors

.Set CabinetNameTemplate=DebuggerFeature.wsp

.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory

.Set CompressionType=MSZIP;** All files are compressed in cabinet files

.Set UniqueFiles="ON"

.Set Cabinet=on

.Set DiskDirectory1=Package

manifest.xml manifest.xml

..\TEMPLATE\FEATURES\Debugger\feature.xml Debugger\feature.xml

..\TEMPLATE\FEATURES\Debugger\elements.xml Debugger\elements.xml

..\TEMPLATE\LAYOUTS\Debugger\AttachDebugger.aspx LAYOUTS\Debugger\AttachDebugger.aspx

It’s fairly easy to read, but take a look at the destination paths, which are relative to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE. The location of the AttachDebugger.aspx file must match the TemplateFile Location path specified in the manifest.xml file:

<Solution SolutionId="3D615864-B200-4ff8-8D08-6D651CA9D5F6" xmlns="http://schemas.microsoft.com/sharepoint/">

   <FeatureManifests>

      <FeatureManifest Location="Debugger\feature.xml"/>

   </FeatureManifests>

   <TemplateFiles>

      <TemplateFile Location="LAYOUTS\Debugger\AttachDebugger.aspx"/>

   </TemplateFiles>

</Solution>

Once you"ve developed and deployed a feature or two, you"ll have that light bulb (“a-ha!”) moment about how everything required to implement a feature relates to each other, and then you’ll want to create a SharePoint feature for every discreet piece of functionality that you’d like to add to SharePoint!

4/10/2007 Investing in Logical Architecture Design Samples

Investing in logical architecture design samples

 

Greetings, my name is Brenda Carter. I am a technical writer who writes content for the IT Pro audience about Office SharePoint Server and Windows SharePoint Services. The purpose of this blog entry is to tell you about the investment that the content team is making into logical architecture samples to help you design solutions based on Microsoft Office SharePoint Server.

 

The first completed sample is for a typical corporate deployment. This sample design includes:

§  Intranet sites (My Sites, team sites, and published intranet content)

§  Partner Web site

§  Customer Web site (including content deployment across server farms)

You can download the architecture design sample and read the corresponding article online.

 

In this blog entry, I’m going to discuss the philosophy behind the design sample and discuss a few of the tricky design questions you’ll need to solve for your own designs. I’ll also invite you to let us know what other types of design samples you’d like to see.

 

First, I’d like to acknowledge the members of the product and marketing teams who contributed to this design, including Keith Bankston, Steve Tullis, Mark Grossbard, Troy Starr, Joel Oleson, Vijay Krishna, Ambrose Treacy, Greg Mattox, Jeff Wierer, Robert Silver, and Samantha Robertson. I’d also like to thank the folks from the field who provided input, including Larry Kuhn, Steve Peschka, James Petrosky, Ferla Geckin, John Nisi, and Harikumar H. As you can see, the sample design was produced as a collaborative effort across teams and feature specialists.

 

Office SharePoint Server 2007 introduces many new capabilities and is much more flexible than Office SharePoint Portal Server 2003. In other words, you’ll have plenty of opportunities to develop your complexity skills. The purpose of investing in logical architecture content is to tackle some of the complex and interrelated design questions that are most common. Hopefully, this will reduce the number of complex design questions you need to answer on your own. The design sample is provided as an editable Visio file to give you a jump start on your own design.

 

The included (attached) diagram is an abbreviated version of the completed design sample.

 


Philosophy and Design Goals

On the content team, we spend a lot of time writing about the individual features and components of software. The philosophy behind this design exercise is to do the opposite: to combine the logical architecture components into a configuration that produces a workable model, then talk about how the features and components work together. The accompanying article discusses the design goals and tradeoffs of various interrelated decisions, including contrasting some of the alternative choices.

 

Another big part of our design philosophy is to create a pluggable design. The design incorporates the most common types of sites and allows access to the most common classes of users. By following a similar design, you can plug in the pieces that are important for your organization without changing the overall design. If you decide to add additional pieces later on, you’ve already created a framework for these pieces. For example, your initial design might only include My Sites and team sites. By starting with a design that is similar to our sample design, you can efficiently deploy these pieces and still leave the door open to plug in the rest of the pieces down the road.

 

Finally, we went to great lengths to produce a design that is Internet ready. You can plug the design into a perimeter network or simply make sites available through an edge firewall. You can start by allowing only internal employee access to sites initially and then enable access to remote employees, partners, and customers later. The security and isolation for accommodating these different classes of users is built into the model. By starting with a design that is similar to the sample design, you create the opportunity to invite each of the classes of users to participate in sites without having to re-architect the design.

 

Design Questions that Deserve Extra Consideration

The sample design illustrates design choices for each of the logical architecture components: users, zones, authentication, Shared Service Providers (SSPs), administration sites, application pools, Web applications, site collections, content databases, URLs, and policies for Web applications. Although the article discusses planning considerations for each of these components, I’ll use this blog entry to alert you to a few of the trickier components to pay attention to.

Planning for user access

The greatest challenge of the design was planning for the various classes of users. Fortunately, I discovered some friendly clip art on Office Online to represent our users and this helped us to visualize our task. Planning for user access involves coordinating zones across the server farm and planning for authentication.

 

A key design choice is to configure remote employee access through the Default zone. In fact, the Default zone requires the greatest amount of consideration. Office SharePoint Server 2007 places the following requirements on how the Default zone is configured:

§  When a user request cannot be associated with a zone, the authentication and policies of the Default zone are applied. Consequently, the Default zone must be the most secure zone.

§  The index component requires access to content through at least one zone to crawl content. By default, the index component uses NTLM authentication and attempts to index content through the default zone first. There are ways to work around this behavior. You can find more information in the supporting article. Also see Plan authentication methods.

§  Administrative e-mail is sent with links from the Default zone. These include e-mail to owners of sites that are approaching quota limits. Consequently, users who receive these types of e-mails and alerts must be able to access links through the Default zone. This is especially important for site owners.

§  Host-named site collections are only available through the Default zone. All users who are intended to access host-named site collections must have access through the Default zone.

 

In the model, the Default zone is used for remote employee access for the following reasons:

§  Employees can access links in administrative e-mail regardless of where they are located.

§  Internal server names and URLs are protected from being exposed when the zone associated with a user request cannot be determined. Because the Default zone is already configured for remote employees, URLs do not expose sensitive data when this zone is applied.

 

Another key design choice is the configuration of authentication for remote employees. The article contrasts two choices:

§  Forms authentication using an LDAP provider to authenticate against the internal Active Directory domain controller. The caveat to this choice is this: if users connect to sites both internally and remotely, two different user accounts are created in Office SharePoint Server 2007. That is, one account represents the user when using Windows authentication and a second account represents the user when using forms authentication. Consequently, both accounts require permissions to sites and documents.

§  Integrated Windows authentication using NTLM. This method relies on using ISA Server 2006 to authenticate users and then to send the user credentials to Office SharePoint Server 2007. ISA Server uses forms authentication to authenticate users against the Active Directory environment. ISA then forwards the Windows credentials to Office SharePoint Server. This approach does not result in two different accounts for users who work both internally and remotely, greatly simplifying permissions management. This method also simplifies the management of crawl rules as the default crawl behavior works with this configuration.

 

After planning for the Default zone and remote employee authentication, planning for the rest of the zones and authentication methods is straightforward. In the sample design, partners access sites using forms authentication. This requires a separate directory and provider, such as a Microsoft SQL Server database and provider, to store partner accounts in the perimeter network. The advantages of this approach are that you can manage partner accounts separately, and you do not need to add partner accounts to the internal employee directory. Authentication for the remaining classes of users is predictable.

 

The final design point to emphasize when planning for user access is to ensure that your zones and authentication are mirrored across the Web applications in your environment. This is especially critical for Internet-facing sites where user requests are initiated from different networks and where each class of user might be participating in sites across multiple Web applications. The configuration of authentication and the intended users should be the same. However, the policies associated with zones can differ across Web applications. In the model, the Default zone for each of the Web applications is configured identically for remote employee access. Additionally, the Intranet zone is configured identically across all Web applications for internal employee access. The Extranet zone and the Internet zone are each configured for only one Web application.

 

For more information about planning for Internet-facing sites, see the following TechNet articles:

§  Design extranet farm topology — Illustrates and describes the supported topologies for Internet-facing server farms.

§  Plan security hardening for extranet environments — Details the hardening requirements for an extranet environment in which a server farm is placed inside a perimeter network and content is available from the Internet or from the corporate network.

Planning for Partner Collaboration

The design sample incorporates the use of two farms: one for intranet content and one for customer-facing content. This is necessary to satisfy licensing requirements. Given the licensing options, the design choice to pay attention to is deciding which farm hosts content for partners. In the model, Server Farm A hosts the intranet content and Server Farm B hosts the Company Internet site. According to licensing terms, either farm can host Partner Web.

 

Given a choice of the two farms, general design guidance for determining which farm should host content for partners includes the following:

§  Nature of collaboration — If the primary purpose of a partner extranet site is to securely communicate information to many partners, an Internet server farm is the most economical choice. On the other hand, if the primary purpose is to work collaboratively with a small number of partner employees, an intranet server farm might be a better choice. Choose the option that enables you to optimize the farm for its intended role (that is, collaboration vs. read-only content).

§  Number of partner employees — If you collaborate with many partner employees and minimizing cost is important, you can securely host both collaborative and anonymous content on an Internet-facing farm with the Internet sites license.

 

In the model, Partner Web is intended for intensive collaboration with partner companies, including developing and staging the company Internet site. Placing Partner Web on Farm A allows the organization to optimize each of the two farms for their intended use (collaboration vs. read-only content).

 

For more information about choosing the appropriate number of farms for your organization, including more information about licensing requirements and options for hosting partner sites, see Plan for server farms.

 

Planning for SSPs

SSPs are used to isolate content based on audiences. For example, if your server farm hosts sites for more than one class of users, separate SSPs can help create isolation between these classes of users. The design article additionally recommends configuring SSPs to either enhance information sharing across multiple Web applications or to further isolate content within a single Web application. The two different approaches are discussed in the article.

 

Briefly, the design uses the first approach to unify the three intranet Web applications under one SSP. This provides for personalization and enterprise-wide search across all of the applications. This choice provides an example of balancing process isolation (separate Web applications and application pools) with the business need to share information and leverage profile data across the applications.

 

The second approach is used for the Partner Web site. Using a dedicated SSP for the Partner Web ensures that partner users cannot search on or access sensitive information within your intranet environment. The SSP can be configured to further isolate content between site collections in the following ways:

§  Limit search scopes to the individual site collections.

§  Use audiences to target content to certain groups of users.

§  Use the Stsadm command-line tool to configure the People Picker to display only users that are members of the site collection.

 

When you design your SSP strategy, consider the ways in which you can configure the individual services within an SSP to enhance your overall content sharing or isolation goals.

Site Taxonomies and URLs

When you plan for sites and URLs you’ll need to make a series of decisions. Each decision can increase or limit design choices in other areas. The first decision to make is whether to use path-based sites or host-named site collections.

 

Path-based sites are the traditional sites that you create using Central Administration. If you choose to use path-based sites, you are limited to a single root-level site collection within a Web application. However, you can use managed paths to create “top-level” sites beneath the initial root-level site collection. The primary advantage to using path-based sites is that these sites can be accessed from any zone that you configure. Also, the alternate access mappings feature works with all path-based sites. The alternate access mapping feature provides support for off-box termination of Secure Sockets Layer (SSL), which enables the remote employee access and partner access scenarios to use SSL (https).

 

Host-named site collections are popular among hosters. These sites are created using the Stsadm command-line tool. You can create many root-level host-named sites within a single Web application. Host-named site collections give you more control over URLs. However, there are tradeoffs. First, host-named sites are only available through the default zone. Users who are configured to authenticate through alternate zones cannot access host-named sites. Second, the alternate access mappings feature does not work with host-named sites.

 

The design sample incorporates the use of path-based sites. Given the requirement for a root-level site collection, the design decisions for these Web applications revolve around the second tier of site collections. Managed paths are used to incorporate a second tier of top-level site collections. When you create a managed path, you can choose to implement either an explicit inclusion (allows you to assign an explicit URL that is appended to the path) or a wildcard inclusion (automatically assigns a path name). The model incorporates both options based on the nature of each Web application. Generally, use an explicit inclusion when you want to control the URL name (for example, to incorporate team or department names into URLs). Use a wildcard inclusion when you want to provide Self-Service Site Management (allow users to create sites) and the URLs are not important or when you want to scale to hundreds of site collections in a Web application.

 

In a corporate environment where you are providing access to multiple classes of users to content in multiple Web applications, it is important to coordinate URLs across the sites. The following goals for the design sample influence design decisions for URLs:

§  URL conventions do not limit the zones through which content can be accessed.

§  The standard HTTP and HTTPS ports (80 and 443) can be used across all applications in the model.

§  Port numbers are not included in URLs. In practice, port numbers are typically not used in production environments.

 

The design sample and corresponding article both articulate URLs across the environment to meet these goals.

 

As you plan for your site taxonomies and URLs, prioritize your design goals and then evaluate the tradeoffs of each option. Use the guidance in the article to get started with your plan.

Additional Logical Architecture Content

In the spirit of constructing a pluggable design sample, we have published a couple of articles to help you design the pluggable pieces:

§  Design My Sites architecture

§  Design logical architecture for collaboration sites

§  Design Records Center architecture

 

The purpose of each of these articles is to walk you through the specific logical architecture design decisions that apply to each of these types of sites. Take a look and let us know what you think.

What’s Next?

What’s next? You tell us. First, let us know if you like this approach. If you find it helpful, let us know what additional design samples and guidance you would like to see. Here are some ideas for sample designs:

§  Academic institution such as a university or school district

§  ISP or corporate hosting

§  Centralized state government hosting multiple government agencies

 

Also, let us know if you’d like to see additional articles for pluggable pieces.

4/2/2007 Best Practices Analyzer

“Microsoft Best Practices Analyzer for Microsoft® Windows® SharePoint® Services 3.0 and the 2007 Microsoft® Office System” has Shipped!

 

The Microsoft Best Practices Analyzer for Windows SharePoint Services 3.0 and the 2007 Microsoft Office System Best Practices Analyzer (BPA) programmatically collects settings and values from data repositories such as MS SQL, registry, metabase and performance monitor. Once collected, a set of comprehensive ‘best practice’ rules are applied to the topology.

Administrators running this tool will get a detailed report listing the recommendations that can be made to the environment to achieve greater performance, scalability and uptime.

 

You can get a copy here: http://www.microsoft.com/downloads/details.aspx?familyid=cb944b27-9d6b-4a1f-b3e1-778efda07df8&displaylang=en

 

Bill Baer from MS IT includes more detail on the release in this post.

(The same team that brought you the WSS 3.0 and MOSS 2007 MOM packs were responsible for this.)

3/30/2007 Tip: Using the Preview Pane to View Items in a Large List

Imagine a quick way to see all of the information from items in your list without having to navigate to every single one of them and without having to horizontally scroll the browser to navigate thru a list with many columns. Well, accomplishing that is as simple as creating a new view using the preview pane view style. This feature is available in Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007.

To use the preview pane in a view, follow these simple steps:

  1. Create a new contacts list. (This is a good example since this list type has many columns by default.)
  2. On the List default view page, click Settings on the toolbar, and then click on Create View.
  3. Give the view a name and add all available columns.
  4. Scroll down to the Style section. Expand the section and select Preview Pane.
  5. Click OK.
  6. Hover over the list of items. Notice that as you hover each item, all info related to that item is displayed on the section to the right. The content of the preview pane appears in a similar fashion to the typical item display form. The end results looks similar to the following:
     

Note: “Group by” views are not available when using the preview pane.

 

Luis Angel Mex
SDET

3/28/2007 Community Kit for SharePoint (CKS) 2.0 to kick off with a boost from the Solution Sharing Network (SSN) templates and web parts

As I had hinted a month ago, the CKS 2.0 effort will be kicking off very soon – likely on April 16th. Currently, there are several editions under consideration, but the three that will likely take priority are:

·         CKS: Corporate Intranet Edition

·         CKS: Enhanced Blog Edition

·         CKS: Internet/Extranet Edition

 

The development of the CKS 2.0 will get a boost from the work that was completed a couple of months ago by Microsoft’s Solution Sharing Network (SSN) Program, which is a successful global initiative that promotes and enables the sharing of solutions and best practices within the Public Sector. A key component that is offered through the SSN Program is a SharePoint-based community portal solution accelerator that consists of a collection of custom templates, web parts, and a user registration and self-service facility. Motivated by the SSN Program’s spirit of sharing intellectual capital and by the vision of the Community Kit for SharePoint, the SSN Program team has agreed to donate the SSN 3.0 Portal’s templates and web parts (with full source code) to the CKS project.

 

The SSN 3.0 Portal had been commissioned by Microsoft to be developed by Information Strategies (a Microsoft Gold Certified Partner), and feedback from developers and early adopters has been very positive due to the following key benefits:

  • A SharePoint web site with a highly customized look..
  • Good grounding in the development tools and methods that are available for developing custom web parts.
  • A much often requested user registration facility for Internet facing web sites. 

As we approach the kick off the CKS 2.0 effort, I am still looking for volunteers to join in at http://www.codeplex.com/cks. We need web designers, web site developers, and web parts developers. The CKS: User Group Edition 1.0 was released just a month ago, and it has been downloaded almost 1,000 times. Imagine the dramatic impact that the CKS 2.0 might have! And every member of the CKS 2.0 core team will receive a very nice jacket embroidered with the CKS logo. J

 

Instead of waiting until the CKS 2.0 effort gets into high gear, which could be several months from now, I am very pleased to announce that a special release of the SSN 3.0 Portal’s full source code and documentation is immediately available for download at http://www.codeplex.com/CKS/Release/ProjectReleases.aspx?ReleaseId=2606. I hope that the community will leverage it, extend it, and contribute useful updates back to the CKS 2.0 project.

 

Lastly, I would like to thank Jonny Chambers, Program Manager for the SSN Program, for his trust and support in making this very significant contribution to the CKS project.

 

 

<Lawrence />

 

3/28/2007 MS E-Learning releases Collection 5385: Developing Solutions with Windows SharePoint Services 3.0 and Visual Studio 2005

This online learning collection provides a rich multimedia experience coupled with comprehensive technical labs for developers, who need to develop and customize Windows SharePoint Services 3.0-based solutions. This collection also helps developers prepare for certification exam 70-541 (Microsoft Windows SharePoint Services 3.0 - Application Development), which was previously announced here.

Student prerequisites:
  • Visual Studio 2005 / .NET Framework 2.0 (1 year of use)
  • Working knowledge of building WSS 3.0 sites
  • Web Parts / Web Part Zones
  • Security providers
  • Master Pages / content pages

Subscription (less than $200 for 1 year):

  • Course 5386: Working with Server and Site Objects in Microsoft Windows SharePoint Services 3.0
  • Course 5387: Programmatically Securing Microsoft Windows SharePoint Services 3.0 Sites
  • Course 5388: Programming Lists and List Events in Microsoft Windows SharePoint Services 3.0
  • Course 5389: Managing Documents and Libraries in Microsoft Windows SharePoint Services 3.0
  • Course 5390: Working with List Metadata and Content Types in Microsoft Windows SharePoint Services 3.0
  • Course 5391: Customizing Navigation and Layout in Microsoft Windows SharePoint Services 3.0

The courses can be accessed at https://www.microsoftelearning.com/eLearning/offerDetail.aspx?offerPriceId=119608.

<Lawrence />

 

3/26/2007 Retrieving SharePoint List Items" Attachment URLs using Lists Web Service

Imagine a remote application that uses SharePoint Web Services to retrieve a list item’s attachments to perform some action on them or provide a link to them. This application could have been coded in WSS 2.0 using a mix of the GetListItems and GetAttachmentCollection methods of the Lists Web Service. However, the performance of such an app is extremely poor, since the developer had to issue a GetAttachmentCollection call for each item on the list.

In WSS 3.0, getting the complete list of attachments of each of the items in a list can be accomplished with a single call to GetListItems, using the IncludeAttachmentUrls query parameter, which is new for 3.0. The WSS 3.0 SDK’s GetListItems reference and how-to currently does not provide any documentation for this new parameter, so I hope this blog entry will sufficiently compensate for that in the interim. The way to use the IncludeAttachmentUrls parameter is shown in the following snippet of code:

Web_Reference_Folder_Name.Lists listService = new Web_Reference_Folder_Name.Lists();

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

 

XmlDocument xmlDoc = new System.Xml.XmlDocument();

XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");

XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields",

"");

XmlNode ndQueryOptions = xmlDoc.CreateNode(XmlNodeType.Element,

"QueryOptions", "");

 

ndQueryOptions.InnerXml =

"<IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls>";

ndViewFields.InnerXml = "";

ndQuery.InnerXml = "";

 

try

{

XmlNode ndListItems = listService.GetListItems("List_Name", null,

ndQuery, ndViewFields, null, ndQueryOptions);

      MessageBox.Show(ndListItems.OuterXml);

}

 

catch (System.Web.Services.Protocols.SoapException ex)

{

MessageBox.Show("Message:\n" + ex.Message + "\nDetail:\n" +

ex.Detail.InnerText + "\nStackTrace:\n" + ex.StackTrace);

}

The XML fragment returned will contain the List Item Attachments under the ows_Attachments Field, delimited by ;#. An example of a row of data returned by this method is shown below:

<z:row ows_ID="2" ows_ContentTypeId="0x0104001CAAB92900F22E4CBEF571BC76308DBE" ows_ContentType="Announcement" ows_Title="test" ows_Modified="2007-02-25 14:23:31" ows_Created="2007-02-25 14:21:02" ows_Author="1073741823;#System Account" ows_Editor="1073741823;#System Account" ows_owshiddenversion="3" ows_WorkflowVersion="1" ows__UIVersion="512" ows__UIVersionString="1.0" ows_Attachments=";#http://server/Lists/Announcements/Attachments/2/test.txt;#http://server/Lists/Announcements/Attachments/2/UIP_Setup.log;#" ows__ModerationStatus="0" ows_LinkTitleNoMenu="test" ows_LinkTitle="test" ows_SelectTitle="2" ows_Order="200.000000000000" ows_GUID="{17DD533F-97A2-4DB2-B925-A941D8BFFBD6}" ows_FileRef="2;#Lists/Announcements/2_.000" ows_FileDirRef="2;#Lists/Announcements" ows_Last_x0020_Modified="2;#2007-02-25 14:21:02" ows_Created_x0020_Date="2;#2007-02-25 14:21:02" ows_FSObjType="2;#0" ows_PermMask="0x7fffffffffffffff" ows_FileLeafRef="2;#2_.000" ows_UniqueId="2;#{FA303EDB-4009-4CC5-9EF2-E7402D3BD0C1}" ows_ProgId="2;#" ows_ScopeId="2;#{DEDE57E4-DE8E-4CF9-9BBC-924175CED304}" ows__EditMenuTableStart="2_.000" ows__EditMenuTableEnd="2" ows_LinkFilenameNoMenu="2_.000" ows_LinkFilename="2_.000" ows_ServerUrl="/Lists/Announcements/2_.000" ows_EncodedAbsUrl="http://server/Lists/Announcements/2_.000" ows_BaseName="2_" ows_MetaInfo="2;#" ows__Level="1" ows__IsCurrentVersion="1" ows_Body="<div class=ExternalClass0BA3FF0220C34E74A624A1FC0C7F0DA8> <div>test</div></div>" />

SDK References

·         WSS 2.0 Lists Web Service: http://msdn2.microsoft.com/en-us/library/aa152619.aspx.

·         WSS 3.0 Lists Web Service: http://msdn2.microsoft.com/en-us/library/lists.aspx.

 

Luis Augusto Angel Mex
SDE/T for SharePoint

 

3/26/2007 Retrieving SharePoint List Items" Attachment URLs using Lists Web Service

Imagine a remote application that uses SharePoint Web Services to retrieve a list item’s attachments to perform some action on them or provide a link to them. This application could have been coded in WSS 2.0 using a mix of the GetListItems and GetAttachmentCollection methods of the Lists Web Service. However, the performance of such an app is extremely poor, since the developer had to issue a GetAttachmentCollection call for each item on the list.

In WSS 3.0, getting the complete list of attachments of each of the items in a list can be accomplished with a single call to GetListItems, using the IncludeAttachmentUrls query parameter, which is new for 3.0. The WSS 3.0 SDK’s GetListItems reference and how-to currently does not provide any documentation for this new parameter, so I hope this blog entry will sufficiently compensate for that in the interim. The way to use the IncludeAttachmentUrls parameter is shown in the following snippet of code:

Web_Reference_Folder_Name.Lists listService = new Web_Reference_Folder_Name.Lists();

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

 

XmlDocument xmlDoc = new System.Xml.XmlDocument();

XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");

XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields",

"");

XmlNode ndQueryOptions = xmlDoc.CreateNode(XmlNodeType.Element,

"QueryOptions", "");

 

ndQueryOptions.InnerXml =

"<IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls>";

ndViewFields.InnerXml = "";

ndQuery.InnerXml = "";

 

try

{

XmlNode ndListItems = listService.GetListItems("List_Name", null,

ndQuery, ndViewFields, null, ndQueryOptions);

      MessageBox.Show(ndListItems.OuterXml);

}

 

catch (System.Web.Services.Protocols.SoapException ex)

{

MessageBox.Show("Message:\n" + ex.Message + "\nDetail:\n" +

ex.Detail.InnerText + "\nStackTrace:\n" + ex.StackTrace);

}

The XML fragment returned will contain the List Item Attachments under the ows_Attachments Field, delimited by ;#. An example of a row of data returned by this method is shown below:

<z:row ows_ID="2" ows_ContentTypeId="0x0104001CAAB92900F22E4CBEF571BC76308DBE" ows_ContentType="Announcement" ows_Title="test" ows_Modified="2007-02-25 14:23:31" ows_Created="2007-02-25 14:21:02" ows_Author="1073741823;#System Account" ows_Editor="1073741823;#System Account" ows_owshiddenversion="3" ows_WorkflowVersion="1" ows__UIVersion="512" ows__UIVersionString="1.0" ows_Attachments=";#http://server/Lists/Announcements/Attachments/2/test.txt;#http://server/Lists/Announcements/Attachments/2/UIP_Setup.log;#" ows__ModerationStatus="0" ows_LinkTitleNoMenu="test" ows_LinkTitle="test" ows_SelectTitle="2" ows_Order="200.000000000000" ows_GUID="{17DD533F-97A2-4DB2-B925-A941D8BFFBD6}" ows_FileRef="2;#Lists/Announcements/2_.000" ows_FileDirRef="2;#Lists/Announcements" ows_Last_x0020_Modified="2;#2007-02-25 14:21:02" ows_Created_x0020_Date="2;#2007-02-25 14:21:02" ows_FSObjType="2;#0" ows_PermMask="0x7fffffffffffffff" ows_FileLeafRef="2;#2_.000" ows_UniqueId="2;#{FA303EDB-4009-4CC5-9EF2-E7402D3BD0C1}" ows_ProgId="2;#" ows_ScopeId="2;#{DEDE57E4-DE8E-4CF9-9BBC-924175CED304}" ows__EditMenuTableStart="2_.000" ows__EditMenuTableEnd="2" ows_LinkFilenameNoMenu="2_.000" ows_LinkFilename="2_.000" ows_ServerUrl="/Lists/Announcements/2_.000" ows_EncodedAbsUrl="http://server/Lists/Announcements/2_.000" ows_BaseName="2_" ows_MetaInfo="2;#" ows__Level="1" ows__IsCurrentVersion="1" ows_Body="<div class=ExternalClass0BA3FF0220C34E74A624A1FC0C7F0DA8> <div>test</div></div>" />

SDK References

·         WSS 2.0 Lists Web Service: http://msdn2.microsoft.com/en-us/library/aa152619.aspx.

·         WSS 3.0 Lists Web Service: http://msdn2.microsoft.com/en-us/library/lists.aspx.

 

Luis Augusto Angel Mex
SDE/T for SharePoint

 

3/25/2007 Recommended Reading for March and April, 2007

Recommended Reading for March and April (click here for previous recommendations).

Lots of useful content (I can hardly keep up anymore!) and tools generated by the community:

  • Complete MOSS licensing info by Cornelius J. van Dyk (SharePoint MVP) -- addresses a top FAQ from customers by providing links to Microsoft"s official content for MOSS"s license model, feature comparison, and sample prices.
  • How to Build a SharePoint Development Machine by Eli Robillard (SharePoint MVP) -- provides real world guidance and a walkthrough on building a dev box for SharePoint. And Bil Simser (SharePoint MVP) provides a good rundown of useful tools that should be installed on this machine.
  • Upgrading SharePoint Site Templates and List Templates by Eli Robillard (SharePoint MVP) -- addresses an FAQ many people face during the upgrade planning process.
  • Wrangling SharePoint Workflows with Visual Studio by Robert Bogue (SharePoint MVP) -- addresses an FAQ from developers by demonstrating how to create a workflow that creates tasks using content types.
  • New version of SmartPart, now with "AJAX Connections" by Jan Tielens (SharePoint MVP) -- the SmartPart that provides a seamless SharePoint web part wrapper around ASP.NET 2.0 User Controls, so you can use them unchanged on a SharePoint site, has just gotten even better.
  • How to use the Data View web part and XSL to customize a SharePoint blog"s Post View by Mark Parsons -- a good tip that will likely make its way into the Community Kit for SharePoint: Enhanced Blog Edition.
  • On being a "SharePoint expert" by Bil Simser (SharePoint MVP) -- interesting commentary that I believe affirms the growing need for a SharePoint specific Microsoft Certified Professional program. FYI, we already have the necessary certification exams here and here.
  • Office SharePoint Server Developer Edition by Spencer Harbar (SharePoint MVP) -- an insightful and provocative plea for improvements to be made to the developer"s SharePoint environment.
  • Series on Customizing Wiki Pages by Kit Kai (SharePoint MVP) -- provides drilldown and walkthrough on how to customize the page layout of the SharePoint wiki, so you can implement a mini-Wikipedia for your intranet.
  • 10 Issues and Resolutions for SharePoint Workflows by Robert Bogue (SharePoint MVP) -- Robert has probably reported more SharePoint workflow related issues and bugs than anyone outside of Microsoft, and here he shares his top 10 list for the benefit of the community.
  • How To: Create a custom Windows Workflow Activity and make it available in SharePoint Designer by Todd Baginski (SharePoint MVP) -- provides a deep dive walkthrough of what lots of SharePoint developers would love to do but have no idea how to. This is a great example of how community generated content can be a perfect compliment to Microsoft published content on MSDN.
  • Creating a Training Portal Using Microsoft Office SharePoint Server 2007 (with screencast) by Mike Gannotti (SharePoint Technology Specialist Extraordinare) -- addresses one of the FAQs I get from customers by showing just how easy the solution can be implemented.
  • SharePoint Manager 2007 by Carsten Keutmann -- reading about Carsten"s progression in developing iterations of this tool is just as useful as the tool itself, which provides a comprehensive tree view of practically all of SharePoint"s configurable properties as well as the ability to change them directly (but please do so with care!).
  • SharePoint Solution Installer by Lars Fastrup -- a free tool for eased installation and deployment of SharePoint 2007 solution files to a SharePoint server farm. I"m pleased to see more and more professional developers (especially at MS Certified Partner ISVs) contributing quality (and free!) tools to the community.
  • SharePoint 2007 Maximum Limitations and Single SignOn Error codes and what they mean by Harsh Chiplonkar (SharePoint Support) -- this kind of info will ultimately make its way into a KB article, but I"m glad that Harsh has taken the time to post it for all to see.

And a bunch of quality content developed or commissioned by Microsoft:

  • Demo screencasts: A six-part series on getting the most out of SharePoint Designer 2007 -- covers topics ranging from customizing SharePoint sites to building layout pages and designing workflows to building composite applications and Integrating with Visual Studio to deploy site definitions. These cost a bundle to develop with a professional training company, and I hope that you"ll agree that the quality shows through.
  • Building Custom Search WebParts with Integrated SAP NetWeaver Portal Search for Microsoft Office SharePoint Server 2007 white paper by Lei Liu (Spell GmbH) and Tilo Böttcher (Microsoft) -- FYI, we will be blogging a lot more about Enterprise Search very soon, so stay tuned.
  • MOSS 2007 Item-Level Auditing source code and white paper by Ted Pattison (SharePoint MVP) -- addresses another FAQ I get from so many customers.
  • Securing Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 using Microsoft Forefront Security for SharePoint -- addresses the surprise lack of awareness within the community about our ForeFront security products for SharePoint.
  • Office SharePoint Server 2007 Evaluation Guide (RTM complete) by Arpan Shah (my manager) -- I had authored the beta version with help from an outside vendor, and it had a surprisingly long shelf life, but Arpan practically wrote all of the updates to the RTM version himself, so he"s being way too modest about what he has accomplished.
  • MOSS 2007 specific customer case studies -- there"s now at least one getting published every week, which provides a great testament to the growing success of SharePoint Server in the marketplace. Most of you reading this list won"t need any more convincing from us, but this is good information for you to send to your company"s decision makers, so you"ll get the funding for your SharePoint-based solution sooner vs. later. :-)

<Lawrence />

3/22/2007 Re-Announcing the Asia Pacific SharePoint Conference in Sydney, Australia!

[Update: The conference registration site is now live at http://www.microsoftsharepoint.com, so go register yourself today!]

The Conference

This exclusive Microsoft event is the third and final of three global SharePoint Conferences, following Seattle and Berlin. This world-class, two-day conference, to be held at the Hilton Hotel in Sydney from May 15-16, will showcase the latest innovations, features and functionality for the 2007 SharePoint products and technologies.

The conference will provide an unprecedented opportunity for customers and partners in the Asia Pacific region to meet and network with Microsoft Office System product development teams, fellow IT professionals and architects, and partners.

With only 500 places available, this event is not to be missed!

Expert Presenters

SharePoint experts from the Asia Pacific region and members of the SharePoint product group such as Derek Burney (General Manager), Mike Fitzmaurice and Joel Oleson (both Senior Technical Product Managers), will provide attendees with technical information and demos for the latest release of SharePoint products and technologies: Microsoft Office SharePoint Server 2007, Windows SharePoint Services 3.0, and Office SharePoint Designer 2007.

And for the first time in Australia, information on Microsoft Office PerformancePoint Server 2007 will be presented.

Brand New Deep Dive Content

Multiple tracks focused on specific solution technologies including Collaboration, Enterprise Search and Portals, Business Intelligence and Enterprise Content Management will be offered. Plus, there will be additional opportunities for attendees to learn about, and get hands on experience with, SharePoint products and technologies.

Technical “how to” breakout sessions covering subjects such as architecture, security, integration, deployment, migration, management and scalability, will help attendees develop, customise, integrate and build powerful, enterprise-ready solutions with SharePoint products and technologies.

Event Details

Dates: 15-16 May 2007
Venue: Hilton Hotel in Sydney, Australia
Cost: $549.00 for two days (includes registration, Welcome Night, conference sessions, and evening entertainment event)

Save the Date

Registrations for this conference will open soon (look for an announcement on this blog), and seats will be strictly limited. Block off May 15-16 on your calendar right now, so you won’t miss out!

上一页 1 2 3 4 5 6 7 8 9 10 下一页

   

Site List:
>>Xbox Live_s Major Nelson
>>Xbox 360 & SharePoint 2007 Weblog
>>Carsten Keutmann_s Blog
>>Mohamed Zaki_s Blog [Sharepoint MVP]
>>The Mit_s Blog
>>Mart Muller_s Sharepoint Weblog
>>Microsoft SharePoint Products and Technologies Team Blog
>>SharePoint Solutions Blog
>>4GuysFromRolla.com Headlines
>>ASP.NET Blogs
>>SharePoint Blogs
>>SharePoint Blogs
>>Joel on Software
>>ADO Guy_s Rants and Raves
>>Microsoft Live Labs
>>GadgetNews
>>Windows Vista Team Blog
>>VoIP & Gadgets Blog
>>schrankmonster blog
>>Via Virtual Earth Blog
>>Feed
>>MSDN Blogs
>>Mashable!

Links:
Jack's Readings

Month Archives:
Oct 2007
Sep 2007

Top Tags:
social software social networking .NET mashable Sharepoint ASP.NET Web 2.0 Web2.0 Startups Community News Search Marketplace General Software Development AJAX Windows Vista Visual Studio Microsoft myspace Silverlight People Powered! YouTube Vista MOSS Featured News C# Events MOSS 2007 Google WPF Office 2007 Web Community Security General Personal Xbox 360 facebook Tools development SharePoint 2007 Fun Atlas Architecture ASP.NET AJAX myspace codes TheLongTail IIS SQL Server Developers Revenue Sharing Video Pictures WCF Mobile 2.0 Announcements Orcas MIX07 Arcade Team System JavaScript News



@2007 All rights Reserved