Showing posts with label sharepoint. Show all posts
Showing posts with label sharepoint. Show all posts

Wednesday, July 11, 2018

AX2012 Sharepoint EP Portal performance


The performance for the Enterprise portal is highly dependent on the caching service pointed in the image below. 

Please try to restart the service to get the performance back. 



Monday, October 23, 2017

Remove Sharepoint Upgrade Bar

To remove the upgade bar the following command can be used in the sharepoint 2013 management shell

Note: Please make sure that the mangement shell is executed using elevated administrator privileges.

Get-SPWebApplication http://afz-svr-int:90 | Get-SPSite -Limit All -CompatibilityLevel 14 | Foreach-Object {$_.AllowSelfServiceUpgrade = $false }

The above command can be executed for each of the hosted sites. 

Thursday, October 06, 2016

AX2012 EP Page Title

To change the title of a custom added page on the Enterprise portal

1. Import the sharepoint page into AOT. Goto the web url menu item and import the page in consideration

Once the page has been imported into AOT it will be visible under page definitions in the AOT

Select the page in question and pull up the property list. In the property list change the title to the desired title sting


The other scenario to change the page title would be when the user control needs to use a context and change the title of the page. In such cases the page load event of the user control can be used as shown below.

protected void Page_Load(object sender, EventArgs e)
{
    ITitleProvider titleProvider = AxBaseWebPart.GetWebpart(this) as ITitleProvider;

    // Specify the title to pass as the AxPageTitle
    titleProvider.Caption = "Page title goes here";

    // Do not include the context in the title
    titleProvider.ShowContext = false;
}

For the above code to work it is important that a link of the userControl web part is established with the AXTitle web part, using the EP page edit option as shown below





Friday, June 24, 2016

Sharepoint 2013 Restoring Master Page

Master pages are sensitive. If you happen to mess up with one you can get into a mess. I recently made a change to the master page and uploaded to realize that it had an error. The problem is i was no longer able to access my website.

The solution was to use powershell to upload a copy of the master file with the error fixed and a different file name, as changes to the master file in use are not allowed (as it cannot be deleted).

Step 1: Upload a master file with a new name. (note that the master file being used cannot be deleted)
WebURL = "http://XXX:100"
$SourcePath ="C:\temp\afz_seattle.master"

#Get the Web
$web = Get-SPWeb $WebURL
#Get the Target folder - Master page Gallery
$MasterPageList = $web.GetFolder("Master Page Gallery")
#Set the Target file for Master page
$TargetPath = $Web.Url + "/_catalogs/masterpage/afz_seattle.master"
#Get the Master page from local disk
$MasterPageFile = (Get-ChildItem $SourcePath).OpenRead()
 #upload master page using powershell
 $MasterPage = $MasterPageList.Files.Add($TargetPath,$MasterPageFile,$false)
 $web.Update()        

Step 2: Once the new master file is uploaded with a different name change the templates to point to this file (Instead of the one with error).
$web = Get-SPWeb http://XXX:100
$web.CustomMasterUrl = "/_catalogs/masterpage/afz_seattle.master"
$web.MasterUrl = "/_catalogs/masterpage/afz_seattle.master"
$web.Update()

Wednesday, July 08, 2015

AX 2012 EP Timeout

Step 1:
Increase the timeout settings for EP in AX 2012. Looks like the solution is to increase the timeout setting for the ajax asynchronous calls, this should be done on each page where the timeout needs to be increased luckliy there is a central place as well where it can be done as shown below

1) Open the master page from \Web\Web Files\Static Files\defaultaxV4 in the AOT
2) Search for the OnLoad() method to replace in something in below.

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
AxScriptManager scripts = AxScriptManager.GetCurrent(this.Page);

if (scripts != null)
{
scripts.AsyncPostBackTimeout = 900; // 600 seconds
}

//Call Header.DataBind to generate dynamics styles in header
Page.Header.DataBind();
}


Step 2:
Sharepoint has an service known as the request management service. This service manages all incoming requests and evalutes which is best possible machine to machines in the farm to handle the request.

The basic process to manage the request service is as follows
  1. Get a reference to the SPWebApplication
  2. Get a reference to the request management settings for the web application
  3. Set the parameter
  4. Update the setting
start sharepoint 2013 management shell. It can be found in the program files using the search option in windows

$waUrl = "http://ax-app:290"
$wa = Get-SPWebApplication $waUrl
$rmSettings = $wa | Get-SPRequestManagementSettings
$req=$wa.RequestManagementSettings
$timeout2= New-TimeSpan -minutes 5
$req.Requesttimeout=$timeout2
$req.update()



Step 3:
 Increase the timeout setting for the application pool associated with bcproxy in the IIS console.