Authentication issues

  • 11 November 2004
  • 1 reply
  • 2 views

Badge
I'm having problems connnecting to a remote K2 server in code running in the context of a ASP.NET web form. The connection error is "Authentication with server failed". I'm thinking the user credentials aren't being passed. When calling a webservice you can specify the crenditials to pass, however, I don't see that option on the K2ROM.Connection class. Anybody have any suggestions?

1 reply

Badge +1
Let us start by agreeing that this could be one of a few causes.

1] your application's web.config.

If implementing Integrated Windows Authentication, the following needs to be added in the "web.config" file. This ensures that IIS will successfully impersonate the incoming request's user.

<authentication mode="Windows"/>
<identity impersonate="true"/>

In this case, ensure that Anonymous connections are not enabled on this website.

2] K2ROM: No External Credential support is implemented inside K2ROM.

An extract from the "K2ROM" Help file may indicate possible connection options.

Dim oK2Connection As New K2ROM.Connection

If blnUseIntegratedAuth Then 'Use Intgerated Windows Auth
oK2Connection.Open(k2Server)
Else
'Pre SP1 Versions of K2.net 2003
'strCon = Domain,User,Password

'SP1 of K2.net 2003
'strCon = [;];Authentication=Windows;Domain=[Domain];User=[UserName];Password=[Password]
'strCon = [;];Authentication=External;[Your Custom Constring]
'strCon = [;];SecurityPackage=NTLM;Domain=[Domain];User=[UserName];Password=[Password]
'strCon = [;];SecurityPackage=Kerberos;Domain=[Domain];User=[UserName];Password=[Password]
'strCon = Domain,User,Password
oK2Connection.Open(k2Server, strCon)
End If

... Do some K2 work

'Very Important, Always close a K2 Connection when done!
oK2Connection.Close()

Furthering the discussion, if you have managed to successfully implement the above in your ASP.Net application and you are still receiving the "Authentication" error, you need to tell me a bit more about you're environment. K2Server, IIS, SQL Server and Security Providers implemented.

Reply