Archive for error

SharePoint: You cannot deploy this solution on this type of server computer as it is configured. This solution must be installed on a server of type: front-end Web server

Scenario:

We tried to deploy wsp via Visual Studio 2013 on our development server, deployment stopped with following error:

You cannot deploy this solution on this type of server computer as it is configured. This solution must be installed on a server of type: front-end Web server

We tried using PowerShell, but it hangs at “Deploying”. Tried solution like adding “loopback check” but it didn’t work in case of wsp deployment.

Resolution:

Finally, disconnecting and connecting configuration database did the trick but at the cost of creating new CA.

Steps are:

  1. Run cmdlet to disconnect configuration database
  • Disconnect-SPConfigurationDatabase –Confirm:$false
  1. Close PowerShell window and open new PowerShell window
  2. Run cmdlet to connect configuration
  • $passphrase = ConvertTo-SecureString -String “sharepoint@2013” -asPlainText -Force
  • Connect-SPConfigurationDatabase -DatabaseServer SQLServerInstanceName -DatabaseName SharePoint_Config -Passphrase $passphrase
  • Start-Service SPTimerv4
  1. Run SharePoint Configuration wizard and created new central administration.

We were able to deploy solutions via Visual Studio but newly created Central Administration need to deploy every wsp.


Advertisements

Leave a Comment

SharePoint:InputFormTextBox: Validation Issue after postback

Scenario:

We have placed a “SharePoint:InputFormTextBox” text control on our webpart and wanted to make it a “Required Field”. We added an ASP “RequiredFieldValidator” which works fine when we click submit.

We have other controls on the form as well. If an event is occurred and any other controls postback, then, the validation on “SharePoint:InputFormTextBox” fails to work if we try to submit.

Resolution:

We look into the issue and tried to resolve by adding implementing different solutions but nothing was working. In the end, found a reply on MS SharePoint forum that was buried in other replies. Suggested setting the initial property of “RequiredFieldValidator”.

Turned out the when webpart postback, somehow, “<DIV></DIV>” is added in “SharePoint:InputFormTextBox”. You can check it by editing the control “SharePoint:InputFormTextBox” after postback from some other control.

We set

RequiredFieldValidator3.InitialValue = “<DIV></DIV>”

in every control server-side code that postback.

Source: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopmentlegacy/thread/e9fbbd43-bef9-48fc-9a9f-0011514798e7/ Look at the last reply by “cschoenfeldt“.

Leave a Comment

Microsoft Security Bulletin – Vulnerabilities in SharePoint Could Allow Elevation of Privilege

Leave a Comment

SharePoint: Content Query Web Part, more than three filters, QueryOverride and Logs

Scenario:

We need to get list items from all lists in a site collection based upon five conditions. OOTB content query web part (CWQP) provides three filters at max. The way foreword is to write a CAML query and put it inside QueryOverride property. To do this, you need to export OOTB CQWP web part. Open it in notepad or any XML viewer tool and set the property.

We wrote following CAML Query and set the QueryOverride property.

<property
name=QueryOverride
type=string ><![CDATA[

<Where>

<Or>

<And>

<And>

<Eq>

<FieldRef
Name=AnnouncementPropagate
Nullable=True
Type=Boolean/>

<Value
Type=Boolean>1</Value>

</Eq>

<Eq>

<FieldRef
Name=Region
Nullable=True
Type=Choice/>

<Value
Type=Choice>XXXXXXX</Value>

</Eq>

</And>

<Gt>

<FieldRef
Name=Expires
Nullable=True
Type=DateTime/>

<Value
Type=DateTime>

<Today/>

</Value>

</Gt>

</And>

<And>

<Eq>

<FieldRef
Name=Region
Nullable=True
Type=Choice/>

<Value
Type=Choice>
XXXXXXX</Value>

</Eq>

<Gt>

<FieldRef
Name=Expires
Nullable=True
Type=DateTime/>

<Value
Type=DateTime>

<Today/>

</Value>

</Gt>

</And>

</Or>

</Where>

]]></property>

An Or operator with three and two ANDs. Uploaded the web part and selected first option “Show items from all sites in this site collection”. After clicking “Apply”, web part display following error:

There is a problem with the query that this Web Part is issuing. Check the configuration of this Web Part and try again.

Resolution:

Tried different options and found out if we select a single list, web part works fine and if we select other two options, web part display above error.

SharePoint write the actual query created by selecting filters in the tool part of CQWP to the LOG file. So, we first configured three filters for three AND’s and copy the query from the Log file. Then, configured two filters for two ANDs and copy the query.  Joined them with Or and it did the trick.

Comments (4)

SharePoint 2010: Read ULS LOGS

Method I:

The easiest but most difficult way to go to LOGS folder [usually located @ C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS]. Open the log file and try to find the error using correlation ID or error description

Method II:

Download ULS Viewer provided by Microsoft to read from log files

Method III:

Use power shell command Get-SPLogEvent to read from log files.

Method IV:

Use third party tools for reading log files

  1. SharePoint Correlation ID View Webpart
  2. SharePoint ULS Log Viewer
  3. SharePoint Log Reader
  4. SharePoint LogViewer
  5. SPTraceView – Lightweight Tool For Monitoring The SharePoint Diagnostic Logging In Real-Time

Comments (1)

SharePoint: Incompatible Web Part markup detected. Use *.dwp Web Part XML instead of *.webpart Web Part XML

Scenario:

We deployed a webpart and when tried it to add it on the page, following error occurred:

Incompatible Web Part markup detected. Use *.dwp Web Part XML instead of *.webpart Web Part XML.

Resolution:

This error occurs when you have not inherited your class from “System.Web.UI.WebControls.WebParts.WebPart”. We have inheritated our class from “Microsoft.Office.Server.WebAnalytics.Reporting.WhatsPopularWebPart” class as we were customizing OOTB “WhatsPopularWebPart”. The resolution is to create your own “.dwp” file. Copy pate following XML, make appropriate changes and save it with “.dwp” extension.

<?xml version=”1.0″?>

<WebPart xmlns=”http://schemas.microsoft.com/WebPart/v2″&gt;

<Assembly>[AssemblyName],Version=[X.X.X.X], Culture=[XXXXX],PublicKeyToken=[XXXXXXXX]</Assembly>

<TypeName>WebPartNamespace.WebPartClassName</TypeName>

<Title>WebPartTitle</Title>

<Description>WebPartDescription</Description>

</WebPart>

One quick way is to open “.webpart” file and replace values.

Second step is to go to 14 hives or 12 hives [C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES], found the feature folder. Delete “.webpart” file and paste “.dwp” file. Repeat the same process in the SharePoint installation. Go to Site Collection Settings-> Web parts (under Galleries). Delete “.webpart” file and upload “.dwp” file.

Source:

http://blog.sharepointdevelopment.nl/post/Unable-to-add-selected-Web-Part-Incompatible-Web-Part-markup-detected.aspx

Comments (2)

SharePoint Workflow: This workflow requires that the document is checked in. You must first check this document in and then start the workflow

Scenario:

We created two visual studio workflows, say, workflow A and workflow B. Workflow A starts when a document is added or changed and check out the document. We can’t start Workflow A manually. Workflow B can only be started manually. When we try to start workflow B on a document which is already checkout by the workflow A, following pop up appear:

This workflow requires that the document is checked in. You must first check this document in and then start the workflow

If we check in the document, workflow B works fine.

Resolution:

As per my understanding, the trick missing is that SharePoint workflow run with “System Account”. We have deployed two workflows. Workflow A and workflow B. First Workflow A run when document is uploaded or changed and check out the document. Document is checked out using current user token (user token of the user who has uploaded or changed the document). When we want to start Workflow B, it give us error that document needs to be check in as it was check out by another user and we can’t run workflow on it.

We changed the code of Workflow A and used system account to Check out the document. Now, when user try to run the workflow, it is already check out to “System Account” and have no issue in running.

Leave a Comment

Older Posts »