All About SharePoint

Liedong(Ken) Zheng,SharePoint Leader at SIMPLOT

Archive for February, 2010

Kerberos Lesson

Posted by ken zheng on February 24, 2010

After spending hours and hours research, this is what I found:
1. A server name can only be applied to one user.
Run SPN -L username to check what servers have been set to the user. Make sure it contains short and long name
2. If there is Kerberos turned on the server, the application pool must run under the SPN user, otherwise you will get Event ID 529 Kerberos error;
3. Use kerbtray to see if Kerberos ticket is generated on the client machine, you should see the server name in the Ticket List.

Here is the link to MS support

http://support.microsoft.com/kb/326985

Posted in Uncategorized | Tagged: | Leave a Comment »

How to load an icon from an embedded resource in C#

Posted by ken zheng on February 18, 2010

Add the file (or icon) to the project, I like to create a folder for all my resource files.

1. (optional) Right click on the project and selected “Add” and then “New Folder”.
2. (optional) Rename new “NewFolder” to “Resources”.
3. Right click on the project (or “Resources” folder) and selected “Add” and then “Add Existing Item”.
4. Find the file (or icon).
5. Right click on the newly added file and select “Properties”
6. Set the “Build Action” property to “Embedded Resource”

Now when you compile the executable the file (or icon) will be embedded.

To use the embedded file use the following code (I have written it like this to illustrate the different steps, clearly you can condense the code into fewer lines)

System.Drawing.Icon icnTask;
            System.IO.Stream st;
            System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
            st = a.GetManifestResourceStream("{{NameSpace}}.Resources.TaskIcon.ico");
            icnTask = new System.Drawing.Icon(st); 

Posted in VS2008 | Tagged: , | 5 Comments »

Changing Order / Hiding Columns in New / Edit Forms

Posted by ken zheng on February 10, 2010

1. Open the list and select Settings + List Settings
2. Select the “Column ordering” link under “Columns”.
3. Use the “Change Field Order” form to change the order of columns.

The full instruction is on here. But If you can’t the “Change Field Order” link, just type the url “/_layouts/formEdt.aspx?List=”

Posted in Sharepoint | Tagged: , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 28 other followers