Posts

Showing posts from May, 2010

Master page as a feature

In order for the master page to appear in the master page list, we need to add the GhostableInLibrary attribute to the File tag of the Elements.xml module file. <File Path="Package\MyMaster.master" Url="MyMaster.master" Type="GhostableInLibrary"/> http://social.technet.microsoft.com/Forums/en/sharepoint2010programming/thread/ff00d80e-b20b-4cf0-bca7-e26ef70ab1b8

VMWare malformed 100 error event

start performance counter service Run cmd > Lodctr /r restart performance counter service stop, start VMWare Auth services

No rest for anonymous users

that's right. no use trying to connect to rest services. it's not supposed to work anyway. http://chrisdomino.com/Blog/Post/401-Reasons-Why-SharePoint-Web-Services-Don-t-Work-Anonymously

Fix sp2010 taxonomypicker error in eventvwr

ScenarioNavigation.ascx had a ducplicate line: <%@ Register TagPrefix="wssuc" TagName="ButtonSection" Src="/_controltemplates/ButtonSection.ascx" %> TaxonomyPicker.ascx has a line like this: <%@ Control className="TaxonomyPickerControl" Language="C#" Inherits="Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker,Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> Replace the '&#44;' with a ',' (all without the quotes). (“TaxonomyPicker.ascx”) doesn’t apply to the RTM Version anymore as the “TaxonomyPicker” Class seems to be obsolete. If you want to fix this error simply rename the “TaxonomyPicker.ascx” to something like “TaxonomyPicker.ascxBACKUP” to prevent recompilation by the CLI and the error is gone. http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/c894d98c-24ab-416c-aca9-ae57644deb5e/

SharePoint 2010 | Hide Revert Template Message

This really annoying message keeps poping out, event for anonymous users. "The current page has been customized from its template." To fix it, look for "s4-statusbarcontainer" div and wrap it around a SPSecurityTrimmedControl or ASP LoginView <Sharepoint:SPSecurityTrimmedControl runat="Server" PermissionsString="AddAndCustomizePages">   <div id="s4-statusbarcontainer">     <div id="pageStatusBar" class="s4-status-s1">     </div>   </div> </Sharepoint:SPSecurityTrimmedControl>

Connect to SharePoint lists with SOAP

"Data Sources" "SOAP Service Connection" Service description location: "http://sharepointbind/mtsubsite/_vti_bin/lists.asmx?wsdl" Port: "ListsSoap" Operation: "GetListsItems" "Connect" Change "listName" value to "My_List_Name" I have set login as "Don't attempt to authenticate". Source http://support.microsoft.com/kb/890167

Disable Window 2008 IE Enhanced Security

Server Manager Root left menu option (Server Name) On the left, click "Configure IE ESC". http://www.windowsreference.com/windows-server-2008/how-to-disable-internet-explorer-enhanced-security-configuration-ie-esc-in-windows-server-20082003/

Access SharePoint List from Subsite without code (FINALLY)

Facts: - CQWP browse for source data always allows selecting input data from root site collection (even in subtites), and throughout the site collection (data from any of the sites and subsites) - Creating a data view web part in a site that is connected to a list from that site, it is possible to export that web part, sharing that list and xslt by importing it to another site - Disabling UAC sucessfully removes a lot of persmissions issues when using CA and using REST connections (if enabled, running IE as admin is required for admin options to not appear greyed out) - Customized external content (old "Connect to another library...") would be best done with external data sources with REST (also available in Foundation) Check Jasper's Blog http://sp2010a/teamsite/_vti_bin/listdata.svc To retrieve information for a single list http://sp2010a/teamsite/_vti_bin/listdata.svc/Contacts Or perhaps just a single contact (in this case, the one with ID = 1) http://sp2010a/teamsite/...

SP2010 Branding Tips

- Turn on anonymous access - Hide parts when anonymous access <Sharepoint:SPSecurityTrimmedControl runat="Server" PermissionsString="AddAndCustomizePages"> - Use AlternateCSSUrl Property - Switch menu to simplified html (UseSimpleRendering="True") - Customize looks in other browsers/phones (inetpub, App_Browsers/compat.browse) - Add no support warning for IE6 users <Sharepoint:WarnOnUnsupportedBrowsers runat="server" /> Nice popup: http://code.google.com/p/ie6-upgrade-warning/ - Add Favicons to master <Sharepoint:SPShortcutIcon runat="server" IconUrl="" /> - Exclude a master page style from the dialog boxes (include "s4-notdlg" class or deny effect with .ms-dialog .class {background:none;}) - Don't use #footer style (used by SharePoint already; can use "#Footer" though) - Fixed with: <div ID="s4-bodyContainer" class="s4-nosetwidth" style="width:960px; margin...

oldie: register iis for .net 2.0

fixes a lot of problems! > cd %WindowsDir%\Microsoft.NET\Framework > aspnet_regiis -i useful to keep at hand

Disable All-IP v6

Disabling IPv6 on all interfaces has made my server faster, more reliable, and with less memory usage. Also, I don't get "new-host-1" to "new-host-12" on router's dhcp leases. And finally, I can "ipconfig" and simply see my ethernet and wlan nics (not all the tunel, isatap and virtual interfaces) All I needed was to add a line into the registry and reboot. http://www.mydigitallife.info/2007/09/09/disable-and-turn-off-ipv6-support-in-vista/

Instantiate current site in feature

using (SPWeb web = (SPWeb)properties.Feature.Parent) don't use SPContext!

Change master page (WSS3)

Image

Debbugging BSODs

Read c:\windows\minidump\.dmp files (created at each crash) - Debug Diagnostics Tool 1.1 x64 http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en - Dumpchk.exe (available at Windows XP cd at i386\support\tools - last .cab file) My BSOD: "DRIVER_IRQL_NOT_LESS_OR_EQUAL" #### dump ### BugCheckCode 0000000a BugCheckParameter1 00000000`00000000 BugCheckParameter2 00000000`00000002 BugCheckParameter3 00000000`00000001 BugCheckParameter4 fffff800`0212e4db #### dump ### Solutions: - Set Page File to 1.5x available RAM (4GB RAM -> 6GB PF) - Uninstall latest added apps - Uninstall hardware controllers (remove IDE/SATA controller, and remove hard drive from device manager. this will force driver reinstall after reboot) - Watch out for overheated laptops

Missing "Change Master Page" in SP2010?

Ensure: - SharePoint Server (not Foundation) is installed - The site collection has been updated or created in Server - Publishing Features are enabled: Site Collection Features > SharePoint Server Enterprise Site Collection features Manage Site Features > SharePoint Server Publishing

Network | Set IP Address from command-line

netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1 or netsh interface ip set address "Local Area Connection" dhcp http://www.ozzu.com/mswindows-forum/how-change-address-from-command-prompt-t25858.html

SQL Server | Top N + Union + Random (derived tables)

select * from (select top 1 Content, ID, Picture, Title, SubTitle from HeaderBannerJQ_Slides where Content=1 order by newid()) as res union all select * from (select top 1 Content, ID, Picture, Title, SubTitle from HeaderBannerJQ_Slides where Content=2 order by newid()) as res union all select * from (select top 1 Content, ID, Picture, Title, SubTitle from HeaderBannerJQ_Slides where Content=3 order by newid()) as res Resource: http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/05/18/using-top-and-order-by-with-union-union-all.aspx

Create DNN 5 Module

1. Install DNN starter Kit and "Open Site" with Visual Studio 2. Right-click the project, "Add New Item", "Dynamic DNN Module" (select C#) 3. Read the readme file! (change module name in admin & desktopmodules foders, and fix web.config for allowing .cs files) 4. Open browser, Host, Module Definitions, "Create New Module" 5. Edit created module (click the pencil on the left of the module name) 6. Click "Add Definition" and enter exactly the name of the module 7. Click "Add Module Control" and insert the 3 pages (view, edit, settings) For View - Key: none - Source: ViewMyModule.ascx - Type: View - Title: MyModule For Edit - Key: "edit" - Source: EditMyModule.ascx - Type: Edit - Title: MyModule Edit For Settings - Key: "settings" - Source: Settings.ascx - Type: Administrator - Title: MyModule Settings 8. Open ViewMyModule.aspx.cs and comment code inside try/catch in Page_Load event (inside if (!Page.IsPos...

iisreset service failed to start

Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\Users\Administrator>iisreset Attempting stop... Internet services successfully stopped Attempting start... Restart attempt failed. The IIS Admin Service or the World Wide Web Publishing Service, or a service dep endent on them failed to start. The service, or dependent services, may had an error during its startup or may be disabled. C:\Users\Administrator> Event Viewer "The Net.Msmq Listener Adapter service depends the following service: msmq. This service might not be installed." reason: cannot start msmq (message queuing service: not installed / down) solution: add msmq if you want the error to go away

iisreset error

iisreset Attempting stop... Restart attempt failed. The system cannot find the file specified. (2147942402, 80070002) solution: go to installed programs and repair "Microsoft .NET Framework 4 Client Profile" http://blogs.blackmarble.co.uk/blogs/iangus/archive/2010/03/25/the-system-cannot-find-the-file-specified-2147942402-80070002.aspx

SPQuery

Get specific, ordered items from lists SPWeb curweb = SPContext.Current.Web; SPList curlist = curweb.Lists[lst_guid]; SPQuery query = new SPQuery(); query.Query = "<OrderBy><FieldRef Name='Modified' Ascending="false" /></OrderBy>"; query.RowLimit = 5; SPListItemCollection items = curlist.GetItems(query); foreach (SPListItem lst in items) { //do stuff with received items } http://www.aidangarnish.net/post/Using-SPQuery-and-CAML-to-filter-and-order.aspx http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/e55d53eb-d11c-470e-b064-1c12ab788706

Too many wireless network ip leases

My laptop starting to take alot of ip addresses: [computername] new-host-1 new-host-2 ... new-host-11 After a lot of googling, binging, and service management, I decided to remove VMWare services, VirtualPC services and IPv6 from the wireless network adapter. Also had set up a static ip address in the router for my laptop name/mac just in case. Seems to have worked for me.

Outlook 2007 Certificate Error

Image
"Internet Security Warning The server you are connected to is using a security certificate that cannot be verified. The target principal name is incorrect." Solution: The certificate is valid for a URL different from the one you're using. Either request a different certificate, try creating the account again (with automatic configuration) or try using a different host name. Ex.: mail.domain.com -> mail.companydomain.com Look for companydomain within the certificate file description

split strings

string[] themes = mythemescontents.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);