I'm developing an external application which will integrate partially with Sharepoint, it will basically provide the ability to scan straight to Sharepoint. I've been using the WSS3 webservices (I don't have MOSS at all), and I've developed a lot of functionality already for dealing with Site, Folder & List data.
(Using Win Server 2003 R2)
I have no problems or errors when using any part of the SP site with an Internet Browser, purely through my application.
It will need to be able to browse specific folders, so I've been trying to find a way to authenticate the user, which has proven surprisingly hard using just WSS3 as it doesn't have anything as convenient as Authenticate.asmx
.
The fact that I am developing a WinForms application and not a web-part seems to be hindering me also, as I cannot get context on the site through SPContext.Current
.
I have no problems or errors when using any part of the SP site with an Internet Browser, they arise purely with this method in my application.
All I really need is for the program to be able to browse Sharepoint with Administrator/Full Access powers. Could someone point me in the right direction on how to go about achieving this?
I've tried this method but I always get a SoapSeverException thrown, unsure where I am going wrong.
using (Lists service = new Lists())
{
service.UseDefaultCredentials = true;
//service.Credentials = new System.Net.NetworkCredential(username, password);
var list = service.GetList("Second List");
// http://localhost:1339/Lists/Second%20List/
// var list = service.GetListItems("aafas", null, null, null, null, null, null);
}
System.Web.Services.Protocols.SoapException was caught Message=Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. Source=System.Web.Services Actor="" Lang="" Node="" Role="" StackTrace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at SharepointWeb.ShareLists.Lists.GetList(String listName) in C:\----\Web References\ShareLists\Reference.cs:line 213
at SharepointWeb.webserviceFunctions.isFullAccessAccount(String username, String password) in C:\----\SharepointWeb\webserviceFunctions.cs:line 238 InnerException:
Edit:
2012-06-22 10:10:39 W3SVC1934813465 192.168.100.123 POST /_vti_bin/Lists.asmx - 80 - 192.168.100.123 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.3615) 401 2 2148074254 2012-06-22 10:10:39 W3SVC1934813465 192.168.100.123 POST /_vti_bin/Lists.asmx - 80 - 192.168.100.123 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.3615) 401 1 0 2012-06-22 10:10:39 W3SVC1934813465 192.168.100.123 POST /_vti_bin/Lists.asmx - 80 MyDomain\MyUser 192.168.100.123 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.3615) 500 0 0
IIS Error Codes 401.2 - Denied by Server Configuration Win32 status code 2148074254 "No credentials are available in the security package." In other words, the client has not sent any credentials."
As detailed Here
Every websites has had it's NTAuthenticationProviders
value changed to Negotiate,NTLM
I have logged onto the domain control and added the Sharepoint server as Trusted for Delegation
. This was to make sure that Kerberos to could work!
Still getting the same error in my IIS log! :(
NTLM
only, notNegotiate,NTLM
unless you want to use Kerberos and you can callsetspn
on the domain controller. also, adding the server for trust to delegation is not required and could open some security breaches.NTLM
withoutNegotiate
. I'm aware that trust to delegation can cause some security issues, I don't think we could require clients change it, but have been trying to rule out possibles!