[Solved] Problem with K2 Filterservice

  • 17 October 2007
  • 4 replies
  • 0 views

Badge +1

I must use the K2 filterservice il order to retrieve the process instance history. I've followed this article  http://kb.k2workflow.com/articles/kb000021.aspx but the sample project as my project fails with the error :

"Exception Page_Load : System.Net.WebException: La
demande a échoué avec l'état HTTP 401 : Unauthorized. à
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall) à
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) à
localhost.FilterService.CreateSession(String ServerName, String
Connstr)"

Does somebody have a problem like this and, I hope, a solution.

Thanks.
 

 


4 replies

Badge +9
A 401 error normally means that you are not able to authenticate properly to the web service.  Did you test accessing the web service directly from the IE browser?  Also are you running the project from the same server as the K2 webservice? If you are accessing from different servers, you would need to configure Kerberos to pass the credentials properly (see KB000123 for details).
Badge +1

Thank you for the response,

I've already tested to access it directly from IE with success and the project run on the same server

Badge +6

Hi,


 Have you try to pass your credential when you're invocated your web-service, using the following line :


System.Net.ICredentials X = System.Net.CredentialCache.DefaultCredentials;


YourWSObject.Credentials = X;


Cheers,

Badge +1

Thank you for your response jan, your solution has solved the problem.

 

Reply