Hello!
I need to use Unity.SolrNetIntegration with a Solr instance which has basic
authentication enabled. 
Below is the start-up code I use now and it works fine against Solr with
no-authentication;
var solrServers = new Unity.SolrNetIntegration.Config.SolrServers {
                new Unity.SolrNetIntegration.Config.SolrServerElement {
                    Id = "solr",
                    Url = "http://localhost:8983/solr";,
                    DocumentType = typeof
(SearchResultsViewModel).AssemblyQualifiedName
                }
};
(new
Unity.SolrNetIntegration.SolrNetContainerConfiguration()).ConfigureContainer(solrServers,
container);


To make it work with Solr server which has basic authentication, I need to
use the below code to make the connection secure;
var connection = new SolrConnection("http://localhost:8983/solr";)
            {
                HttpWebRequestFactory = new
HttpWebAdapters.BasicAuthHttpWebRequestFactory(solrUser, solrPwd)
            };


But I’m not sure how to use the secure connection with the Solr-Server
instance in the Unity container. I also looked through
https://github.com/Jroland/SolrNet/tree/master/Unity.SolrNetIntegration.Tests
but couldn’t find and leads. 

Please help!




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-basic-authentication-with-Unity-SolrNetIntegration-tp4311494.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to