Friday, August 28, 2015

SharePoint Server 2016 Preview is available for download

Microsoft had release the SharePoint Server 2016 preview for public review

you can download the product in ISO format

https://www.microsoft.com/en-us/download/details.aspx?id=48712

please expand the installation instruction section to get the product key



 

Wednesday, August 26, 2015

How to fix the Sharepoint Provider Host App deployment Issue after create a new branch on TFS (Team Foundation Server)

After I deploy the Sharepoint Provider App to the Production Server, then I branch out a new project on the current project for continuing development.

Howerver, i deploy the app to the Sharepoint Development Server, I try to access the item in document library. I always encounter this error

clientContext.ExecuteQuery(); Access denied. You do not have permission to perform this action or access this resource.

The cause of this issue is that App still use the previous clientID, which is reference to the Previous App Web.


We should generate a new Client ID for the new branch

use the new GUID to replace the clientId in appManifest.xml of Sharepoint App Project.

 <AppPrincipal>
    <RemoteWebApplication ClientId="9bb877e4-1c73-4258-8224-924c2e75a8f0" />
  </AppPrincipal>

replace the previous clientId with new Guid ID in the web.config File in the App Web Project.

  <add key="ClientId" value="9bb877e4-1c73-4258-8224-924c2e75a8f0" />


Wednesday, August 19, 2015

How to fix the Pager Alginment issue in ASP.Net GridView

when i test my application test. I notice that the pager is not properly aligned in the page, as i try to add the new row to the grid.



when i use IE Deverlper Tool to debug the application, it showed that table column only has 1 which is supposed to span to 4 columns like this HTML Code <td colspan="4">

since the column span did not work in the pager row. we can manually change it in ItemCreated or RowCreated Event in the code behide.  we will check if the Pager row has only one cells, then we will expand the column with 4 cells.

protected void gridView_ItemCreated(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Pager && e.Item.Cells.Count==1)
            {
                e.Item.Cells[0].Attributes.Add("colspan", "4");
            }
        }




Friday, August 14, 2015

How to enable check object existence in Generate Script task from SSMS(SQL Management Studio For SQL Server 2012 and Above

Today i perform a task to script all the change in the QA for production deployment.

when i test the script in the test database which is replicate from live. However i got the following message

Msg 3701, Level 11, State 5, Line 7
Cannot drop the procedure 'dbo.MySp_Sel', because it does not exist or you do not have permission.

The root cause of this issue is that Microsoft set the Check for Object existence to be False by default.



you can reach this window following these steps

choose Options from Tool Menu







Expanded the SQL Server Object Explorer from the left window panel.




Click on the Scripting to show the general scripting options, change the Check for object
existence to be True.




then run the Generate Script Task again, the Check Object Existence shown in the script.

/****** Object:  StoredProcedure [dbo].[MYSp]    Script Date: 8/14/2015 10:24:48 AM ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MYSp]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[MYSp]



Happy Programming.