I need to add a ComputedIndexField to my Solr Configuration
Doing so by creating a config patch containing the following
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<indexConfigurations>
<defaultSolrIndexConfiguration>
<fields hint="raw:AddComputedIndexField">
<field fieldName="SomeFieldName">
Type, Dll
</field>
</fields>
</defaultSolrIndexConfiguration>
</indexConfigurations>
</contentSearch>
</sitecore>
</configuration>
But i kept getting the error. Even though this was the format the documentation was suggesting.
Could not find property 'fieldMap' on object of type: System.String
The problem:
The naming of my custom config was making it load before the nodes that it was trying to patch. I fixed it by changing the name so that they would load AFTER the node.
Related
The compiler tells me:
Error while generating a file: Invalid argument: value in Settings.settings
And when I click this error, it opens up the Settings.settings file.
Does anybody see anything wrong in here?
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>
I could resolve this by adding a Custom Tool Namespace.
This example on MSDN shows how to implement a simple dictionary inside a custom App.config section:
https://msdn.microsoft.com/en-us/library/aa719887(v=vs.71).aspx
The XML looks like this, and it employs SingleTagSectionHandler:
<sampleSection setting1="Value1" setting2="value two"
setting3="third value" />
Is this the most complicated my custom XML section can be before I have to write my own config section class? Because I wish to have a section which is slightly more complex e.g:
<mySection>
<mappings>
<mapping name="A" val1="12" val2="32"/>
<mapping name="B" val1="2" val2="2"/>
</mappings>
<add name="URL" value="http://..."/>
</mySection>
Or something along those lines at least, the exact structure isn't rigid.
How far can I push the built-in section handlers? I couldn't see a good tutorial on what is actually provided in system.configuration.
I'm in the process of moving our Unity configuration to the web.config file. I'm stuck on how to migrate the following code config to the xml format:
var container = new UnityContainer();
container.RegisterType<IPrincipal>(new InjectionFactory(x=> HttpContext.Current.User));
return container;
Here are the XML declartion:
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
<alias alias="IRepository" type="Model.IRepository, Model" />
<alias alias="Repository" type="Data.Repository, Data" />
<container>
<register type="IRepository" mapTo="Repository" />
</container>
</unity>
InjectionFactory is the one thing that can't be represented in XML out of the box. In order for it to completely work, you'd have to write a C# parser that could work on the XML file, which was way more than I wanted to bite off at the time.
However, I do have a sample on bitbucket which shows a way to get a limited version of factory creation working via XML. Might give you some ideas.
I'm building an API documentation with Sandcastle. The code has multiple classes and methods which are marked deprecated. Now I want that in the API-documentation output these methods are clearly marked (crossed-out or other marker). However the Sandcastle output doesn't mark obsolete methods/classes at all.
My question is. What do I need to do to have the obsolete methods/classes marked by Sandcastle.
Thanks for any advice/help.
Well I found the issue. The issue is a mix of the API and Attribute filters I had in place.
So I added the System-namespace to my API filters, so that it includes the Obsolete-Attribute:
<apiFilter>
<namespace name="System" expose="true">
<type name="ObsoleteAttribute" expose="true" />
<type name="SerializableAttribute" expose="false" />
</namespace>
<!-- rest of the stuff -->
</apiFilter>
And added it also to the list of Attribute-Filters:
<attributeFilter expose="true">
<namespace name="System" expose="false">
<type name="ObsoleteAttribute" expose="true" />
</namespace>
<!-- rest of the stuff -->
</attributeFilter>
I had the 'ObsoleteAttribute' in my attribute-filter, but not in the API-filter.
This thread was also helpful: http://docproject.codeplex.com/discussions/74716?ProjectName=docproject
I want to Upload File on Sharepoint and while apploading only i want to add all properties of Uploaded Document.
We get ID field only when Document is uploaded on Sharepoint.
Is there any other way to Update List without passing ID Field.
Example:
<Batch OnError="Continue" ListVersion="1"
ViewName="270C0508-A54F-4387-8AD0-49686D685EB2">
<Method ID="1" Cmd="Update">
<Field Name="ID">4<Field>
<Field Name="Field_Name">Value</Field>
</Method>
<Method ID="2" Cmd="Update">
<Field Name="ID" >6</Field>
<Field Name="Field_Name">Value</Field>
</Method>
</Batch>
Refering Link
**** I am using Sharepoint Web Services.And Uploading Document in Chunks.****
This is not possible. First the file should complete uploading, then it will have properties that can be set! (otherwise properties may be set for non-existing files, in case that the file fails to upload.)