To customize the logos used on the home pages of SharePoint Web sites, do the following:

  1. Open the Local_Drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\IMAGES directory.
  2. Copy the images that you want to appear on the home pages of your Web sites to this directory.
  3. Remove the image files HOME.GIF and HOMEPAGE.GIF, which contain the logos used on the left and right sides of the home page, respectively.
  4. Rename the new image files HOME.GIF and HOMEPAGE.GIF.

All sites now display new logos on their home pages.

Warning  The image files that you add may be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next product version.

You can add new themes or customize existing ones for application to Web sites in Microsoft Windows SharePoint Services 2.0. This programming task shows how to customize an existing theme.

  1. Copy one of the theme folders in Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\THEMES and give the folder a unique name. In this example, the name is MyTheme. This folder contains cascading style sheets (CSS) files, image files, and other files that define the styles, formatting, and color for the various user interface (UI) elements that are used in the theme.
  2. Find the .inf file in the copied folder, and rename it with the name given to the folder.
  3. Open the .inf file and assign the same name to the title in the [info] section of the file.
  4. Customize the styles defined in the .css files of the copied folder as needed. See CSS Class Definitions in Windows SharePoint Services for information about the classes used in Windows SharePoint Services, including sample code that can be added to ASPX pages to learn which classes apply to which UI elements. The following example from THEME.CSS changes the color that is used for sections of the navigation area.
    .ms-navframe{
    background:#009999;
    }
    .ms-navline{
    border-bottom:1px solid #8D4D03;
    }
    .ms-nav .ms-navwatermark{
    color:#008999;
    }
  5. Modify the image files in the copied folder by using the business graphics software of your choice.
  6. Add thumbnail and preview image files for your custom theme to the Local_Drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\IMAGES directory. In this example, the files are called myThumbnail.png and myPreview.gif.
  7. Add a theme template definition to SPTHEMES.XML, which is the file that determines which themes are available as options on the Apply Theme to Web site page. This XML file is located in the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\LAYOUTS\1033 directory. The following example specifies a template for the custom theme.
    <Templates>
       <TemplateID>mytheme</TemplateID>
       <DisplayName>My Theme</DisplayName>
       <Description>Description</Description>
       <Thumbnail>../images/myThumbnail.png</Thumbnail>
       <Preview>../images/myPreview.gif</Preview>
    </Templates>

Your custom theme now appears in the list of options on the Apply Theme to Web site page and can be applied to SharePoint sites.

Warning  Changes that you make to SPTHEMES.XML may be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next product version.

Classes and Object used…

·         SPWebApplicationBuilder: Creates an SPWebApplication object, providing default settings for all the required values and allowing the caller to change only those properties that need values different from the default

·         SPFarm: Represents a Windows SharePoint Services farm. To access the current server farm object, you can use members on SPFarm.Local.

·         SPWebApplication: Represents an Internet Information Services (IIS) load-balanced Web application that is installed on the server farm.

·         SPSiteCollection : Represents a collection of SPSite objects, or site collections.

·         SPSite : Represents a collection of sites on a virtual server, including a top-level site and all its subsites. Each SPSite object, or site collection, is represented within an SPSiteCollection object that consists of the collection of all site collections.

·         System.Security.SecureString: Represents text that should be kept confidential. The text is encrypted for privacy when being used, and deleted from computer memory when no longer needed. A SecureString object is similar to a String object in that it has a text value. However, the value of a SecureString object is automatically encrypted, can be modified until your application marks it as read-only, and can be deleted from computer memory by either your application or the .NET Framework garbage collector.

 

Let’s start…

 

Creating web Application at Port no 2007 ( Assuming user spuser with password Password is present in system administrator group)

SPWebApplicationBuilder webAppBuilder = new SPWebApplicationBuilder(SPFarm.Local);

SPWebApplication newApplication;
int myPort = 2007;

webAppBuilder.Port = myPort;

webAppBuilder.ApplicationPoolId = “site-appol”; // application pool

webAppBuilder.ApplicationPoolUsername = webAppBuilder.DefaultZoneUri.Host + \\spuser;

System.Security.SecureString password = new System.Security.SecureString();               

string strName = “Password”;               

char[] pass = strName.ToCharArray();               

foreach (char c in pass)               

    password.AppendChar(c);              

webAppBuilder.ApplicationPoolPassword = password;

webAppBuilder.CreateNewDatabase = true; // Create new database           

webAppBuilder.DatabaseName = “wss_site2007_content”;    // database name           

webAppBuilder.DatabaseServer = webAppBuilder.DefaultZoneUri.Host;  //Host name/computer name          

webAppBuilder.UseNTLMExclusively = true;  // Use NTLM authentication

newApplication = webAppBuilder.Create(); // Create new web application
newApplication.Provision();           //Provision it into web farm    

 

Creating site Collection at root level with Blank site template

SPSite mySiteCollection = newApplication.Sites.Add(“/”,                       //Root

“Cgosite”,              // site title

 ”Conchango.com”,             //description

1033,                         //language

“STS#1″,                //Blank site template  

webAppBuilder.ApplicationPoolUsername, // Site owner

“Name”,                 // Name

“name@name.com”); //Email

 

Creating web

mySiteCollection.AllWebs.Add(“/webname”);

 

Activating publishing feature at site collection
mySiteCollection.Features.Add(SPFarm.Local.FeatureDefinitions["PublishingSite"].Id);

SPFarm.Local.FeatureDefinitions["PublishingSite"].Provision()

 

Close Site Collection
mySiteCollection.Close();

Here is a piece of code that I know you will find useful one day. Basically, you supply it with an existing site definition, say “STS#1″, and this will then create a site for you, based on the supplied site definition, at the URL you asked for.

Here goes -

public static bool CreateSite(
    string parentSiteURL, string siteURLRequested,
    string siteTitle, string siteTemplateName)
{
    bool returnCondition = false; // Assume failure.

    const Int32 LOCALE_ID_ENGLISH = 1033;

    using (SPSite siteCollection = new SPSite(parentSiteURL))
    {
        SPWeb parentWeb = siteCollection.OpenWeb();
        SPWebTemplateCollection Templates =
            siteCollection.GetWebTemplates(Convert.ToUInt32(LOCALE_ID_ENGLISH));
        SPWebTemplate siteTemplate = Templates[siteTemplateName];
        if (parentWeb.Webs[siteURLRequested].Exists)
        {
            parentWeb.Webs.Delete(siteURLRequested);
        }

        parentWeb.Webs.Add(
            siteURLRequested,
            siteTitle,
            "",
            Convert.ToUInt32(LOCALE_ID_ENGLISH),
            siteTemplate,
            false, false);

        // All is good?
        returnCondition = true;
    }

    return returnCondition;
}

The following table lists the locales/languages with an assigned LCID. The purpose of the document is to help developers who are defining NLS services (sorting, time/date formatting, and keyboards/IMEs) for locales that do not yet have native support in Windows to avoid conflict.

Note:The appearance of a language/locale on this list does not indicate Microsoft will offer support for it in the future.

For a list of LCIDs and keyboard combinations for locales that are already supported in Windows XP/Server 2003, see Windows XP/Server 2003 – List of Locale IDs, Input Locale, and Language Collection.

—-

Language – Country/Region LCID Hex LCID Dec

Afrikaans – South Africa

0436

1078

Albanian – Albania

041c

1052

Amharic – Ethiopia

045e

1118

Arabic – Saudi Arabia

0401

1025

Arabic – Algeria

1401

5121

Arabic – Bahrain

3c01

15361

Arabic – Egypt

0c01

3073

Arabic – Iraq

0801

2049

Arabic – Jordan

2c01

11265

Arabic – Kuwait

3401

13313

Arabic – Lebanon

3001

12289

Arabic – Libya

1001

4097

Arabic – Morocco

1801

6145

Arabic – Oman

2001

8193

Arabic – Qatar

4001

16385

Arabic – Syria

2801

10241

Arabic – Tunisia

1c01

7169

Arabic – U.A.E.

3801

14337

Arabic – Yemen

2401

9217

Armenian – Armenia

042b

1067

Assamese

044d

1101

Azeri (Cyrillic)

082c

2092

Azeri (Latin)

042c

1068

Basque

042d

1069

Belarusian

0423

1059

Bengali (India)

0445

1093

Bengali (Bangladesh)

0845

2117

Bosnian (Bosnia/Herzegovina)

141A

5146

Bulgarian

0402

1026

Burmese

0455

1109

Catalan

0403

1027

Cherokee – United States

045c

1116

Chinese – People’s Republic of China

0804

2052

Chinese – Singapore

1004

4100

Chinese – Taiwan

0404

1028

Chinese – Hong Kong SAR

0c04

3076

Chinese – Macao SAR

1404

5124

Croatian

041a

1050

Croatian (Bosnia/Herzegovina)

101a

4122

Czech

0405

1029

Danish

0406

1030

Divehi

0465

1125

Dutch – Netherlands

0413

1043

Dutch – Belgium

0813

2067

Edo

0466

1126

English – United States

0409

1033

English – United Kingdom

0809

2057

English – Australia

0c09

3081

English – Belize

2809

10249

English – Canada

1009

4105

English – Caribbean

2409

9225

English – Hong Kong SAR

3c09

15369

English – India

4009

16393

English – Indonesia

3809

14345

English – Ireland

1809

6153

English – Jamaica

2009

8201

English – Malaysia

4409

17417

English – New Zealand

1409

5129

English – Philippines

3409

13321

English – Singapore

4809

18441

English – South Africa

1c09

7177

English – Trinidad

2c09

11273

English – Zimbabwe

3009

12297

Estonian

0425

1061

Faroese

0438

1080

Farsi

0429

1065

Filipino

0464

1124

Finnish

040b

1035

French – France

040c

1036

French – Belgium

080c

2060

French – Cameroon

2c0c

11276

French – Canada

0c0c

3084

French – Democratic Rep. of Congo

240c

9228

French – Cote d’Ivoire

300c

12300

French – Haiti

3c0c

15372

French – Luxembourg

140c

5132

French – Mali

340c

13324

French – Monaco

180c

6156

French – Morocco

380c

14348

French – North Africa

e40c

58380

French – Reunion

200c

8204

French – Senegal

280c

10252

French – Switzerland

100c

4108

French – West Indies

1c0c

7180

Frisian – Netherlands

0462

1122

Fulfulde – Nigeria

0467

1127

FYRO Macedonian

042f

1071

Gaelic (Ireland)

083c

2108

Gaelic (Scotland)

043c

1084

Galician

0456

1110

Georgian

0437

1079

German – Germany

0407

1031

German – Austria

0c07

3079

German – Liechtenstein

1407

5127

German – Luxembourg

1007

4103

German – Switzerland

0807

2055

Greek

0408

1032

Guarani – Paraguay

0474

1140

Gujarati

0447

1095

Hausa – Nigeria

0468

1128

Hawaiian – United States

0475

1141

Hebrew

040d

1037

Hindi

0439

1081

Hungarian

040e

1038

Ibibio – Nigeria

0469

1129

Icelandic

040f

1039

Igbo – Nigeria

0470

1136

Indonesian

0421

1057

Inuktitut

045d

1117

Italian – Italy

0410

1040

Italian – Switzerland

0810

2064

Japanese

0411

1041

Kannada

044b

1099

Kanuri – Nigeria

0471

1137

Kashmiri

0860

2144

Kashmiri (Arabic)

0460

1120

Kazakh

043f

1087

Khmer

0453

1107

Konkani

0457

1111

Korean

0412

1042

Kyrgyz (Cyrillic)

0440

1088

Lao

0454

1108

Latin

0476

1142

Latvian

0426

1062

Lithuanian

0427

1063

Malay – Malaysia

043e

1086

Malay – Brunei Darussalam

083e

2110

Malayalam

044c

1100

Maltese

043a

1082

Manipuri

0458

1112

Maori – New Zealand

0481

1153

Marathi

044e

1102

Mongolian (Cyrillic)

0450

1104

Mongolian (Mongolian)

0850

2128

Nepali

0461

1121

Nepali – India

0861

2145

Norwegian (Bokmål)

0414

1044

Norwegian (Nynorsk)

0814

2068

Oriya

0448

1096

Oromo

0472

1138

Papiamentu

0479

1145

Pashto

0463

1123

Polish

0415

1045

Portuguese – Brazil

0416

1046

Portuguese – Portugal

0816

2070

Punjabi

0446

1094

Punjabi (Pakistan)

0846

2118

Quecha – Bolivia

046B

1131

Quecha – Ecuador

086B

2155

Quecha – Peru

0C6B

3179

Rhaeto-Romanic

0417

1047

Romanian

0418

1048

Romanian – Moldava

0818

2072

Russian

0419

1049

Russian – Moldava

0819

2073

Sami (Lappish)

043b

1083

Sanskrit

044f

1103

Sepedi

046c

1132

Serbian (Cyrillic)

0c1a

3098

Serbian (Latin)

081a

2074

Sindhi – India

0459

1113

Sindhi – Pakistan

0859

2137

Sinhalese – Sri Lanka

045b

1115

Slovak

041b

1051

Slovenian

0424

1060

Somali

0477

1143

Sorbian

042e

1070

Spanish – Spain (Modern Sort)

0c0a

3082

Spanish – Spain (Traditional Sort)

040a

1034

Spanish – Argentina

2c0a

11274

Spanish – Bolivia

400a

16394

Spanish – Chile

340a

13322

Spanish – Colombia

240a

9226

Spanish – Costa Rica

140a

5130

Spanish – Dominican Republic

1c0a

7178

Spanish – Ecuador

300a

12298

Spanish – El Salvador

440a

17418

Spanish – Guatemala

100a

4106

Spanish – Honduras

480a

18442

Spanish – Latin America

e40a

58378

Spanish – Mexico

080a

2058

Spanish – Nicaragua

4c0a

19466

Spanish – Panama

180a

6154

Spanish – Paraguay

3c0a

15370

Spanish – Peru

280a

10250

Spanish – Puerto Rico

500a

20490

Spanish – United States

540a

21514

Spanish – Uruguay

380a

14346

Spanish – Venezuela

200a

8202

Sutu

0430

1072

Swahili

0441

1089

Swedish

041d

1053

Swedish – Finland

081d

2077

Syriac

045a

1114

Tajik

0428

1064

Tamazight (Arabic)

045f

1119

Tamazight (Latin)

085f

2143

Tamil

0449

1097

Tatar

0444

1092

Telugu

044a

1098

Thai

041e

1054

Tibetan – Bhutan

0851

2129

Tibetan – People’s Republic of China

0451

1105

Tigrigna – Eritrea

0873

2163

Tigrigna – Ethiopia

0473

1139

Tsonga

0431

1073

Tswana

0432

1074

Turkish

041f

1055

Turkmen

0442

1090

Uighur – China

0480

1152

Ukrainian

0422

1058

Urdu

0420

1056

Urdu – India

0820

2080

Uzbek (Cyrillic)

0843

2115

Uzbek (Latin)

0443

1091

Venda

0433

1075

Vietnamese

042a

1066

Welsh

0452

1106

Xhosa

0434

1076

Yi

0478

1144

Yiddish

043d

1085

Yoruba

046a

1130

Zulu

0435

1077

HID (Human Interface Device)

04ff

1279

A Theme is collection of styles that can be applied to a page, this provides consistent look across pages. SharePoint provides few out of the box themes. You can customize themes or create new theme. Following article has details on how to create new theme:

A SharePoint site theme can be changed prograamatically using SPWeb object. Following code changes the site theme to “Citrus”. The list of availabel theme names can be read from “SPTHEMES.XML” file, which is located in “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033″.

//Open site collection object
using (SPSite oSPSite = new SPSite(“http://servaername”))
{

// Open site
using (SPWeb oSPWeb = oSPSite.OpenWeb())
{
oSPWeb.ApplyTheme(“Plastic”);
oSPWeb.Update();
}
}

So recently I have been working on two small MOSS features:

  • Change the master page and stylesheet settings for a site
  • Staple the first feature to all site templates, so it is activated upon site creation

I was able to create both features and deploy them with little difficulty. See the following resources for tips on solutions, features, and stapling:

The problem that I ran into was this little radio button:

Brief rundown of SharePoint Object Model:

  • SPSite is a Site Collection
  • SPWeb is a Site within a Site Collection

Within the SharePoint Object Model, there are a couple of properties of the SPWeb object which we will be using:

  • [web_object].MasterUrl
  • [web_object].CustomMasterUrl
  • [web_object].AlternateCssUrl

These values are read/write, so you can set the values to your own strings and the values in the database will be changed accordingly.

Note: all of the following is done within the FeatureActivated function of a custom class inheriting from the SPFeatureReceiver class. Now let’s dive into some code (these are all different methods I tried to no avail)

  • Created some variables and hard coded the locations within the feature:
    string MasterUrl = "/_layouts/custom.master";
    string CustomMasterUrl = "/_layouts/custom.master";
    string AlternateCssUrl = "/StyleLibrary/Custom/CSS/stylesheet.css";SPWeb web = (SPWeb)properties.Feature.Parent;
    try {
      web.MasterUrl = MasterUrl;
      web.CustomMasterUrl = CustomMasterUrl;
      web.AlternateCssUrl = AlternateCssUrl;
      web.Update();
    }
    catch { }

  • Set the values of the current site to the values from the root site:
    SPWeb web = (SPWeb)properties.Feature.Parent;
    try {
      web.MasterUrl = web.Site.RootWeb.MasterUrl;
      web.CustomMasterUrl = web.Site.RootWeb.CustomMasterUrl;
      web.AlternateCssUrl = web.Site.RootWeb.AlternateCssUrl;
      web.Update();
    }
    catch { }
  • Set the values of the current site to the values from it’s parent site:
    SPWeb web = (SPWeb)properties.Feature.Parent;
    try {
      web.MasterUrl = web.ParentWeb.MasterUrl;
      web.CustomMasterUrl = web.ParentWeb.CustomMasterUrl;
      web.AlternateCssUrl = web.ParentWeb.AlternateCssUrl;
      web.Update();
    }
    catch { }

None of these methods, upon going to the “Site Master Page Settings” page within a browser, showed the little radio button next to “Inherit site master page from parent of this site” as being checked. They did correctly set the master page and stylesheet links, but if I went to a parent site and changed the master page, the master page did not get changed on the site *unless* the “inherit” radio button was selected.

I decided to take this to the Content Database for the portal in which I was working. Looking in the dbo.Webs table, I found that if the “Inherit” radio button is selected, there are still values in the DB for AlternateCssUrl, MasterUrl, and CustomMasterUrl. Running the above code, would put the same values in these fields, but the “Inherit” radio button would not be selected. I then performed the following steps:

  • Copy a row (one site) from the database to a text file
  • Change each of the 3 settings (Site Master, System Master, and Alternate CSS) from “Inherit” to “Specify a …”
  • Copy the same row from the database to the second row of the text file
  • Change each of the 3 settings back to “Inherit”
  • Copy the same row from the database to the third row of the text file
  • Change each of the 3 settings back to “Specify a …”
  • Copy the same row from the database to the fourth row of the text file

I then moved the side-scroll-bar all the way to the right (to confirm something in each lines was different) and they did not end at the same character, so I went to the beginning and compared vertically until I found different characters. There were a total of 3 instances of different characters (all 3 instances had the same characters) all within the same field, ‘MetaInfo’. These values were:

  • “Inherit”: 547275
  • “Specify a …”: 46616C73

Going back to the SharePoint Object Model, I discovered that there are two member properties to the SPWeb object which seem to correlate to site properties: Properties and AllProperties. I then tossed together a quick console app to output all Key/Value pairings for these two collections, and this is what came out:

  • SPWeb.Properties (C# type SPPropertyBag)
    • vti_extenderversion: 12.0.0.4518
    • vti_associatevisitorgroup: 4
    • vti_defaultlanguage: en-us
    • vti_associategroups: 5;4;3;6;7;8;9;10;11;14;15;17;18;28
    • vti_associateownergroup: 3
    • vti_associatemembergroup: 5
  • SPWeb.AllProperties (C# type Hashtable)
    • vti_extenderversion: 12.0.0.4518
    • __InheritsCustomMasterUrl: False
    • vti_associatevisitorgroup: 4
    • vti_categories: Business Competition Expense\ Report Goals/Objectives Ideas In\ Process Miscellaneous Planning Schedule Travel VIP Waiting
    • vti_associatemembergroup: 5
    • vti_defaultlanguage: en-us
    • vti_associateownergroup: 3
    • vti_associategroups: 5;4;3;6;7;8;9;10;11;14;15;17;18;28
    • __InheritsAlternateCssUrl: False
    • vti_approvallevels: Approved Rejected Pending\ Review
    • __InheritsMasterUrl: False

Fancy that, there are three properties which interest me most at this point (indicated in red).

I simply set these values to “True” (note, that is a string of “True” and not a 1 or C# true), which resulted in this:

However, it did not pull the correct values to begin with. Therefore, it would appear that SharePoint uses these settings for when the parent’s master pages/css are changed, and not relying on these settings for everytime the site is accessed.

All in all, here is the final code I came up with for my Feature (inside FeatureActivated function):

SPWeb web = (SPWeb)properties.Feature.Parent;
Hashtable hash = web.AllProperties;
try {
  web.MasterUrl = web.ParentWeb.MasterUrl;
  hash["__InheritsMasterUrl"] = "True";
  web.Update();
}
catch { }
try {
  web.CustomMasterUrl = web.ParentWeb.CustomMasterUrl;
  hash["__InheritsCustomMasterUrl"] = "True";
  web.Update();
}
catch { }
try {
  web.AlternateCssUrl = web.ParentWeb.AlternateCssUrl;
  hash["__InheritsAlternateCssUrl"] = "True";
  web.Update();
}
catch
{

}

If you enjoyed this post, or this blog, please make a secure tax-deductable donation to the American Diabetes Association. Please read my personal story about life as a diabetic and donate today.

A while back, I posted a list of ASP.NET Interview Questions. Conventional wisdom was split, with about half the folks saying I was nuts and that it was a list of trivia. The others said basically “Ya, those are good. I’d probably have to look a few up.” To me, that’s the right response.

Certainly I wasn’t trying to boil all of .NET Software Development down to a few simple “trivia” questions. However, I WAS trying to get folks thinking. I believe that really good ASP.NET (and for that matter, WinForms) is a little [read: lot] more than just draging a control onto a designer and hoping for the best. A good race driver knows his car – what it can do and what it can’t.

So, here’s another list…a greatly expanded list, for your consumption (with attribution). I wrote this on a plane last week on the way from Boise to Portland. I tried to take into consideration the concerns that my lists contain unreasonable trivia. I tried to make a list that was organized by section. If you’ve never down ASP.NET, you obviously won’t know all the ASP.NET section. If you’re an indenpendant consultant, you may never come upon some of these concepts. However, ever question here has come up more than once in the last 4 years of my time at Corillian. So, knowing groking these questions may not make you a good or bad developer, but it WILL save you time when problems arise. 

What Great .NET Developers Ought To Know

Everyone who writes code

*       Describe the difference between a Thread and a Process?

*       What is a Windows Service and how does its lifecycle differ from a “standard” EXE?

*       What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?

*       What is the difference between an EXE and a DLL?

*       What is strong-typing versus weak-typing? Which is preferred? Why?

*       Corillian’s product is a “Component Container.” Name at least 3 component containers that ship now with the Windows Server Family.

*       What is a PID? How is it useful when troubleshooting a system?

*       How many processes can listen on a single TCP/IP port?

*       What is the GAC? What problem does it solve?

Mid-Level .NET Developer

*       Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.

*       Describe what an Interface is and how it’s different from a Class.

*       What is Reflection?

*       What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?

*       Are the type system represented by XmlSchema and the CLS isomorphic?

*       Conceptually, what is the difference between early-binding and late-binding?

*       Is using Assembly.Load a static reference or dynamic reference?

*       When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?

*       What is an Asssembly Qualified Name? Is it a filename? How is it different?

*       Is this valid? Assembly.Load(“foo.dll”);

*       How is a strongly-named assembly different from one that isn’t strongly-named?

*       Can DateTimes be null?

*       What is the JIT? What is NGEN? What are limitations and benefits of each?

*       How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization?

*       What is the difference between Finalize() and Dispose()?

*       How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?

*       What does this useful command line do? tasklist /m “mscor*”

*       What is the difference between in-proc and out-of-proc?

*       What technology enables out-of-proc communication in .NET?

*       When you’re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?

Senior Developers/Architects

*       What’s wrong with a line like this? DateTime.Parse(myString);

*       What are PDBs? Where must they be located for debugging to work?

*       What is cyclomatic complexity and why is it important?

*       Write a standard lock() plus “double check” to create a critical section around a variable access.

*       What is FullTrust? Do GAC’ed assemblies have FullTrust?

*       What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?

*       What does this do? gacutil /l | find /i “Corillian”

*       What does this do? sn -t foo.dll

*       What ports must be open for DCOM over a firewall? What is the purpose of Port 135?

*       Contrast OOP and SOA. What are tenets of each?

*       How does the XmlSerializer work? What ACL permissions does a process using it require?

*       Why is catch(Exception) almost always a bad idea?

*       What is the difference between Debug.Write and Trace.Write? When should each be used?

*       What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?

*       Does JITting occur per-assembly or per-method? How does this affect the working set?

*       Contrast the use of an abstract base class against an interface?

*       What is the difference between a.Equals(b) and a == b?

*       In the context of a comparison, what is object identity versus object equivalence?

*       How would one do a deep copy in .NET?

*       Explain current thinking around IClonable.

*       What is boxing?

*       Is string a value type or a reference type?

*       What is the significance of the “PropertySpecified” pattern used by the XmlSerializer? What problem does it attempt to solve?

*       Why are out parameters a bad idea in .NET? Are they?

*       Can attributes be placed on specific parameters to a method? Why is this useful?

C# Component Developers

*       Juxtapose the use of override with new. What is shadowing?

*       Explain the use of virtual, sealed, override, and abstract.

*       Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d

*       Explain the differences between public, protected, private and internal.

*       What benefit do you get from using a Primary Interop Assembly (PIA)?

*       By what mechanism does NUnit know what methods to test?

*       What is the difference between: catch(Exception e){throw e;} and catch(Exception e){throw;}

*       What is the difference between typeof(foo) and myFoo.GetType()?

*       Explain what’s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?

*       What is this? Can this be used within a static method?

ASP.NET (UI) Developers

*       Describe how a browser-based Form POST becomes a Server-Side event like Button1_OnClick.

*       What is a PostBack?

*       What is ViewState? How is it encoded? Is it encrypted? Who uses ViewState?

*       What is the <machinekey> element and what two ASP.NET technologies is it used for?

*       What three Session State providers are available in ASP.NET 1.1? What are the pros and cons of each?

*       What is Web Gardening? How would using it affect a design?

*       Given one ASP.NET application, how many application objects does it have on a single proc box? A dual? A dual with Web Gardening enabled? How would this affect a design?

*       Are threads reused in ASP.NET between reqeusts? Does every HttpRequest get its own thread? Should you use Thread Local storage with ASP.NET?

*       Is the [ThreadStatic] attribute useful in ASP.NET? Are there side effects? Good or bad?

*       Give an example of how using an HttpHandler could simplify an existing design that serves Check Images from an .aspx page.

*       What kinds of events can an HttpModule subscribe to? What influence can they have on an implementation? What can be done without recompiling the ASP.NET Application?

*       Describe ways to present an arbitrary endpoint (URL) and route requests to that endpoint to ASP.NET.

*       Explain how cookies work. Give an example of Cookie abuse.

*       Explain the importance of HttpRequest.ValidateInput()?

*       What kind of data is passed via HTTP Headers?

*       Juxtapose the HTTP verbs GET and POST. What is HEAD?

*       Name and describe at least a half dozen HTTP Status Codes and what they express to the requesting client.

*       How does if-not-modified-since work? How can it be programmatically implemented with ASP.NET?
Explain <@OutputCache%> and the usage of VaryByParam, VaryByHeader.

*       How does VaryByCustom work?

*       How would one implement ASP.NET HTML output caching, caching outgoing versions of pages generated via all values of q= except where q=5 (as in http://localhost/page.aspx?q=5)?

Developers using XML

*       What is the purpose of XML Namespaces?

*       When is the DOM appropriate for use? When is it not? Are there size limitations?

*       What is the WS-I Basic Profile and why is it important?

*       Write a small XML document that uses a default namespace and a qualified (prefixed) namespace. Include elements from both namespace.

*       What is the one fundamental difference between Elements and Attributes?

*       What is the difference between Well-Formed XML and Valid XML?

*       How would you validate XML using .NET?

*       Why is this almost always a bad idea? When is it a good idea? myXmlDocument.SelectNodes(“//mynode”);

*       Describe the difference between pull-style parsers (XmlReader) and eventing-readers (Sax)

*       What is the difference between XPathDocument and XmlDocument? Describe situations where one should be used over the other.

*       What is the difference between an XML “Fragment” and an XML “Document.”

*       What does it meant to say “the canonical” form of XML?

*       Why is the XML InfoSet specification different from the Xml DOM? What does the InfoSet attempt to solve?

*       Contrast DTDs versus XSDs. What are their similarities and differences? Which is preferred and why?

*       Does System.Xml support DTDs? How?

*       Can any XML Schema be represented as an object graph? Vice versa?

 

What SharePoint consultants Ought to Know

Everyone who can spell SharePoint

* what is SharePoint?
* what is the difference between SharePoint Portal Server and
Windows SharePoint Services?
* what is a document library?
* what is a meeting workspace?
* what is a document workspace?
* what is a web part?

Mid-level SharePoint Consultant

* what is the difference between a document library and a form library?
* what is a web part zone?
* how is security managed in SharePoint?
* how are web parts developed?
* what is a site definition?
* what is a template?
* how do you install web parts?
* what is the difference between a site and a web?
* what are the differences between web part page gallery, site
gallery, virtual server gallery and online gallery?
* what is the GAC?
* what is a DWP?
* what is CAML?
* what are themes?
* what is presence?
* can web parts be connected? if so, how?
* what is a personal view and what is a shared view?
* what is an STP file?
* what is an FWP file?
* can you upload MP3’s to SharePoint?
* how does SharePoint support MS Outlook integration?
* how can you extend lists in SharePoint?
* explain the document versioning in SharePoint document libraries

Senior SharePoint Consultant

* where are web part resources contained?
* what are the different installation methods for deploying web
parts? and what are the pros/cons?
* what is a ghosted/unghosted page?
* how is site data stored?
* where is metadata for a web stored?
* what is an audience and describe the use?
* what are the trust levels and what is the default trust
associated with SharePoint?
* what are the two logging mechanisms for usage statistics?
* what functionality does owssup.dll provide for client side activities?
* what is the difference between a site owner and a site administrator?
* what is STSAdm and what can it be used for?
* can WSS search subsites?
* can you register alerts for users?
* are PDFs searchable?

SharePoint Architect

* what is a SharePoint farm?
* describe a large deployment
* how can you synchronize custom Active Directory attributes to SharePoint?
* if it is anticipated that our organization would need to store 1
terrabyte of documents, what is the recommended configuration and
storage requirement?
* describe the implementation of SharePoint and Project Server
* what are the BKMs for workflow and SharePoint?
* explain how you would deploy SharePoint on an extranet
* what is the BKM for maximum number of virtual servers configured
for SharePoint on a single box?
* what are the migration strategies for moving sites around?
* what are the archiving strategies?
* describe the search strategies
* can you implement forms-based authentication with SharePoint?
* describe how single sign-on works

As I was playing with MOSS 2007 and ISA today, I wanted to publish a SharePoint subsite, without publishing the root site.
Since I’m not that experienced in ISA Server, I sometimes turned to Bart Bultinck (great guy, great systems engineer) on my MSN Messenger. He’s way more familiar and experienced with ISA Server.

So the situation is like this:

  • In my Internal network you can access my portal (sub)site through http://moss/sharepoint
  • In my external network you should be able to access  the portal through http://sharepoint/sharepoint
    (Sorry, my names aren’t that original, but who cares)

So how do you do it?

  1. Don’t forget to add an extra Alternate Access Mapping in MOSS. So I added an Internet Zone “http://sharepoint”
  2. Create a weblistener and a rule on your ISA Server to send through the SharePoint subsite.
  3. And most importantly, do not only allow the path /sharepoint/*, but also the following:
    /_controltemplates/*
    /_layouts/*
    /_vti_bin/*
    /_wpresources/*

« Previous PageNext Page »