Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

SharePoint 2010 custom web parts and Kerberos authentication

$
0
0

Has anyone here have experience with SharePoint custom web parts and Kerberos authentication?

I am currently developing a custom search web parts to provide better and targeted search results using Search web services. Currently, our Fast Search application is hosted as non SSL application (“http”) and SharePoint sites are SSL enabled (“https”). I am facing issues passing user credentials from https: (SharePoint site) to http (Search Web service) sites. If we hard code the user credentials it is working fine. Otherwise getting “Unauthorized exception”.

Not working: (getting “401 Unauthorized – Access Denied exception)

queryService = new FastSearchWebServiceProxy.QueryService();

// Use the credentials of the user running the application. queryService.Credentials = System.Net.CredentialCache.DefaultCredentials; dsResults = queryService.QueryEx(qry);

Working: (If I hard code user credentials) queryService = new FastSearchWebServiceProxy.QueryService();

// Use the credentials of the user running the application. queryService.Credentials = new System.Net.NetworkCredential(username, password, "MyDomain"); dsResults = queryService.QueryEx(qry);

How to pass user credentials form current SharePoint site to OneSearch web service without hard coding?


Veera Reddy Kolan
SharePoint Consultant
My Blog


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>