February 2012
M T W T F S S
« Jan    
 12345
6789101112
13141516171819
20212223242526
272829  

Archive for the 'Chris' Category



07
May

Access denied on search crawl for SharePoint 2007

I have no idea why, but more and more I am seeing search crawls result in error of “access is denied”. The issue is that the web server is not allowing authentication to sites that are localhost (or local). The fix is simple, but I wish I knew why this was creeping up more.

Fix is here

In short do the follow. The reboot is necessary.

Method 2: Disable the loopback check

Follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Quit Registry Editor, and then restart your computer.
30
Apr

Register .NET user for an App Pool

Sometime in a non AD environment you need a user to run an App Pool so you can do cross server work (i.e. SQL). Before you can use the user in the App Pool identity you have to tell ASP.NET that they should be allow to run ASP.NET.

Simple command to run from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 directory

aspnet_regiis.exe –ga [UserName]

 

This will tell ASP.NET to allow this user to access temp directories and the assembly code.

23
Dec

Great tool for testing VT technology of your server

Just run the tool from here to see if your server or PC can support virtual technology and allow your virtual servers directly access your hardware.

11
Nov

Make all Publishing Images document libraries anonymous reading ready.

 I wrote this when I needed to make all of my images folders purely anonymous reading. I dont want to ever run into an issue of an image that is not checked in. Create a console app and replace the main with the code below. It will crawl the whole site and make all images (publishing images) fully anonymous for reading.

 
 static void Main(string[] args)
        {
            bool requireApproval = false;
            // open the site
            SPSite site = new SPSite(http://YOUR_SITE);
            // open the web
            SPWeb web = site.OpenWeb();
            ProcessWeb(web, requireApproval);
            return;
            // open the web collection
            SPWebCollection webcoll = web.Webs;
            // parse through the webs
            foreach (SPWeb webx in webcoll)
            {
                ProcessWeb(webx, requireApproval);
            }
            Console.Read();
        }
        public static void ProcessWeb(SPWeb webx, bool requireApproval)
        {
            Console.Write("Processing " + webx.Url + "\n");
            // get the list
            SPListCollection lists = webx.Lists;
            // looks for our Pages list
            foreach (SPList siteList in lists)
            {
                if (siteList.Title == "Images")
                {
                    //PublishingWeb pweb = PublishingWeb.GetPublishingWeb(webx);
                    //PublishingPageCollection ppages = pweb.GetPublishingPages();
                    bool fixSite = false;
                    siteList.EnableModeration = false;
                    siteList.ForceCheckout = false;
                    siteList.AllowEveryoneViewItems = false;
                    siteList.DraftVersionVisibility = DraftVisibilityType.Reader;
                    siteList.Update();
                    fixSite = true;
                    if (siteList.WorkflowAssociations.Count > 1)
                    {
                        SPWorkflowAssociationCollection wfCol = siteList.WorkflowAssociations;
                        SPWorkflowAssociation wf = wfCol.GetAssociationByName("Parallel Approval", System.Globalization.CultureInfo.CurrentCulture);
                        wf.Enabled = false;
                        siteList.UpdateWorkflowAssociation(wf);
                    }
                }
            }
            if (webx.Webs.Count > 0)
            {
                foreach (SPWeb webNext in webx.Webs)
                {
                    ProcessWeb(webNext, requireApproval);
                }
            }
        }
11
Nov

Creating a custom 404 page in MOSS. Thanks for making it easy MS. Grrr

Great article here wtih all the details. Only thing I would say is dont make a Virtual Directory if you are running the Ajax extentions with RAD controls. It will blow up for DLL’s missing.

10
Nov

Great little diddy for turning on IIS compression with out editing meta file

Got it from here. 

============================
CD C:\Inetpub\AdminScripts\ [Enter]

cscript.exe adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions “htm” “html” “txt” “ppt” “xls” “xml” “pdf” “xslt” “doc” “xsl” “htc” “js” “css” [Enter]

cscript.exe adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions “htm” “html” “txt” “ppt” “xls” “xml” “pdf” “xslt” “doc” “xsl” “htc” “js” “css” [Enter]

cscript.exe adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions “asp” “dll” “exe” “aspx” “asmx” “ashx” [Enter]

cscript.exe adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions “asp” “dll” “exe” “aspx” “asmx” [Enter]

IISreset.exe /restart [Enter]

Then right click on WebSites > Properties > Enable compression on static files and applications.

12
Aug

Sliced bread has nothing on Pandora

So I got my 3G iPhone the other day, and yes it is worth the money. I like to settle my sports bets on who did what when on what team in less than 2 minutes that I had to wait for on my 2G phone. 3G keeps my ADD in full form, get after it.

Ok back to bread newest nemesis. When I got the phone I figured I could take advantage of some of the internet radio station while on the road. The app I had heard about the most was Pandora. So I downloaded it and started playing around. WOW I am blown away by how good it is. Not only the amount of music, but by how accurate it is on your selections. The way it works is you vote on songs you hear. From that voting it fine tunes exactly what you like to hear on that channel. The music is categorized by 400 different categories and from you votes it figures out what you do and dont like. After and hour of voting I started to realize that every song I was hearing I liked. Amazing. Even artists that I had never heard of that played a song that fit my category, blamo I got it.

And all that for free. Pandora pays the music industry for the music you listen to and currently they have enough funding to pay all the bills. My guess is that this project is partially funded by the industry itself to break down music in a way that they can learn to premote better. But who cares, its perfect.

 #1. Get an iPhone 3G.
#2. Get pandora.

Done.

18
Jul

Checking moderation status of a page in Share Point

I ran into a problem recently where some pages on a site were rejected without my knowing it. I needed a quick fix to go and locate all those pages. Here is my answer:

As you crawl through a site by list or by PublishingSite, send the SPListItem into this. It will tell you if it is denied.

private static bool moderationPendingFix(SPListItem curItem)
{
 if (curItem.ParentList.EnableModeration == true)
 {
  SPModerationInformation moderationInformation = curItem.ModerationInformation;

  if (moderationInformation.Status != SPModerationStatusType.Denied)
   return true;
  else

   return false;
 }

 else

  return true;
}

29
May

Microsoft Certifications

First of all I would like to welcome me back. I really only blog when I am learning anything new. I had a good run where I was learning new stuff every week, but then work became my main squeeze again and we spent six months in a hard core relationship AKA projects.

 Soooooo, we are at that point in the year where me and my work talk about certifications and my need to complete them. So now I needed to spend some time putting my lists together of tests that I have taken and need to take to get my certifications. So here goes with some links.

MCP (Microsoft Certified Professional)
You only have to take one test to get your MCP. The prereqs are here. You can take any of the tests here to get your MCP. I took 70-315.

MCAD (Microsoft Certified Application Developer)
MCAD is a little tougher. It required three tests to be taken. The list of required tests can be found here. There tests basically have a VB and a C# counter parts. I took 70-315, 70-316 and 70-320.

MCSD (Microsoft Certified Solution Developer)
MCSD takes all the tests from MCAD and adds one more Core and one Elective exam. The requirements are here. I already have me MCAD, so I am going to take 70-300 and (70-229 - SQL 2000) or (70-340 - C# security) or (70-431 - SQL 2005).

This last one is really just for me, but hey I’ll list it.
MCTS (Microsoft Office SharePoint Server 2007 - Configuration)
The details can be found here. It only requires one test, 70-630.

Hope this list helps someone somewhere and sometime. :)

UPDATE:
For .NET 2.0 the certification is MCPD (Microsoft Certified Professional Developer). If you have your MCAD you can upgrade to MCTS (Microsoft Certified Technical Specialist) by taking one test 70-551. After that you take 70-547 to get MCPD.

If you dont have MCAD you need to take 70-536 and 70-528.

01
Feb

Embedding EF models in assembly

I have been dealing with a problem for while in Entity Framework. When I compile the EF models the ssdl, msl, csdl files are put in the solution. Then I put my connection strings to those files in my web.confg. The issue I have is that we do a lot of work on MS Terminal Server. Since we have a lot of other people on there, I force the users to save the models to a separate and unique folder. They then reference the models in their web.config. Once in a while the user will accidentally check in that web.config into TFS. That causes chaos because now I am using their models in my running environment. Any change they make breaks my project. Any change I make I don’t see. Then I have to go in and change my web.config to reference my models locations. Simple but a pain.

Well thanks to Jonathan Carter  I have now solved that problem. With a small change to the model properties the schema files get embedded into the assembly. Then you change reference in your web.config to the compiled versions. Tada no more head aches.

You can read all about it in  Julie Lerman’s post.