The given key was not present in the dictionary.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[KeyNotFoundException: The given key was not present in the dictionary.]
System.ThrowHelper.ThrowKeyNotFoundException() +36
System.Collections.Generic.Dictionary`2.get_Item(TKey key) +52
SolrNet.Utils.Container.DoGetInstance(Type serviceType, String key) +25
CommonServiceLocator.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +54
[ActivationException: Activation error occurred while trying to get instance of type ISolrMoreLikeThisHandlerQueryResultsParser`1, key ""]
CommonServiceLocator.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +155
CommonServiceLocator.ServiceLocatorImplBase.GetInstance() +54
public class Document
{
[SolrUniqueKey("id")]
public string Id { get; set; }
[SolrUniqueKey("content")]
public string Content { get; set; }
[SolrField("creationdate")]
public DateTime CreationDate { get; set; }
}
Startup.Init<Document>(yourSolrURLstringHere));
// Done connect to local Solr Server
ISolrOperations<Document> solr = Startup.Container.GetInstance<ISolrOperations<Document>>();
public class Document
{
[SolrUniqueKey("id")]
public string Id { get; set; }
[SolrUniqueKey("cat")]
public string Category { get; set; }
[SolrUniqueKey("name")]
public string Name { get; set; }
...