Tuesday, July 27, 2010

Southeast Asia SharePoint Conference - October 26 and 27 2010

This is is the conference to learn about SharePoint 2010 with expert local and international speakers presenting on topics that will help you understand and succeed with your SharePoint implementations and add real value to your organisation and businesses.

In addition to the session content you'll have ample opportunities to network with your peers in the community and technical and industry experts including local and international Microsoft Most Valued Professionals and Southeast Asia's top Certified Partners.

Don’t miss out on Southeast Asia's biggest SharePoint event of the year!

Grand Copthorne Waterfront Hotel, Singapore, October 26 and 27 2010.

Group Registrations for 5 or more participants are available and will receive a 20% discount. Please note the person arranging the Group Booking (Group Leader) is responsible for all credit card fees and agenda updates for all people registered in the group. Group members cannot individually update their agendas.

Early Bird Registrations of $SGD300.00 will apply to the first 275 delegates who register.

Regular Registration fee is $SGD400.00. 

Additional Training Opportunities - be sure to check out the Pre and Post conference training courses - see GTTP

GTTP

Audience and Products

The SharePoint Conference is intended for a wide audience and has content to cover roles such as:

  • Business Roles like End Users, Business Champions, Power Users and Business Managers 
  • Information Architects, Record and Information Managers IT Managers, CIO and Decision Makers
  • Technical Roles including Developers, IT Pro, Systems Administration and DBA's Microsoft

Technologies covered during the conference include:

  • WSS 3.0 (Windows SharePoint Services)
  • MOSS 2007 (Microsoft Office SharePoint Server)
  • SharePoint Foundation 2010 SharePoint Server 2010
  • SharePoint Designer 2007 and 2010
  • Integration with other Office 2007 and 2010 including InfoPath, Excel, Access and Visio
  • Integration with 3rd Party products enhancing SharePoint functionality

Connect with SEA SPC

linkedin-48x48.png Linkedin: http://events.linkedin.com/SharePoint-Conference-South-East-Asia/pub/364552

facebook-48x48.png​ Facebook: http://www.facebook.com/pages/SharePoint-Conference-South-East-Asia/135980859759693

twitter-48x48.png Twitter: #SPCSEA @spcsea

website-48x48.png Web site: http://www.sharepointconference.asia/

Wednesday, July 21, 2010

MS-SQL 2008 R2 Named pipes error 40, SQL server error 53

image

According to SQL Protocols blog “winerr 1326 means "Logon failure: unknown user name or bad password". When you get this error code, it means a) the client stack is able to reach the target machine, and b) the service account of the client application does not have enough credential to make a NP session to the server. NP is based on SMB (file sharing). The logon failure message represented by winerr 1326 is from SMB layer, not SQL Server. You need to make sure you can make a file sharing to the server machine with the same service account. If you cannot make a file sharing between your server and your client, NP in SQL Server would not success. Try "net use" or "Map Network Drive" to check this. This often happens when server and/or client is not on domain.”

For more details visit :

http://blogs.msdn.com/b/sql_protocols/archive/2007/05/16/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error-xxx.aspx

Office Web Application on Web (Sky Drive)

Wow… Office Web Apps are available on Windows Live Currently its support only English… More languages and locales will be added over the coming months.

This release includes Word, PowerPoint, Excel and OneNote. This allow you to edit your  Word, Excel, OneNote and PowerPoint documents on Online.

image

Online version…

image

Monday, July 19, 2010

SharePoint 2010 Blank Page display, 401 Unauthorized Access is denied due to invalid credentials.

SharePoint 2010 running on Windows 2008 R2 sever with Host name header. the problem is NO ERROR message displayed it display  just Blank White Page

Randy Williams on his blog posted that how to enable error message.  Go to IIS website and select web.config for the Web Application and Edit. I add below code in between the <Configuration> element:

<system.webServer> 
<httpErrors errorMode="Custom" existingResponse="Auto" > </httpErrors>
</system.webServer>



When you run your SharePoint site, System will display below error message.


image


How to overcome this issue.


The KB article from Microsoft explain http://support.microsoft.com/kb/896861 


  • Click Start, click Run, type regedit, and then click OK.
  • In Registry Editor, locate and then click the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0


  • Right-click MSV1_0, point to New, and then click Multi-String Value.
  • Type BackConnectionHostNames, and then press ENTER.
  • Right-click BackConnectionHostNames, and then click Modify.
  • In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
  • Quit Registry Editor, and then restart the IISAdmin service

    image


    After completion regedit, Restart IIS server, and then type your SharePoint site address, you will able to view your site.  

    image



  • Wednesday, July 14, 2010

    SharePoint 2010 Client Object Model using ADO.NET and REST Services (Retrieve / Update List items)

    As I discussed my previous post the Client Object Model allows client application to interact with SharePoint content directly. The ADO.NET Data Services Framework helps to query SharePoint Foundation data via client application.

    In this example you will see .NET Managed client by create Windows Form application, and you will see how to retrieve list items and updating the items via Client Object Model.

    1. Open Visual Studio 2010 by going to the Start Menu | Programs | Microsoft Visual Studio 2010 | Microsoft Visual Studio 2010.

    2. From the menu, select File | New | Project.

    3. In the New Project dialog window, choose Visual C# | Windows from the Installed Templates.

    4. Select Windows Forms Applications from the Project Templates.

    image

    5. Go to Visual Studio top menu bar, select Data | Add New Data Source… to add new SharePoint ADO.NET List Data Service.

    image

    6. In the Data Source Configuration Wizard select Service and click Next > button. When next screen appear Add Service Reference dialog window, type the following Url in the Address text box and click Go:

    image

    7. Click OK.

    8. Click Finish button in the Data Source Configuration Wizard.

    9. Go to Solution Explorer, expand References. and Right click on System.Data.Services.Client and select Remove.

     image

    10. Right click on References and select Add Reference  and switch to Browse tab and type the following path in the File name textbox and press enter:

    C:\Program Files (x86)\ADO.NET Data Services V1.5 CTP2

    11. Select Microsoft.Data.Services.Client.dll.

    image 

    12. Got Visual Studio Data menu and Click Show Data Source System will open the Data Sources window showing the service reference.

    image

    13. Drag and drop Tasks from the Data Sources window to the Form window. This will insert the Tasks DataGrid into the Form.

    14. You can Remove columns by clicking Edit Columns window, Keep only following columns as shown in the screen shot.

    image

    image

    15. Add the following using statement in the code behind:

    C#, using GeSHi 1.0.8.8
    1. using SharePointADORESTService.ServiceReference1;
    2. using System.Net;

    16. Insert the following code just after the Form1 class declaration:

    C#, using GeSHi 1.0.8.8
    1. HomeDataContext context = new HomeDataContext(new Uri("http://demo2010a:1000/_vti_bin/ListData.svc"));

    17. Insert the following code in the Form1_Load method

    C#, using GeSHi 1.0.8.8
    1. context.Credentials = CredentialCache.DefaultCredentials;
    2. tasksBindingSource.DataSource = context.Tasks;

    18. To Update changes from Data Grid to go Tasks DataGrid, select the BindingNavigator right click on the Save button and Select Enable.

    image

    19. Double click on the Save button in the BindingNavigator to generate the Save method:

    C#, using GeSHi 1.0.8.8
    1. context.SaveChanges();

    20. Go to TaskBindingSource –> Right Click –> and Go to Properties Select Events. Double click on CurrentItemChanged event. Visual Studio will generate the item changed event for the TasksBindingSource:

    C#, using GeSHi 1.0.8.8
    1. context.UpdateObject(tasksBindingSource.Current);

    21. Press F5 to start debugging the application.

    22. You should see the application window with the list of Tasks items from SharePoint List.

    image

    23. Click on the first tasks and change the Title value from Faizal from Rafi and click Save and go to SharePoint Tasks list you will able to view the updates. 

    image

    For Source Code click here

    Tuesday, July 13, 2010

    SharePoint 2010 Client Object Model (Create/Retrieve/Delete) list

    One the most improved feature in SharePoint 2010 is Client Object Model. It enable client application to interact with SharePoint content directly. In Summary “SharePoint 2010 client object model lets you write client-side code to work with all the common objects in SharePoint sites. Through the object model, you can add and remove lists, add, update, and delete list items, change documents in document libraries, create sites, manage permissions of items, and add and remove Web Parts from a page.”

    Client Object Module allows to interact following ways.

    1. .NET Managed Client

    2. Silverlight

    3. JavaScript

    In this example you will see .NET Managed client by create WPF application, We will see how to retrieve list from SharePoint site, Create list in SharePoint site and Deleting the list from SharePoint site.

    Creating SharePoint Client Object Model WPF Application

    1. Open Visual Studio 2010 by going to the Start Menu | All Programs | Microsoft Visual Studio 2010 | Microsoft Visual Studio 2010.

    2. From the menu, select File | New | Project.

    3. In the New Project dialog window, choose Visual C# | Windows from the Installed Templates.

    4. Select WPF Application from the Project Items.

    image

    5. In the solution explorer, right click on References and select Add Reference… and Switch to Browse tab.

    image

    6. Copy and Paste the following path in the File Name textbox and press enter:

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

    7. Select Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll

    8. In the Solution Explorer, double click on Window1.xaml to open the XAML view.

    Retrieve List Values  

    9. Insert the following XAML code inside the Grid element in the XAML view.

    HTML, using GeSHi 1.0.8.8




    1. <ListBox Height="225" HorizontalAlignment="Left" Margin="12,61,0,0" Name="listBox1" VerticalAlignment="Top" Width="274" DataContext="{Binding}" />


    2. <Button Content="Retrive Lists" Height="23" HorizontalAlignment="Left" Margin="298,27,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />


    3. <TextBox Height="23" HorizontalAlignment="Left" Margin="64,28,0,0" Name="textBox1" VerticalAlignment="Top" Width="222" />


    4. <Label Content="Site URL" Height="28" HorizontalAlignment="Left" Margin="5,26,0,0" Name="label5" VerticalAlignment="Top" />

    Parsed in 0.012 seconds at 46.65 KB/s
    image 

    10. In the Solution Explorer, right click on Windows1.xaml and select View Code.


    image


    11. Add the following using statements :

    using Microsoft.SharePoint.Client;
    using WPFSP = Microsoft.SharePoint.Client;

    12. Double click Retriev List button and  Insert the following code block :



    C#, using GeSHi 1.0.8.8



    1. private void button1_Click(object sender, RoutedEventArgs e)


    2.         {


    3.             this.Cursor = Cursors.Wait;


    4.             //Set Client Context


    5.             WPFSP.ClientContext context = new WPFSP.ClientContext(textBox1.Text);


    6.             Web site = context.Web;


    7.             context.Load(site, osite => osite.Title);


    8.             context.ExecuteQuery();


    9.             Title = site.Title;


    10.             ListCollection lists = site.Lists;


    11.             IEnumerable<WPFSP.List> listCollection =


    12.                 context.LoadQuery(lists.Include(l => l.Title, l => l.Id));


    13.             context.ExecuteQuery();


    14.             listBox1.ItemsSource = listCollection;


    15.             listBox1.DisplayMemberPath = "Title";


    16.          }







    13. Press F5 to start debugging the application.


    14. You will see the Application Window with Enter the site Name and Click Retrieve list button System will populate the available SharePoint lists.


    image


    Creating List via Client Object Module


    We will extended the same client Application to create list


    15.Insert the following XAML code inside the Grid element in the XAML view.



    HTML, using GeSHi 1.0.8.8



    1. <Button Content="Create Lists" Height="23" HorizontalAlignment="Right" Margin="0,295,19,0" Name="button2" VerticalAlignment="Top" Width="75" Click="button2_Click" />


    2. <TextBox Height="23" HorizontalAlignment="Left" Margin="86,296,0,0" Name="textBox2" VerticalAlignment="Top" Width="208" />


    3. <Label Content="List Title" Height="28" HorizontalAlignment="Left" Margin="7,296,0,0" Name="label1" VerticalAlignment="Top" />


    4. <Label Content="Description" Height="28" HorizontalAlignment="Left" Margin="6,323,0,0" Name="label2" VerticalAlignment="Top" />


    5. <TextBox Height="23" HorizontalAlignment="Left" Margin="86,323,0,0" Name="textBox3" VerticalAlignment="Top" Width="208" />


    6. <ComboBox Height="23" HorizontalAlignment="Right" Margin="0,353,98,0" Name="comboBox1" VerticalAlignment="Top" Width="208" ItemsSource="{Binding}">


    7.        <ComboBoxItem Content="Generic List" />


    8.        <ComboBoxItem Content="Announcements" />


    9.        <ComboBoxItem Content="Events" />


    10. </ComboBox>


    11. <Label Content="List Template" Height="28" HorizontalAlignment="Left" Margin="5,348,0,0" Name="label3" VerticalAlignment="Top" />

    16. You should see the added items on the designer view

    image

    17. Double click Create Lists button and  Insert the following code block :



    C#, using GeSHi 1.0.8.8



    1. private void button2_Click(object sender, RoutedEventArgs e)


    2.         {


    3.          // Site Collection URL


    4.            ClientContext createContext = new ClientContext(textBox1.Text);


    5.         // Retrieve Sites


    6.            Web mySite = createContext.Web;


    7.         // Rettrive Lists Collections....


    8.             ListCollection lists = mySite.Lists;


    9.         //List Create Information which hold list Title, Description and Template Type


    10.             ListCreationInformation listCreationInfo =


    11.           new ListCreationInformation();


    12.  


    13.             string listType = comboBox1.Text;


    14.  


    15.             switch (listType)


    16.             {


    17.                 case "Generic List":


    18.                     {


    19.                         listCreationInfo.TemplateType = (int)ListTemplateType.GenericList;


    20.                        break;


    21.                     }


    22.                 case "Events":


    23.                     {


    24.                         listCreationInfo.TemplateType = (int)ListTemplateType.Events;


    25.                         break;


    26.                     }


    27.                 case "Announcements":


    28.                     {


    29.                         listCreationInfo.TemplateType = (int)ListTemplateType.Announcements;


    30.                         break;


    31.                     }


    32.             }


    33.  


    34.             // Assign value to list


    35.             listCreationInfo.Title = textBox2.Text;


    36.             listCreationInfo.Description = textBox3.Text;


    37.       


    38.             // Create List     


    39.             mySite.Lists.Add(listCreationInfo);


    40.             createContext.ExecuteQuery();


    41.         }



    18. Press F5 to start debugging the application.


    19. You will see the Application Window with Enter the site Name, List Name, Description and Select List Template Type and Finally click Create list button System will create SharePoint list.

     image 

    20. Go to http://demo2010a:1000/ SharePoint Site View all site content you can able to see the ClientOM Announcements list.image 


    Deleting List via Client Object Module


    We will extended the same client Application to Delete list


    21.Insert the following XAML code inside the Grid element in the XAML view.



    HTML, using GeSHi 1.0.8.8



    1. <Button Content="Delete List" Height="23" HorizontalAlignment="Left" Margin="298,399,0,0" Name="button3" VerticalAlignment="Top" Width="75" Click="button3_Click" />


    2. <ComboBox Height="21" HorizontalAlignment="Left" Margin="86,402,0,0" Name="comboBox2" VerticalAlignment="Top" Width="208" DataContext="{Binding ElementName=listBox1}" />


    3. <Label Content="Select List" Height="28" HorizontalAlignment="Left" Margin="6,400,0,0" Name="label4" VerticalAlignment="Top" />
    21. You should see the added items on the designer view
    image

    22. Double click Retriev List button and  Insert the following code block :


                comboBox2.ItemsSource = listCollection;
                comboBox2.DisplayMemberPath = "Title";




    23. Double click Delete List button and  Insert the following code block :



    C#, using GeSHi 1.0.8.8



    1. private void button3_Click(object sender, RoutedEventArgs e)


    2. {


    3. ClientContext deleteContext = new ClientContext(textBox1.Text);


    4. MessageBox.Show("SharePoint List Deleting " + comboBox2.Text);


    5. deleteContext.Web.Lists.GetByTitle(comboBox2.Text).DeleteObject();


    6. deleteContext.ExecuteQuery();


    7. }

    25. You will see the Application Window with Enter the site Name and click Retrieve list button, system will retrieve SharePoint lists and set value to Combo box.

    image 


    26. Select Value from Combo box and Click Delete List system will delete selected list.


    To Download Source code click here




    To learn more about Client object model you can refer to  Steve Peschka has written a really good series:


    Friday, July 9, 2010

    IIS error log code (sc-status and sc-substatus)

    If  you are analysing the IIS log file by default the sc-status and sc-substatus not recorded in the log files, you need enable at Advance log by fields level to record. When you enable fields level the system will provide Http return result code. The code details given below.

    This time the first request is returning a status of 301 (Object Moved Permanently) and a sub status of 0 which is not used.
    The second request returns a status of 403 (Forbidden) and a sub status of 14 (Directory Listing Denied)

    1xx - Informational
    These status codes indicate a provisional response. The client should be prepared to receive one or more 1xx responses before receiving a regular response.

    100 - Continue.
    101 - Switching protocols.

    2xx - Success
    This class of status codes indicates that the server successfully accepted the client request.

    200 - OK. The client request has succeeded.
    201 - Created.
    202 - Accepted.
    203 - Non-authoritative information.
    204 - No content.
    205 - Reset content.
    206 - Partial content.

    3xx - Redirection
    The client browser must take more action to complete the request. For example, the browser may have to request a different page on the server or repeat the request by using a proxy server.

    301 - Moved Permanently
    302 - Object moved Temporarily
    303 - See Other
    304 - Not modified.
    307 - Temporary redirect.

    4xx - Client Error
    An error occurs, and the client appears to be at fault. For example, the client may request a page that does not exist, or the client may not provide valid authentication information.

    400 - Bad request.
    401 - Access denied. IIS defines a number of different 401 errors that indicate a more specific cause of the error. These specific error codes are displayed in the browser but are not displayed in the IIS log:

    401.1 - Logon failed.
    401.2 - Logon failed due to server configuration.
    401.3 - Unauthorized due to ACL on resource.
    401.4 - Authorization failed by filter.
    401.5 - Authorization failed by ISAPI/CGI application.
    401.7 – Access denied by URL authorization policy on the Web server. This error code is specific to IIS 6.0.

    403 - Forbidden. IIS defines a number of different 403 errors that indicate a more specific cause of the error:

    403.1 - Execute access forbidden.
    403.2 - Read access forbidden.
    403.3 - Write access forbidden.
    403.4 - SSL required.
    403.5 - SSL 128 required.
    403.6 - IP address rejected.
    403.7 - Client certificate required.
    403.8 - Site access denied.
    403.9 - Too many users.
    403.10 - Invalid configuration.
    403.11 - Password change.
    403.12 - Mapper denied access.
    403.13 - Client certificate revoked.
    403.14 - Directory listing denied.
    403.15 - Client Access Licenses exceeded.
    403.16 - Client certificate is untrusted or invalid.
    403.17 - Client certificate has expired or is not yet valid.
    403.18 - Cannot execute requested URL in the current application pool. This error code is specific to IIS 6.0.
    403.19 - Cannot execute CGIs for the client in this application pool. This error code is specific to IIS 6.0.
    403.20 - Passport logon failed. This error code is specific to IIS 6.0.

    404 - Not found. 404.0 - (None) – File or directory not found.

    404.1 - Web site not accessible on the requested port.
    404.2 - Web service extension lockdown policy prevents this request.
    404.3 - MIME map policy prevents this request.
    404.4 - No Handler (IIS 7)
    404.5 - Request Filtering: URL Sequence Denied (IIS 7)
    404.6 - Request Filtering: Verb denied (IIS 7)
    404.7 - Request Filtering: File extension denied (IIS 7)
    404.8 - Request Filtering: Denied by hidden namespace (IIS 7)
    404.9 - Denied since hidden file attribute has been set (IIS 7)
    404.10 - Request Filtering: Denied because request header is too long (IIS 7)
    404.11- Request Filtering: Denied because URL doubled escaping (IIS 7)
    404.12 - Request Filtering: Denied because of high bit characters (IIS 7)
    404.13 - Request Filtering: Denied because content length too large (IIS 7)
    404.14 - Request Filtering: Denied because URL too long (IIS 7)
    404.15- Request Filtering: Denied because query string too long (IIS 7)

    405 - HTTP verb used to access this page is not allowed (method not allowed.)
    406 - Client browser does not accept the MIME type of the requested page.
    407 - Proxy authentication required.
    412 - Precondition failed.
    413 – Request entity too large.
    414 - Request-URI too long.
    415 – Unsupported media type.
    416 – Requested range not satisfiable.
    417 – Execution failed.
    423 – Locked error.

    5xx - Server Error
    The server cannot complete the request because it encounters an error.

    500 - Internal server error.

    500.12 - Application is busy restarting on the Web server.
    500.13 - Web server is too busy.
    500.15 - Direct requests for Global.asa are not allowed.
    500.16 – UNC authorization credentials incorrect. This error code is specific to IIS 6.0.
    500.18 – URL authorization store cannot be opened. This error code is specific to IIS 6.0.
    500.100 - Internal ASP error.

    501 - Header values specify a configuration that is not implemented.
    502 - Web server received an invalid response while acting as a gateway or proxy.

    502.1 - CGI application timeout.
    502.2 - Error in CGI application.

    503 - Service unavailable. This error code is specific to IIS 6.0.
    504 - Gateway timeout.
    505 - HTTP version not supported
    .

     

    Source : http://blog.crowe.co.nz/blog/archive/2005/08/26/231.aspx

    Monday, July 5, 2010

    Deployment error on Windows Azure

    Deploy Hello World Application in the Staging Environment.

    Gives a Warning Message " While your deployment is stopped, it continues to accrue charges. Please delete the stopped deployment if you no longer wish to be charged for it. For more details visit Windows Azure Pricing FAQs"

    image

    Click Run button System will deploy your solution and enable WebRole to be ready.

    image

    Click Website URL to test your Cloud Application….

    image