in

Corey Roth and Friends Blogs

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

Kyle Kelin on .Net

February 2008 - Posts

  • Finding Where A Content Type is Being Used

    Have you ever tried to delete a content type that is in use? SharePoint gives you a nice error that doesn't help you find where it is being used at all. There are two ways you can find out where it is being used:

     1. Add the Content Query WebPart on a page and pull back all uses of it. Not sure if this will though if it is only tied to a library and there isn't a document using it.

    2. Use a SQL statement

    DECLARE @ContentTypeName nvarchar(128)
    SET @ContentTypeName='Document'
    SELECT w.Title AS [Web Site], w.FullUrl AS [Web Url], al.tp_Title AS [List Title], ct2.* FROM ContentTypes ct1 JOIN ContentTypes ct2 ON LEFT(ct2.ContentTypeId, Len(ct1.ContentTypeId))=ct1.ContentTypeId LEFT OUTER JOIN dbo.ContentTypeUsage ctu ON LEFT(ctu.ContentTypeId, Len(ct2.ContentTypeId)) = ct2.ContentTypeId LEFT OUTER JOIN dbo.AllLists al ON ctu.ListId = al.tp_Id AND ctu.WebId=al.tp_WebId LEFT OUTER JOIN dbo.Webs w ON al.tp_WebId = w.Id WHERE ct1.ResourceDir=@ContentTypeName

  • Displaying Public Contacts from Exchange in the Page Viewer WebPart

    I need to do this tomorrow and needed somewhere to store the link. :)

     

    http://weblogs.asp.net/wkriebel/archive/2004/10/28/249195.aspx

  • Importing a Calendar into SharePoint

    I am posting this because there has to be a better way to do this then what I just did. To set the background, the client is running Exchange 2003 and MOSS and wants to sync the public calendars between the to. I did some research and it couldn't be done so the next best thing was to move away from the Exchange calendars and use SharePoint calendars inside Outlook. Well viewing a SharePoint calendar inside Outlook is pretty easy but I had some trouble moving the data from the original Exchange calendar to the new empty SharePoint calendar. So my work around was to export the Exchange calendar as a ics and upload it into Google Calendar. I had already being using a tool called SyncMyCal for my personal calendars so I used that to sync the data that was now in Google Calendar to the SharePoint Calendar I had in Outlook. It worked and requried a shower immediately after. Surely there is a better/easier way. I fully expect someone to post the right way to do this using SharePoint.

  • My Favorite Episode of DotNetRocks... Ever

    For those of you who don't listen to dnr on a regular basis you have to check out this episode. I almost didn't listen because I was like who the hell is Les Pinser. Well he is the guy who sold Gates Word. It was great listening to him tell stories about making Bill Gates a grill cheese, playing guitar with Jerry Lee Lewis, and scoring at FoxPro conferences.

    Here it is.

  • Do You Know You Can Customize the Help Pages in SharePoint?

    Well if you did good for you because I didn't. I was writing some help documentation today and thought wouldn't this be better if it was inside SharePoint instead of Word document that everyone is going to ignore. So I started googling and find out that when you click help inside SharePoint it just brings up a window of html pages. And those html pages are customizable.

     Open up the Central Admin site in SharePoint Designer and you will see a Document Library called HelpFold. Guess what? Yep, all those HTML pages are stored in there. Pull one up and you can rewrite the help pages to your heart's content.

  • Two Features Your SharePoint Users Should Know About

    I was in a client meeting yesterday and they had some concerns with the amount of time it would take their users to upload and tag all their documents. They were wanting me to write a script to transverse through the directory structure and tag the files. The problem was the heirarchy didn't match the tags. After 10 minutes of this I remembered two features in SharePoint that might alievate their concerns. The DataSheet View and Open in Explorer Option.

     DataSheet View

    Under the Actions menu in a document library selecting this option will bring up the document library in a grid with similiar functionality to Excel. This allows the users to drag values as well as copy/paste making editing all of those site columns pretty fast.

     Open in Explorer

    This option is also found under Actions and will open the document library in Windows Explorer allowing users to drag files into the library. Even better they can drag the entire heirarchy and the subdirectories will show up in the library as well.

     

  • Never Copy Files Into the TEMPLATE Folder Using Explorer

    I spent the entire morning tying to debug an issue of why my SharePoint site kept prompting my user for their credentials even after they had entered it. What made the issue confusing was this didn't happen for domain admins. To test that theory I added my account to the domain admin group in AD and it worked. Of course I can't leave it like that. A colleague of said that it was prompting me because the account was trying to access resources it didn't have permissions to. Permissions on the physical disk of the server not in the database. So I broke out Fiddler and sure enough the account was getting 401 errors when accessing core.css. So I go look at the permissions of that file and I see that domain admins have rights but that is it. There is the problem. So I gave the Authenticated Users group read access to the file and the problem was fixed. Now why did this happen. Well the title of this post should give you a hint. A few weeks ago I copied core.css from another server to be sure they were identical. They turned out to be exact but it seems using Windows Explorer to copy files to those directories resets or deletes permissions (still not exactly sure what happens here, feel free to comment). Anyway the morale of the story is when copying files use the command line instead of Windows Explorer. 

2019.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems