Posts

Access Facebook from VietNam

Option 1:  https://www.lisp4.facebook.com/ Option 2: Edit windows hosts file - Use notepade, open hosts file at C:\Windows\System32\drivers\etc - Add following IPs: 125.252.224.88 www.facebook.com 69.63.181.12 apps.facebook.com  153.16.15.71 www.facebook.com 153.16.15.71 register.facebook.com 153.16.15.71 www.logins.facebook.com 153.16.15.71 facebook.com 153.16.15.71 blog.facebook.com 153.16.15.71 logins.facebook.com 153.16.15.71 login.facebook.com 153.16.15.71 apps.facebook.com 153.16.15.71 upload.facebook.com 153.16.15.71 graph.facebook.com 153.16.15.71 photos-a.ak.fbcdn.net 153.16.15.71 photos-b.ak.fbcdn.net 153.16.15.71 photos-c.ak.fbcdn.net 153.16.15.71 photos-d.ak.fbcdn.net 153.16.15.71 photos-e.ak.fbcdn.net 153.16.15.71 photos-f.ak.fbcdn.net 153.16.15.71 photos-g.ak.fbcdn.net 153.16.15.71 photos-h.ak.fbcdn.net 153.16.15.71 static.ak.connect.facebook.com 153.16.15.71 static.ak.fbcdn.net 153.16.15.71 b.static.ak.fbcdn.net 153.16.15.71 e...

Remove Bad Web parts from SP Pages

Image
SP Developers often run into issue where their deployed web part has problems, the page refuses to load. How can developer can remove those "bad" web parts from the page when the actual page does not load? The solution is simple enough, just add ?Contents=1 to the URL, it will take you to Web Part Maintenance page, where you can easily remove those bad guys http://server/SitePages/Home.aspx?Contents=1   will take you to followng screen:

Log4net and you

Image
SharePoint Developers often need to add logging capability to their code. Here are the easiest steps that will add log4net to your web part on local SP Development machine 1) Download log4net, extract to some folder on your computer 2) Deploy log4net to your GAC 3) In your SP project, Add reference to log4net 4) Add this line at the end of your Assemblyinfo.cs [assembly: log4net.Config.XmlConfigurator(Watch = true)] 5) Use log4net in your code private ILog _log = LogManager.GetLogger(typeof(VisualWebPart1UserControl)); protected void Button1_Click(object sender, EventArgs e) { string s = DateTime.Now.ToString(); Button1.Text = s; _log.InfoFormat("*** Server time: {0}", s); } 6) Modify web.config of the target Web Application <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> </configSections> <log4net>     <appender name="O...

Microsoft Campus Tours

Series of Microsoft Campus Tours at Microsoft Research facility, great videos about R&D activities and office workspaces Xbox Team workspaces http://channel9.msdn.com/Series/CampusTours/Microsoft-Campus-Tours-Xbox   Dining on Campus http://channel9.msdn.com/Series/CampusTours/Microsoft-Campus-Tours-Dining-On-Campus The anechoic chamber (...kind of voice recognition) http://channel9.msdn.com/Series/CampusTours/Microsoft-Campus-Tours-Microsoft-Research-Part-1-The-Anechoic-Chamber Pen and Touch http://channel9.msdn.com/Series/CampusTours/Microsoft-Campus-Tours-Microsoft-Research-Part-2-Manual-Deskterity

Start Stop SharePoint 2010 services

Image
You may have known that developing SharePoint 2010 on local developer workstation (Win 7) is possible. Then it comes to a need to save RAM for other applications when you are not actively working with SharePoint coding. The best set up for my case is as follow: Set SharePoint related services start up type to Manual Start / Stop those services when needed For this kind of set up, I've run across Emmanuel's blog . The steps are well explained and the PowerShell scripts work nicely. Check it out, sure you will need it sometime. The scripts

SQL Alias and SharePoint installation

Image
While install SharePoint, it's a best practice to use SQL Alias for your DB server name. With SQL alias set up, it can save you headache when you want to move your DB to another server. How to create SQL Alias? There are 2 options, both produce the same result Option 1 : Use cliconfg (SQL Server Client Network Utility, this tool is shipped with OS from Windows 2000) Start > Run > cliconfg Click TCP/IP, then  " Enable >> " Click Alias Tab Type in Server Alias, e.g SHAREPOINT Select TCP/IP Server name: point to your real SQL server instance Option 2 : Use SQL Server Configuration Manager In SQL Server Configuration Manager , expand SQL Native Client Configuration , right-click Aliases , and then click New Alias . Once create SQL alias, you can create your SP Farm using alias, SHAREPOINT in this case, without problem

Error while restore SharePoint from back-up

I got the following error while restore SharePoint (2007) Site from a back up Object ... failed in event OnRestore. For more information, see the error log located in the backup directory. SqlException: The media family on device '...\spbr0000\0000000B.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE DATABASE is terminating abnormally. The restore log file got this message Error: Object ... failed in event OnRestore. For more information, see the error log located in the backup directory. SqlException: The media family on device '...\spbr0000\0000000B.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE DATABASE is terminating abnormally. I scratched my head several times, wondering if my SharePoint got problem? Well, the problem is odd enough: the back up was created on a SharePoint with SQL 2008; my target SharePoint is using SQL 2005. This is a famous message when you restore an back up in newer S...