/* If your looking at source view the CSS is not correct and needs to be updated. Due to the deletion of Free Text Box it has modified this page and others. I haven't had time to fix it. */

 Welcome To Jose M. Tamez

Just want to thank ASP.NET and the following experts:
Scott Mitchell, Ted Pattison, Errin O'Conner, Andrew Connell, and last but not least, Bob Tabor and his team @ Learn Visual Studio.NET

A blog, contraction of the term "weblog" website, usually maintained by an individual with regular entries of commentary, descriptions of events, or other material such as graphics or video. Entries are commonly displayed in reverse-chronological order. "Blog" can also be used as a verb, meaning to maintain or add content to a blog.

 

LET THE BLOGGING BEGIN!


Everything SHAREPOINT WSS3.0, M0SS2007, AND SHAREPOINT2010 (64-bit Version Only!)


Well, I had my SharePoint site up and running but I took it down because it's time to work on a new look and overall design for this site. I hadn't put together a machine in a while and I was hoping for some big improvements down the road and I saw that with new Intel i7 930  core processor. Wow! The new x58 architecture along with DDR3 memory, intel solid state drive, and the abundantly cheap but high-end video cards, left me no choice but to splurge and go all out and jump into a premium system. Then, the new Widows 7 64bit was a no-brainer and along with the new Microsoft Office 2010, it had me forgetting about the $2300.00 I spent for this entire build. The most notable difference would have to be Visual Studio 2008. No more having to wait for pages to load while pulling my hair and throwing fits reminiscent of the  way I get when driving in Houston traffic. I can now work in peace and start on the home project I've been planning on for a long time now.


I've had all sorts of computer problems but I finally broke down and upgraded to some new software and hardware. Starting with a new workstation build, I put together a top notch system that includes:

Hardware

  • iStarUSA E-4000 4U Military Rackmount Server Case x 3

  • Intel i7 930 2.8Ghz Core processor

  • Asus Rampage II "Gene Motherboard

  • Intel Solid State 80GB SATA Drive

  • Radeon HD5750 1GBGDDR5 Memory HDMI with 7.1 Surround Video Card

  • Corsair XMS3 DDR3 1600MHz 2GB x 3 (3 sticks)

  • Antect TruePower Quattro 1000 watt Power Supply

  • Corsair H50 Liquid Cooling System (for overclocking)

  • LG Super Multi-Blue BD Rewriter

Software

  • Windows 7 64bit Ultimate

  • Microsoft Office 2010 Pro Plus

  • AVG Internet Security Suite

  • Nero Multimedia Suite 10

Accessories

I also broke down and purchased a new network attached storage


  • LaCiE 301300U Enthernet Disk 4TB, 8MB Gigabit Lan Rackmount NAS

Oh, the project. Yes, this site is getting a major overhaul and facelift. I've been wanting to do this for awhile and this site and it's design have been screaming for a new look for a very long time. So, the Sharepoint site is down and I wiill have it running again just as soon as  I get my new site up first. This site was done in VB.Net but I will now do the new site in C# and add many more controls and functions as well as some AJAX and SiliverLight. I have many things planned for this new site and that also includes a new blog with a new look. So stick around and I hope to hear from you on my new blog.

I am now cocked, fully loaded and ready to face the toughest jobs starting with my new site project. This system rocks!

Code Snippets

Just thought I would pass this one along and avoid the headache of having to figure out the way to provide a news rollup on the landing page. I had mentioned in one of the posts below that you could make a copy of the article page layout and start with that but I did it another way. I did it with SharePoint Designer and then customized the page with the page fields and content type fields I wanted. First create the custom content type at the root based on the article layout. Then create the custom news page from SharePoint Publishing - Page Layout - "Options" under the group you selected to put it in and name the URL and Title.

I had written a lengthy article with step by step instructions on how to accomplish getting the news rollup on your home page with the “read more….” link on the end. Way to long and you should already know how to get that far. I just want to share this XSLT markup and save others the hassle and time of having to write it themselves.

Remember, I used the description page field, but you can also add another field of your choice to your custom page layout so long as you remember to add the editor control. You can also add a custom style to the div tag or a function to the value that can limit the amount of characters that show up on the news rollup. All-in-all very flexible.

Open the XSL Style Sheets library and open the itemStyle.xsl file. Choose the style you want to use and copy and rename it and past down at the bottom of the page. Then take this markup and replace the description value or whatever value you chose.

  //
          <div class="link-item">
             <div style="color: black; font-size: small; font-family: Arial, Helvetica, sans-serif; line-height: -2%">
                    <xsl:value-of select="substring(@Description, 0)" disable-output-escaping="yes" />
                    <a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="Read More"> .....Read More</a>
                  </div>
 
            </div>
        </div>
    </xsl:template>

\\

 If you want to know the internal column names of those fields the CQWP is pulling create the following style in the Item Style sheet and give it you own custom name:

 //
         
<xsl:for-each select="@*">
    P:<xsl:value-of select="name()" />
    </xsl:for-each>

\\

Seriously though, there is another issue when applying a presentation style within your content query web part and you're using a link based content type. Any of the available styles out-of-the-box will render your lnks as (Blank) hyperlinks and if you click the link it navigates to, guess where? Back to the link item. Ok, so that's not going to work and you need to export the web part to local drive, open it in notepad, and change the commonfields property and identify the URL. It should looks like this: <property name="CommonViewFields" type="string">URL,text</property>

Next, you need to modify the item style sheet. So take a xsl template style from the items style sheet like the "Title Description" template, and copy and paste at the bottom of the item styles sheet. You now need to dress up your link and have it use the URL you have listed. Change the name first to something like "Link Lists" or any name you prefer and change the code accordingy like so:

<xsl:template name="LinkLists" match="Row[@Style='LinkLists]" mode="itemstyle">
 <xsl:variable name="DisplayTitle">
        <xsl:call-template name="OuterTemplate.GetTitle">
            <xsl:with-param name="Title" select="@URL"/>
            <xsl:with-param name="UrlColumnName" select="'URL'"/>
        </xsl:call-template>
    </xsl:variable>
 <xsl:variable name="LinkTarget">
        <xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
    </xsl:variable>
 <div id="linkitem" class="item" >
  <div class="bullet link-item">
   <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
   <a>
    <xsl:attribute name="href">
     <xsl:value-of select="substring-before($DisplayTitle,', ')">
     </xsl:value-of>
    </xsl:attribute>
    <xsl:attribute name="title">
     <xsl:value-of select="@Description">
     </xsl:value-of>
    </xsl:attribute>
    <xsl:value-of select="substring-after($DisplayTitle,', ')">
    </xsl:value-of>
   </a>
  </div>
 </div>
</xsl:template>

\\

What makes up an XSLT sytlesheet are a set of rules. The first one is the <xsl:template> and it's used for matching a pattern of characters. In this case it's the "Row[@Style="LinkLists]" mode="Itemstyle". You could assign the "/" which implies matching the root element, which means matching the entire source document, but we want to match the "Row[@Style='LinkLists'] and select the specific style named "LinkLists". Notice the variables? The first variable is called DisplayTitle and it's made up of the two elements that are matched using the <xsl:call-template name="OuterTemplate.GetTitle">. the two elements <xsl: with-param name="" select="@"/>, match and extract the Title URL and the UrlColumnName URL. The link list title column will replace "BLANK", and the second param name will call the URL from the UrlColumnName. The third variable is the "LinkTarget" and it uses the <xsl:if> element by using conditional logic with the test attribute to specify if an action should be taken. In this case if "@OpenInNewWindow = "True" then the URL attribute target is equal to, you guessed it "_blank" which will target the browser to open in a new window.  By the way, that's why it says BLANK because that part of xslt code was not changed it was like that originally. You will also notice the CSS div tags that dress up the list with bullets. Here you can use a different bullet style e.g. whatever your heart desires. I know the Aussie SharePoint MVP Ishai Sagi likes to use <. Cool dude and great source for tips & tricks. Anyway, back to the code. The <xsl:value of> element is the XPath. It locates and extracts the title, in this case the variable ($DisplayTitle,',), and uses the attribute name "href" to place the href attribute before the displaytitle variable using "substring-before".  In the next <xsl:attribute name="title"> element this locates and extracts the description <xsl: value-of select="@Description">. If you remember the description is the URL title name but will be used as the ALT attribute of the href tag which will go after the DisplayTitle variable. If I missed something please let me know but so far this is my understanding of XSL transformation and how it works and it has worked for me. Remember that XSLT is to XML what CSS is to HTML or XHTML if you prefer.

One last important mention, if any of the code is mispelled or incorrect you run the risk of breaking all of your web parts. You hope it's only the one you've imported but it can break all of your webparts within your entire site collection. That's bad news if you don't have a development environment and you're doing this on a live producton box.

Some common data types.
  • Text
  • Notes
  • Number
  • Currency
  • Integer
  • Boolean
  • DateTime
  • Threading
  • Lookup
  • Choice
  • URL
  • Counter
  • DisplayOnly (DisplayOnly field type has no storage of its own)

If you know how to customize styles using CSS then use the following style to remove the sort header: For any team lists you're using as a web part drop it onto the page and then drop a content editor web part below it. It must be below the other web part you want to modify or in other words, in the same zone. Open the source editor and paste the code below. Click ok and publish and presto, no filter headers. To me it looks and feels like actual cascading with the style written in the header. What do you think?

  //

<style>
.ms-viewheadertr { display: none; }
</style>

//

For further analysis go to MVP Heather Solomon's web site and checkout the "Custom Item Style" article. Her website is an excellent source for SharePoint customization.

Featured Article

Events in SharePoint 2007 by Ted Pattison

Windows® SharePoint® Services (WSS) 3.0 offers developers many significant improvements for building custom business solutions based on SharePoint sites. One of the biggest developer-focused enhancements has to do with a new infrastructure for handling server-side events. For example, when a user performs an action that modifies content in a SharePoint site—say, uploading a new document or deleting an item from a list—there is an opportunity for a developer to respond to this user action with an event handler that executes server-side logic written in C# or Visual Basic®.
While WSS 2.0 also provided an infrastructure for server-side event handling, things are vastly improved in WSS 3.0. It's important for you to understand that the new WSS 3.0 event-handling infrastructure is not a mere refinement of what was already there in the previous version. The new WSS 3.0 event-handling infrastructure represents a complete replacement for the WSS 2.0 event-handling infrastructure. One of the biggest changes is that event handling is implemented at the list level and not the document library level. That means events that fire on list definitions and list items work on all types of lists, including document libraries. Check out the rest of this article
here.

Featured Technology

CAML

CAML (Collaborative Application Markup Language) is an XML based markup language used with the family of Microsoft SharePoint technologies (Windows Sharepoint Services and Office SharePoint Server). Unlike plain XML, CAML contains specific groups of tags to both define and display (render) data.

In general, almost all xml files in a sharepoint installation utilize CAML. Specifically CAML is very important in site and list definitions, via the Onet.xml files as well as other corresponding xml files. Here the CAML is used to define what elements exist on an instance of a site, and the display of these sub-elements, while the aspx files are used to define how to arrange and display those elements to form the site.

CAML can be used by Software Developers to query against Sharepoint lists and views, when programming against the SharePoint API (CAML is supported by Sharepoint Web Services and by the Sharepoint Object Model).

CAML query syntax can be created graphically from an existing Sharepoint list by using the U2U CAML Generator tool.

CAML is used for two types of rendering in Windows SharePoint Services: to define the type of data that is contained within a field, and to construct HTML that is displayed in the browser.

CAML allows developers to both construct and display data. Microsoft refers to elements used to display data as "Rendering" elements.

  <Fields>
    <Field Type="Counter" Name="ID"/>
    . . . other field definitions. . .
  </Fields>

CAML allows for the generation of HTML based on specific sets of tags. For example, the following example loops through some data and generates an HTML drop down menu of choices:

 <ForEach Select="CHOICES/CHOICE">
    <HTML>fld.AddChoice(</HTML>
    <ScriptQuote>
       <Property Select="."/>
    </ScriptQuote>
    <HTML>, </HTML>
    <ScriptQuote>
       <Property Select="Value"/>
    </ScriptQuote>
    <HTML>);</HTML>
  </ForEach>

CAML is also used to define tables in the Windows SharePoint Services database during site provisioning.

So, you need to be familliar with this language but if you've worked with XML, this should come easy.

Base Types

All content types ultimately inherit from the System content type. This site content type is sealed and cannot be edited. Content types that belong to the "_Hidden" group are not displayed in the user interface for users to apply to lists, or use as the basis for other content types. The content type ID of a content type includes the content type IDs of all the content types from which it inherits, thereby listing its genealogy.

Just a quick reference:

A listing of base content types
 

ContentClass Strings

Have you wondered what other strings you can use for the contentclass? Well here is a list of those strings you can use to create more custom search scopes. Happy searching..........

  • Search Query:  urn:content-class:SPSSearchQuery
  • News Listing:  urn:content-class:SPSListing:News
  • People:  urn:content-class:SPSPeople
  • Category:  urn:content-classes:SPSCategory 
  • Listing:  urn:content-classes:SPSListing
  • Person Listing: urn:content-classes:SPSPersonListing
  • Text Listing:  urn:content-classes:SPSTextListing
  • Site Listing: urn:content-classes:SPSSiteListing
  • Site Registry Listing: urn:content-classes:SPSSiteRegistry
  • Site:  STS_Web
  • List: STS_List
  • List Item:  STS_ListItem
  • Events:  STS_List_Events
  • Tasks:  STS_List_Tasks
  • Announcements:  STS_List_Announcements
  • Discussions:  STS_List_DiscussionBoard
  • Contacts:  STS_List_Contacts
  • Links:  STS_List_Links
  • Document Library: STS_List_DocumentLibrary
  • Document Library Items:  STS_ListItem_DocumentLibrary
  • Picture Library: STS_List_PictureLibrary
  • Picture Library Items: STS_ListItem_PictureLibrary

 



POST IT!
Blog: Leave me your thoughts or comments!

Server Setup For Search
Comment added by: Joet  joet@josetamez.com Wednesday, July 28, 2010  @ 9:59 AM

How do I have my farm setup for search? OK, I have three servers, Front-end, Back-end, and an Index Server. The index server does all of the crawling of the front-end and then propagates the indexes over to the front-end that is setup as the query server. Pretty simple!


Propagation of Indexex to Query Server
Comment added by: Joet  joet@josetamez.com Wednesday, July 28, 2010  @ 9:42 AM

Use the stsadmin utility to setup the farm index and query server using the following commands. stsadm -o osearch -action start -role query -defaultindexlocation c:\indexes -farmcontactemail webmaster@yourintranet.com Run this on the query server and this will set the Query Server Index File Location folder


View All Site Content
Comment added by: joet  joet@josetamez.com Friday, July 23, 2010  @ 11:30 AM

Man! Have I been asked this a few times. Can you remove the "View All Site Content" link for certain visitors? This link can be a very useful navigational link or problematic that confuses some end users. The default security setting for this SPLinkButton is set to be displayed to everyone…and when I say everyone I mean everyone…viewers and even anonymous users. This is found in the master page in your site. 1.Open up the master page in SharePoint designer 2.Place the page into split view 3.Click the View All Site Content link and in you code window you should see the following:
” AccessKey=”<%$Resources:wss,quiklnch_allcontent_AK%>”/>
Thankfully we can easily upgrade the security to different security level. For example, if we change the PermissionsString=”ManageWeb” then only users who have this permission level (site admins) will see the View All Site Content link.
” AccessKey=”<%$Resources:wss,quiklnch_allcontent_AK%>”/>
There are a number of different permission levels that you can view here. The SharePoint:SecurityTrimmedControl is a handy control that can be used in many locations. For example, wrap it around the Site Actions control for custom and you remove this control based on security. Pretty cool!



Search Scope Property Query "contentclass"
Comment added by: joet  joet@josetamez.com Tuesday, July 13, 2010  @ 9:29 AM

If you ever had to create a search scope and you want to use the contentclass property query, here are all the different strings you can use with the ContentClass: 1. Search Query: urn:content-class:SPSSearchQuery 2. News Listing: urn:content-class:SPSListing:News 3. People: urn:content-class:SPSPeople 4. Category: urn:content-classes:SPSCategory 5. Listing: urn:content-classes:SPSListing 6. Person Listing: urn:content-classes:SPSPersonListing 7. Text Listing: urn:content-classes:SPSTextListing 8. Site Listing: urn:content-classes:SPSSiteListing 9. Site Registry Listing: urn:content-classes:SPSSiteRegistry ------------------------------------------------------------- 10. Site: STS_Web 11. List: STS_List 12. List Item: STS_ListItem 13. Events: STS_List_Events 14. Tasks: STS_List_Tasks 15. Announcements: STS_List_Announcements 16. Discussions: STS_List_DiscussionBoard 17. Contacts: STS_List_Contacts 18. Links: STS_List_Links 19. Document Library: STS_List_DocumentLibrary 20. Document Library Items: STS_ListItem_DocumentLibrary 21. Picture Library: STS_List_PictureLibrary 22. Picture Library Items: STS_ListItem_PictureLibrary 23. Site Collections: STS_Site Use one of these for your contentclass when creating a search scope.


Moving a MS SQL Database
Comment added by: Joet  joet@josetamez.com Wednesday, June 16, 2010  @ 4:37 PM

You installed MS SQL on the boot drive and you're running out of space and you need to move it to another drive. No problem, open your server in Management Studio and right click the server name and click "New Query". Paste the following into the query pane: "" USE master; GO ALTER DATABASE sharepoint MODIFY FILE (NAME = sharepoint, FILENAME = '{new location}\sharepoint.mdf'); GO ALTER DATABASE sharepoint MODIFY FILE (NAME = sharepoint_log, FILENAME = '{new location}\sharepoint_log.ldf'); GO "" Right click the database name and scroll down to and click "Restart" and restart SQL Server. Then open another query the same way as before and execute this query: "" SELECT name, physical_name FROM sys.master_files WHERE database_id = DB_ID('sharepoint'); "" This will verify that the move/change has been made. Under the physical_name column you should see the path to the new location. Works like a charm and I have plenty of space now..........


List Templates
Comment added by: Joet  joet@josetamez.com Friday, June 11, 2010  @ 9:11 AM

I had a user that wanted to reset versioning on all of her documents to 1. My solution is to simply save the library as a list template and then create a new library using that template. Right from the start she couldn't save it because it threw an error "This list is too large to save as a template. The size cannot exceed 10485670 bytes." Simple enough, fire up the stsadm.exe and use this "stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 50000000" and your good to go.This of course increases the limit to 50MB......


Request a Page?
Comment added by: Joet  joet@josetamez.com Friday, May 28, 2010  @ 7:15 PM

Another question posed was what happens when a user requests a page from SharePoint? Talk about ambiquous and vague! Let's see, under pressure and obviously dealing with a loaded question. Do I go into detail and discuss the plumbing underneath IIS, as to how the page is compiled into a DLL (dynamic link library) kind of misleading isn’t it? How it’s parsed by the asp.net run time and then builds the control tree(contains all server-side controls defined within the page), and by the way, how you can use reflector to look at this process, then generates the page derived class and finally takes the actual .aspx page and compiles it into a DLL. This same compiled DLL can be used over and over until the page is changed(edited), and then the ASP.net runtime parses and compiles the page again. You have the HTTP Request Pipline that allows developers to work at that lower level comparable to ISAPI. Which reminds me, how does the page request even get to this process? The ultimate destination of any page request is the end point. That’s where the HTTP Request Pipeline comes in and their is way too much to cover on this topic. Did I forget the IIS Metabase that keeps track of configuration information for all of your webs? No, because I would rather talk about the W3C’s formatted log file and explain how you can use it to create your own custom statistics application. But wait, back to the requested SharePoint page. There is the SPVirtualPathProvider that makes it possible to retrieve page content from the backend database. If you go back to how a page is processed and then think about how many pages could possibly get requested at the same time using the same page definitions, you can now explain page ghosting and how an uncustomized page instance request can be process much quicker by loading a page template that resides as a physical file on the server into server memory and how it’s processed by the ASP.Net run time the same way and because the DLL is loaded into memory in the IIS worker process just once per web application, it’s used for every page request. That sir, is the process of page ghosting and one of the many benefits of SharePoint WSS3.0. Oh, by the way, SharePoint is a web application not a web site! By now you’re asking me what's the difference.Two words! Virtual Directories (12 hives). And you call yourself a SharePoint admin or worst, a SharePoint developer. It's because SharePoint applications run in a virtualized site context using a backend to store page content. What do you use to create that page content? Did you say Web Part? Boy, you're pretty smart. This makes it a huge difference from typical ASP.Net web development. In SharePoint, Web parts exist in the content database and are added to the page later in the page's life cycle. Most important is the fact that they are processed through SharePoint's Safe Mode Processor and should be as autonomous as possible and usually includes a CAS policy. That's control! If the page requested is customized then that page is unghosted and must be processed without the compiled DLL stored in memory because all customization is kept in the content database. That’s what the SPVirtualPathProvider does, it determines whether to process a page as a ghosted or unghosted page. But wait, what page is being requested? There are site template pages and then their are application pages sitting on the web frontend. Ok, you got me I give up.... I’ve been working with MOSS2007 since Beta 2006 and the only time I’ve ever had a web application quit working every five minute was because for one, I had a three tier(topology) farm using all Dell desktops and running pre SP1 MOSS2007 and getting hundreds of requests. Think about it, back then there was little or no support for MOSS2007. I was on my own and I had to figure it out. I think I’ll continue working as a consultant and continue helping those company’s who don’t care how it’s done and just want results and a great product, which by the way has terrible support. To this day I’ve never had to call Microsoft support for anything but I’ve seen and heard others on the phone and it was painful.


http handlers
Comment added by: Joet  joet@josetamez.com Friday, May 21, 2010  @ 9:18 AM

Another situation you would use an httphandler is in your development work creating classes for a particular object. Let say you want create an object that requires a fair amount of resources like images, javascripts or xml files. You want to keep you program autonamous and embed those resourses so what do you do? Well, you should know how to do that in Visual Studio but one item that is required is the "verb". You add the "verb" in your web.config file that GETS your resouces through the provided path using the http handler. Required for ASP.Net 1.x only... Now one way to access those resources from the assembly resource folder is through code using the Get Named Resouce method.


Protocol Handlers
Comment added by: Joet  joet@josetamez.com Monday, May 10, 2010  @ 5:10 PM

I was asked what a protocol handler is used for and for the life of me I couldn't give an answer. Then a few hours later it dawned on me, I use one everyday for Sharepoint Enterprise Search that goes by the name sps3 in http://sps3:port# WSS3 for a URL crawl. I had heard of it before and learned about it years ago but just forgot. Custom protocol handlers are used to identify and crawl specific content. Used in conjuction with an IFilter, the protocol handler extracts metadata nd other information and then identifies the file type and based on the file type calls the appropriate IFilter.


NewDwp.aspx File Not Found
Comment added by: Joet  joet@josetamez.com Wednesday, May 05, 2010  @ 10:17 AM

I had recently developed a custom web part and when I finally went to add it to the gallery, the "NewDwp.aspx" page gave me an error. Turns out that I am currently using the SharePoint Smart Part wrapper and it also includes an AJAX version. This requires the ASP.NET 2.0 AJAX Extensions 1.0 to be installed on the server. Once installed run the iisreset /noforce and problem solved. Link: http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&DisplayLang=en


Failed to Upgrade New Server to Farm
Comment added by: Joet  joet@josetamez.com Tuesday, April 13, 2010  @ 9:03 AM

If you add a new Web server to an existing server farm that does not have any Web applications, and you update the Web server and then run the SharePoint Products and Technologies Configuration Wizard, you might receive the following error message: An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown. Additional exception information: Failed to upgrade SharePoint Products and Technologies. Additionally, the Upgrade.log file found at %COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\Logs contains the following error message: The access control list on %COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\template\layouts\Web.config could not be modified because the path could not be located in the file system. Cause This error occurs when the SharePoint Products and Technologies Configuration Wizard cannot locate or modify the Web.config file. Resolution To resolve the issue, you must manually copy the Web.config file from the following folder: %COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\Config to the following folder: %COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\Template\Layouts. After the Web.config file is in the Layouts folder, you can run the SharePoint Products and Technologies Configuration Wizard again.


Restore Content Database
Comment added by: Joet  joet@josetamez.com Friday, March 12, 2010  @ 9:52 PM

Well, you need to move your sharepoint web front-end to another machine and you don't know how to migrate your DB over to the new machine. Install MOSS2007 and all of the updates along with SP2. Choose the option to connect to an existing farm. Make sure you choose to host webs on this machine and continue with the configuration. You want to point the machine to the same database that holds the configuration database and finish the installation. Now that you have the machine setup with the MOSS2007 installation the Central Administration will open in the browser and under the applications management tab click "Create or extend a web application" link. This is the important part because here is where you will setup the configuration to point to the same content database and it has to be the exact same name. Fire up MS SQL Management Studio and check the name if your not sure. This will connect you to the same content DB and and when your web application is created, run the IISRESET /NoForce and open the browser type http://localhost. You will now see the site collection landing page you had before. The machine name may be different and you need to update the host header so you have to edit the internal URL for the default zone to the new machine name. Also, don't forget to open IIS and update the host header with X-UA-Compatible/IE=EmulateIE7 header. You might want to make sure that your machine and the right service accounts are listed within your database under the security folder || users folder and if you have to delete old accounts you need to delete the schemas first. But hey, if you have AVEPOINT problem solved......


Text to HTML
Comment added by: Joet  joet@josetamez.com Friday, February 05, 2010  @ 10:24 AM

I recently had a request that required some out-of-the-box thinking and some reseach. I am familliar with using functions in the calculated column but to use functions to create HTML was a different story, until I ran into this site. This was a life saver and it gave me ideas for other solutions as well. When creating a column that's included in a function, keep in mind that you have to trick SharePoint into thinking the column exists. Read this article and you will eventually find out the trick I'm talking about. Good Luck... Link: http://blog.pathtosharepoint.com/2008/09/01/apply-color-coding-to-your-sharepoint-lists/


Profile Pictures
Comment added by: Joet  joet@josetamez.com Wednesday, January 27, 2010  @ 3:44 PM

The Active Directory team does not want to host or maintain any profile pictures and I had to find another solution that would provide the images for MySites and peopleresults page. I found a solution that allows me to set the user profile picture URL property using STSADM. Thanks to MVP Gary Lapointe, he provided us with a custom stsadm command called gl-setpictureurl. His blog post on this is http://stsadm.blogspot.com/2008/09/set-user-profile-picture-url-property.html?showComment=1225480320000 what a life saver, and now I can keep all employee pictures under the human resources sub site they can maintain it. Of course I had to implement a custom content type that allow me to also pull job title, description, and department AD properties. Pretty cool! Thanks Gary!


User Profiles In SharePoint
Comment added by: AD User Profiles  joet@josetamez.com Thursday, January 14, 2010  @ 10:14 AM

As you know user accounts in Active Directory are not deleted but marked inactive. Actually, before you couldn't but now you can but AD admins don't like to because you loose the SID and if that account needs to be brought back admins have to setup from security from scratch, so most admins just disable. When someone leaves the company and they are disabled in AD it should update in your SharePoint but it might not. What I've seen is that most admins have the default query setup in Profile Import(&(objectCategory=Person)(objectClass=User) and this will pull all users both active and inactive. The problem with this is that you can still pull up the user in search and still access their public MySite. There are many scenarios that require a plan that's best suitable for the client. Check out this white paper on that. http://philwicklund.com/whitepapers/Documents/My%20Site%20Concerning%20Scenarios%20Study%20and%20Strategy.pdf The client I am working with not will only disable the user account in AD and they don't want the user to show anywhere in SharePoint. Then you must change the query for LDAP to (&(objectCategory=person)(objectClass=user)( !(userAccountControl:1.2.840.113556.1.4.803:=2))) which only pulls those active accounts and not the inactive ones. The problem is that they still show as "Profiles Missing from Import" and when you run a people search they will still show but when you click the picture the MySite will not work because the user profile has been deleted. The MySite has to be deleted so we need to enable automatic site deletion and run both the incremental on the search profile import.


Server Error
Comment added by: Joet  joet@josetamez.com Wednesday, December 23, 2009  @ 7:56 PM

I was working on the development server and moving content db's around and when I attached this earlier version I tried to hit the home page I got this error: Server error: http://go.microsoft.com/fwlink?LinkID=96177 Ok,OOPS! Turns out the content db is not the same version and needs to be updated. run the following stsadm command and run iisreset /noforce and you're good to go. stsadm –o upgrade –inplace –url Central_Administration_URL –forceupgrade


The Right Architecture
Comment added by: Joet  joet@josetamez.com Wednesday, December 23, 2009  @ 3:24 PM

I've had some questions regarding the proper configuration of the three different environments Production - Quality - Development for the client. What architecture can be used and what is the best optimal setup for code migration from development to production. I have a client that wants there end-users allowed to practice and use the development box for a playground. On top of that they want to migrate anything that they've designed or built, over to production so they don't have to do over again. Great! This is a problem because I have the development environment running 32bit and QA and production running 64 bit. Why are you running 32bit on development? Because Microsoft doesn't have the Windows SharePoint Services 3.0 Tools Extensions for 64bit. If you read the note on the download page it states “This download does not work with an x64 OS. We currently recommend x86 on a development machine for SharePoint development when targeting x64 OS for test and production. Output binaries are all .NET assemblies so you can reasonably expect all .NET assemblies built on the x86 dev box to still work on your x64 OS test and production machines. The CLR will JIT compile the .NET assembly on each target machine and will optimize for x64 OS when run on that architecture. Testing on x64 after doing development on x86 is still recommended.” Do What! A 64bit SharePoint environment cannot load a 32bit binary. Run your Visual Studio in “All CPU” you say. Well, I think I’ll just go back to running 64bit in all environments and play it safe. If you can make time, read Microsoft’s paper on recommendation for migrating 32-bit to a 64-bit environment. Either they don’t bother to explain further and make it clear enough or there’s just confusion or typos that are misleading.


Unprotect Word 2007 Documents
Comment added by: Joet  joet@josetamez.com Tuesday, November 24, 2009  @ 10:27 AM

If you are sent a Word 2003 document and you keep telling people to convert to 2007 and unprotect, and of course they don't, do this! Open word 2003 document and click on the "Review" tab. Click the "Protect Document" button and then click "Restrict Formatting and Editing". Yeah Yeah I know, it don't make sense but just click "Stop Protecting" down at the bottom and your're good to go!


Security Model
Comment added by: joet  joet@josetamez.com Thursday, November 19, 2009  @ 3:55 PM

Take advantage of the SharePoint out-of-the-box security groups and manage security with help of Active Directory. For example if you have ten different department sub sites you should create an AD group for each of the SharePoint groups created for that sub site. Also, you should create an AD read-only group (SharePoint_Users) that is assigned to the site collection visitors group and you can also use that AD group for custom permissions for any of the department site. Typically, each sub site will break inheritance and thereby have its own custom permissions. You can for example, take the the SharePoint_Users AD group and assign the group to any one of the SharePoint groups or assign custom permissions if preferred. I've seen administrators modify permissions at the site collection and farm level. This is not necessary and will create a management nightmare.


Latest Update SP2
Comment added by: Joet  joet@josetamez.com Monday, September 14, 2009  @ 8:31 PM

I have updated the development environment with all the hot fixes and latest service pack two. I'm happy to report that it's fixed the content editor web part problem with versioning and has added some really cool features for the admin. If you haven't done it yet I would highly suggest that you do and reap the benefits.


Publishing Start and End Dates
Comment added by: Joet  joet@josetamez.com Wednesday, August 26, 2009  @ 9:32 AM

Funny, these custom site columns don't work. Moreover, even though these site columns are bound to the Page Layout content type they don't show up in the Page Library. After some research I find out that they don't work unless you have versioning (both minor and major), and workflow approvals enabled. Actually, that makes sense but still a problem with the content editor web part if your still only at SP1. I have updated the development environment to the latest hot fixes and SP2 and now everything works great. The custom news page layout looks great and it's more intuitive and easier to use.


Browser Compatibility Mode
Comment added by: Joet  joet@josetamez.com Friday, July 10, 2009  @ 1:30 PM

When upgrading to IE8. I have had many complaints about the compatability mode icon and it's message notifying users that it's changed into the compatability mode. No! It's not broke and because the default setting for IE8 is compliant mode it automatically sets it to compatibility mode and then shows the balloon tip. End users complain thinking it's broke and then change it and then it does break. Unbelievable! Add a meta-tag at the web level in ISS and it's fixed. Add X-UA-Compatible / IE=EmulateIE7 in the HTTP Header tab. Web Developers: Don't forget to include the Doctype in all pages or masterpage when developing a public site.


Site Collection Stats
Comment added by: joet  joet@josetamez.com Saturday, May 09, 2009  @ 3:56 PM

Do you want to get user specific stats that include day, month and year? Then go here to this URL: http://yourdomain/_layouts/usageDetails.aspx


SharePoint Wannabe
Comment added by: Joet  joet@josetamez.com Saturday, April 18, 2009  @ 5:41 PM

I've met some really ignorant IT folks but this one takes the cake. I interviewed for a SharePoint developer job that had nothing to do with SharePoint but was mostly C# web applications working behind SharePoint. Unbelievable! The guy who interviewed me had a list of questions but none were asked off the top of his head about C# much less SharePoint. What may be worse is that this group was consulting the Army (government) and apparently had the customer fooled. That's scary! I had a few questions of my own and the guy didn't know what CAS had to do with SharePoint and he also stated the GAC was the most secure. Goes to show that their are still people out their that think you just need a C# developer to work with SharePoint. Ignorance is bliss....


STS Admin Shortcut
Comment added by: joet  joet@josetamez.com Friday, April 10, 2009  @ 4:42 PM

Target: %SystemRoot%\system32\cmd.exe Start in: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN" Add icon using same path from "Start in" and you're good to go!


PDF ICON
Comment added by: Joet  joet@josetamez.com Tuesday, December 16, 2008  @ 5:50 PM

copy pdf icon over to 12 hive - template - images folder. Add entry into DOCICON.XML file located 12 hive - template - Xml folder. Entry is the following: Mapping Key="pdf" Value="pdf16.gif. Don't forget the brackets. Run a IISRESET NOFORCE and you're good to go.


Application Pools
Comment added by: Joet  joet@josetamez.com Tuesday, December 16, 2008  @ 10:16 AM

Don't delete the default app pool. Leave it alone, don't even rename it. Set it to Shutdown after idle for more than 10 minutes. Turn pinging off. Only newbie web admins use the default app pool. Create your own for your SharePoint applications. Usually done when creating your web applications for your SharePoint Farm.


Installing and deploying Feature Package
Comment added by: joet  joet@josetamez.com Friday, October 10, 2008  @ 4:49 PM

Copy .wsp file to the 12 hives bin folder. stsadm -o addsolution -filename "solution name including file extension" stsadm -o deploysolution -local -name "name of .wsp file including file extension" -allowGacDeployment (if trusted) -url http://server (scope) Now go to Site Settings and under "Site Collection Administration" click on "Site collection features" and activate the feature. Done!


Custom Master Page & Layouts
Comment added by: joet  webmasterjoe@josetamez.com Thursday, August 28, 2008  @ 1:14 PM

People, how many times must I say or point this out. Make a copy of the masterpage.master or Welcomelayout, ArticleLeft or right before making any changes. On any of the publishing page layouts you can start by creating your custom site columns and content type. Then make a copy of the page layout like the ArticleLeft.aspx, and call it whatever you like. Then customize it with either the custom content type properties you created, or the ones out-of-the-box. What I did was first create a custom content type based on the page layout Article, then created a new page based on that content type and then added a table with the following fields. Title, Article Date, Page Image, and Page Content fields. Then below that I added the editor control and then dropped the Rollup Image, Description, and Start and End fields. The editor control must be used or you will have problems with those fields showing up on the article page. Only the Rollup and Description fields should show in the Query Webpart that rolls up on the home page as latest news. I then exported the CQWP and then modified the properties (changed Publishing Page with comments), and then imported the CQWP back into the Zone. I then modified the Items Styles sheet to render the "read more" link that takes you to the article itself. SharePoint,the only place I still use tables for positioning. Go Figure...


Search Scopes
Comment added by: Joet  webmasterjoe@josetamez.com Monday, July 28, 2008  @ 10:41 PM

Create your custom scopes through the SSP and then as a site collection admin you can bring them up front and have them show on the scopes drop down menu. Don't forget to create the custom results page for each particular search scope. When you do that you can customize the page with included property, and format the xslt file to render the page as you wish.


Auto-Numbering InfoPath Forms
Comment added by: joet  joet@josetamez.com Tuesday, March 18, 2008  @ 4:45 PM

To auto increment forms submitted to a forms library follow these steps.(Assuming you've created a forms library). Add a Text Box control to the form template and name it autonumber. On the Tools menu, click Data Connections. On the Data Connections dialog box, click Add, and create a Receive data connection to the SharePoint library that you created. In step 5 of the data connection wizard, uncheck all fields and then check the ID field. In the last step of the data connection wizard, uncheck Automatically retrieve data when form is opened, name the data connection RetrieveIDs, and click Finish. On the Data Connections dialog box, click Add, and create a Submit data connection to the SharePoint library that you created in step one. In step 3 of the data connection wizard, click the formula button behind the File name field. On the Insert Formula dialog box, type max( and then click Insert Field or Group. On the Select a Field or Group dialog box, select RetrieveIDs from the Data source drop-down list box, expand all the nodes, click ID, and then click OK. On the Insert Formula dialog box, type ) + 1 and click OK. On the Data Connection Wizard dialog box, the expression in the File name field should resemble: max(@ID) + 1 On the Data Connection Wizard dialog box, click Next, name the data connection Main submit, and then click Finish. On the Data Connections dialog box, click Close. On the Tools menu, click Submit Options. On the Submit Options dialog box, check the Allow users to submit this form checkbox, select the Perform custom actions using rules option, click Advanced, select Close the form from the After submit drop-down list box, and then click Rules. On the Rules dialog box, click Add. On the Rule dialog box, add an Action that says: Query using data connection: RetrieveIDs On the Rule dialog box, add a second Action that says: Set a field's value: autonumber = max(@ID) + 1 Note: @ID is selected from the RetrieveIDs secondary data source in the same way you selected it in step 8. On the Rule dialog box, add a third Action that says: Submit using data connection: Main submit Click OK when closing all dialog boxes that are currently open. Publish the form template to the library you created in step 1. Your Done! Only one problem! When you submit the first form you will get the "NAN" for the first record. What I do is just create a test form and then delete it after submitting another form after that one. Don't delete until you have at least one form after the first one.


First Blog Post
Comment added by: Joet  webmasterjoe@josetamez.com Wednesday, February 27, 2008  @ 11:13 PM

Everything SharePoint! That's the theme and focus. I will post all of my SharePoint experiences here and share them with all of you. I've seen some crazy things and I have met some really outrageous characters. I'll be talking about them but most importantly, I will talk about many of the different things I've learned throughout my SharePoint career. If this helps at least one SharePoint person out there then it's been worth it.

Creative Commons License

Copyright © 2003 - 2010 Jose M. Tamez