Tag Archives: error

Parse Error in SharePoint Page Layout

If you ever bumped into this issue when your custom SharePoint Page Layout cannot be rendered properly. You may try the resolution steps below

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls.

In SharePoint branding journey, you often need to create your custom page layout to present your article base on Designer’s template file.

And if you are doing it, there is 1 important thing that you should Avoid doing. And that is to Auto Formatting your PAGE LAYOUT!

If you have not noticed (probably you haven’t because you found my article!)

Once you auto formatting your Page Layout via Visual Studio function  CTRL + E + D

<asp:content contentplaceholderid=”PlaceHolderPageTitle” runat=”server”>

See clearly, there is a problem with the Tag above. the “c” for content is auto formatted to be lower case! It matters! Lower c and Upper C make a huge different! It took me one whole one to try out and fix this issue!

Resolution

If you want to make use of the auto formatting (to tidy up your code) please remember to REPLACE ALL (CTRL + H) for “asp:content” to “asp:Content”. Make sure your match case is checked when replacing all

replace all match case page layout error

Jeez!

 

SharePoint Installation Error – Requires .NET Framework 4.5 despite having .NET Framework 4.6

I was puzzled when trying to install SharePoint 2013 in Windows 2012 R2. For the past few months when I was doing the same steps, this error did not occur.

If you have done Prerequisite Installation and trying to install SharePoint 2013, You MAY encounter this error message

Setup is unable to proceed due to the following error(s):

This product requires Microsoft .Net Framework 4.5.

Net 4.6 error when installing SP2013

Having checked in your registry stated here, my .net framework was 4.6 (huh? isn’t 4.6 is better and higher version than 4.5 that’s required?)

Yea, so the installer does have a little issue if we have Higher version of .Net Framework.

Resolution

They underlining issue for this is that the Windows 2012 R2 provisioned is pre-installed with .NET Framework 4.6

To undo this 4.6 version, you would have to go to your Control Panel and uninstall the KB3102467 Windows Update

uninstall sharepoint kb .net 4.6

EditorPart does not have an ID

Yet another error that I’ve encountered when customizing ToolPart (aka EditorPart) for my own SharePoint Web Part.

The task is to create a custom tool part with custom control that displays a list of SharePoint Lists. This custom control contains a post back logic to update another drop down list base on the selected value.

In order to display your toolpart into the Web Part properties pane, you would need to override the following virtual method in System.Web.UI.WebControls.WebParts.WebPart class


public override EditorPartCollection CreateEditorParts()

I bumped into this error “EditorPart does not have an ID” with the following code that was not done correctly


public override EditorPartCollection CreateEditorParts()
{
 ArrayList editorArray = new ArrayList();
 MyEditorPart part = new MyEditorPart() { ID = this.ID + "_editorPart1" };
 editorArray.Add(part);
 editorArray.Add(new WebPartToolPart() );
 editorArray.Add(new CustomPropertyToolPart());
 EditorPartCollection editorParts = new EditorPartCollection(editorArray);
 return editorParts;

}

The use of including WebPartToolPart and CustompropertyToolPart is to ensure that your custom web part would still display the OOTB Web Part Properties pane (which has the functionality to change Height, Width, ChromeType etc etc)

To use them correctly, you would need to specify an ID for each of the class. After applying the code below, the error is gone.


public override EditorPartCollection CreateEditorParts()
{
 ArrayList editorArray = new ArrayList();
 MyEditorPart part = new MyEditorPart() { ID = this.ID + "_editorPart" };
 editorArray.Add(part);
 WebPartToolPart wpToolPart = new WebPartToolPart() { ID = this.ID + "_wpToolPart" };
editorArray.Add(wpToolPart);

 CustomPropertyToolPart cpToolPart = new CustomPropertyToolPart() { ID = this.ID + "_cpToolPart" };
 editorArray.Add(cpToolPart);
 EditorPartCollection editorParts = new EditorPartCollection(editorArray);
 return editorParts;
}

A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

This is a very common error that SharePoint Developers often face. As stated in the error message, this is due to SafeControl Elements in Web.Config file of your SharePoint Application not being added correctly, or perhaps pointing to the wrong type name.

Resolution

To solve this issue, you’ll need to make sure that the SafeControl Entries in your SharePoint solution projects is configured correctly.

Step 1 – Find out what is the correct type name.

  1. Navigate to your .webpart file in Visual Studio that you’ve misconfigured.
  2. Double clicking it to open the webpart file.
  3. Copy the Type Name and exclude the last node
    web part register 1
  4. Alternatively, go to your web part .cs file and copy the Namespace
    web part register 2

Now that you have the correct type name. You need to…

Step 2 – Specify the right Safe Entry

  1. Click on the Web Part
  2. Under Properties panel, click on the … icon beside Safe Control Entries
    web part register 3
  3. Enter the value found in Step 1 into Namespace field as shown below.
    web part register 4
  4. Deploy and Done!

SharePoint Search Content Source Crawl Log Access Denied

I have the following issue when setting up SharePoint 2013 Search Service Application.

Whenever I started full crawling my content sources, after certain time (usually the next day). Content Sources page and Crawl Log will give Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
search service application content source access denied

Checking Search Instance Server’s Application Log and you can see the following error

The Execute method of job definition Microsoft.Office.Server.Search.Administration.IndexingScheduleJobDefinition (ID e611e95c-dc0a-40ee-a3a3-c58f2099c2d1) threw an exception. More information is included below.

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Event ID 6398

Subsequently go to Central Administration page > Timer Jobs to look for the respective Timer

Found “Indexing Schedule Manager on xxxServerNamexxx” failed miserably, for every 5 minutes.

It was then found that some user has this issue previously which has got something to do with TASKS folder in your C:\WINDOWS

sharepoint search windows task access denied issue

In case if you do not have the history of your Domain GPO, this particular folder was previously a target for Conficker Worm virus. Refer here. MS recommended to actually change the permission of this folder which then conflict the requirement for SharePoint Search Service.

If you are interest in checking your own GPO setting, you can simply run “rsop.msc” in your server’s RUN command. And you should be able to see the settings made as per below

sharepoint search windows task access denied issue conflicker

 

Workaround

In order to solve the issue, you have to get your AD GPO team to remove this setting from your sharepoint servers. Explicitly for this requirement or else your search cannot crawl.

For temp solution, you have to change the Owner of this TASKS folder and grant

WSS_WPG with minimum “Read” and “Write” access.

Finger Crossed

Office Web Apps Sorry, there was a problem and we can’t open this document. If this happens again, try opening the document in Microsoft Word.

Got this error after configuring Office Web Apps for SharePoint.

officewebapp sorry there was a problem

Digging into the ULS for Office Web App [C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS\***] and found the following error messages when browsing a document via OWA

HttpRequestAsync, (WOPICheckFile,WACSERVER) no response [WebExceptionStatus:ConnectFailure, url: xxxxxxx
...syncResult asyncResult, Exception& exception)

WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.UnexpectedErrorException:
HttpRequest failed ---> Microsoft.Office.Web.Apps.Common.HttpRequestAsyncException:
No Response in WebException ---> System.Net.WebException:
Unable to connect to the remote server ....
FileUnknownException while loading the app....

 

Checking Application Event Logs and got the following error

Exception type: ExcelWebRendererException Exception message:
We couldn't find the file you wanted.
at Microsoft.Office.Excel.WebUI.EwaState.OpenWorkbook()
...

Turned out that this is due to certain URL not being resolvable by Office Web App Servers.

Here is the catch, the SharePoint Web Application of mine is using multiple Zonez for authentication. The default zone was used for internal servers (not registered in DNS) while Intranet Zone was used for all users.

After the SPWOPI binding is done, the OWA takes in the Default Zone URL whenever user accessing office document via Intranet Zone. The Default Zone’s URL is never set in DNS and hence error thrown.

Resolution

The workaround is to change the HOSTS file in OWA server (C:\Windows\System32\drivers\etc\hosts) to add in the IP of SharePoint Web Server with Default Zone’s URL.

Alternatively, if the Default URL is okay to be exposed to public. Please feel free to add in a DNS record.

WAMP SERVER is in Amber Color and cannot be started

Happened to bump into this hiccup and I thought it would be helpful to document it down.

Someone of you may have faced this error where your newly installed WAMP  cannot be started and there is no MYSQL/PHP/APACHE error log generated.

One place that I always like to check if the Event Viewer (eventvwr.msc). If you navigate to your Application Logs and happen to see this error

The Apache service named reported the following error:
>>> (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : AH00072: make_sock: could not bind to address 0.0.0.0:80 .

The Apache service named reported the following error:
>>> AH00451: no listening sockets available, shutting down .

The Apache service named reported the following error:
>>> AH00015: Unable to open logs .

Congratz! I may have a solution for you!

The above error simply means that the port 80 of your current machine is in used by another Running program…  Wait a minute.. I did not run any Web Server in my local machine.. Why would it be in used??

Step below show you how to check which program/service is using your ports

  1. Open CMD (Command Prompt) with Administrator rights
  2. Run “netstat -anob | more“. Use ” | more” in case the output is long and you need to see them page by page (hit Space to see next page of output, just so you know)
  3. Look for Local Address that contains “:80” port 80. (which is what the WAMP stack requires)
  4. You should see the executable that is using the port now. (In my Case, it was SKYPE.EXE… OKAY!! thanks for not telling me during my installation!)

 

Side Note, You can still use Skype for Business while hosting your WAMP Server. Go to Skype Option > Advanced > Connection. Uncheck the use port 80 443 for additional incoming connection.

 

SMTP Relay email stuck at Queue folder

During my SMTP Relay setup, i noticed the Send email function is called successfully BUT no email is sent to my mailbox.

I check the following directory C:\inetpub\mailroot\Queue and noticed that there are a few EML file stuck in it.

After googling and troubleshooting, the problem is that in the IIS6 > SMTP’s Properties > Outbound Security, the Basic Authentication is specified with an invalid email address and password.

Update them and now my email will be sent out.

#160009: The e-mail address ’emaill address’ is unknown

Bumped into this error when setting Office 365 Relay in my Local SharePoint On-premise server for outgoing email.

I have done the following steps -> http://fmuntean.wordpress.com/2008/10/26/how-to-configure-iis-smtp-server-to-forward-emails-using-a-gmail-account/

Ensure you have done the add SMTP Feature, IIS 6.0 SMTP Virtual Server running.

The below check/config works for me

Steps

  1. Go to your IIS 6.0 and right click SMTP Virtual Server properties.
    smtp relay email address unknown error - properties
  2. In the Server properties, go to “Security” tab and ensure the Service Account (or whatsoever account) that needs to do the mail sending, is added into the operators list.
  3. smtp relay email address unknown error
  4. That is it! You can refer to my post Powershell script to test SharePoint Send Mail

an unrecognized http response was received trustfailure could not establish trust relationship ssl/tls

I was having this error generated from my SharePoint 2013 Crawl Log saying the HTTP response is not recognised when it was trying to crawl my SharePoint Webs

This error came out after configuring a subscribed SSL certificate from Entrust (it may happen to all other vendor too I bet) in IIS.

After digging the Application Log of my SharePoint 2013 server which is running the crawling, Error like below was shown:

An operation failed because the following certificate has validation errors:
Subject Name: CN=xxxx, OU=XXX.
 Thumbprint: xxx
Errors:
PartialChain: A certificate chain could not be built to a trusted root authority.
 RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.
 OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.

After reading this error message, it reminds me that I have a chain certificate provided by the SSL vendor which it is asked to import this chain to my server’s certificate store

For SharePoint, You will need to do additional steps to configure this! If you happen to see this error, please kindly perform the following steps:

  1. Import the Chain Certificate from your SSL vendor and save into your server.
  2. Go to Central Admin > Security > Manage Trust
  3. Click “New” in the Trust Relationships tab
  4. Enter the name for the trust and browse the imported Chain Certificate.
  5. Click Ok to create the trust. You shall see your new trust being added
  6. Perform a full crawl again and you shall see the Crawl Log starts generating results

Note: Ticking the “Ignore SSL Warning” in Farm Search Administration page does not help. Have tried that and it didn’t work. The above steps should suffice.