Skip to main content
I installed K2Workflow (trial version) and couldn't load the Workspace. It ended up with:

The request failed with HTTP status 401: Unauthorized.


I tried various solutions and managed to fix by doing the followings:

1. Enable impersonating for WorkspaceService by modifying its web.config file.

2. Tell IIS to do Basic Authentication instead of IWA (Intergrated Windows Authentication).

I looked at the IIS log file and found these, which may interest you:

- When IWA is on, request to /K2V3/Workspace/workspace.aspx is made under my domain account xxxphuongvl, which is expected. But then the call to /K2V3/WorkspaceService/FilterService.asmx is made under anonymous user, which is horrible since it revert K2 webservice back to anonymouse user access, which failed to access SQL server database (in this case, K2Log database) as IIS had to run as NT AuthorityNetwork Service user, which doesn't have right to access K2 database.

- When Basic Authentication is on, requests to /K2V3/Workspace/workspace.aspx, and later /K2V3/WorkspaceService/FilterService.asmx, both are made under my domain account name, which is desirable and success to finish.

Here's my IIS log:

- When IWA is on:


#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2006-05-09 10:52:18
#Fields: time cs-uri-stem cs-uri-query cs-username sc-status sc-substatus sc-win32-status
10:52:18 /K2V3/Workspace/Workspace.aspx - - 401 2 2148074254
10:52:21 /K2V3/Workspace/Workspace.aspx - - 401 1 0
10:52:21 /K2V3/Workspace/Workspace.aspx - fsoft.fpt.vnphuongvl 302 0 0
10:52:21 /K2V3/WorkSpaceService/FilterService.asmx - - 401 2 2148074254
10:52:21 /K2V3/WorkSpaceService/FilterService.asmx - - 401 1 0
10:52:21 /K2V3/WorkSpaceService/FilterService.asmx - - 401 1 2148074252
10:52:21 /K2V3/Workspace/Workspace.aspx ExpirePage= fsoft.fpt.vnphuongvl 302 0 0
10:52:21 /K2V3/Workspace/Workspace.aspx ErrorLine=The+request+failed+with+HTTP+status+401%3a+Unauthorized. fsoft.fpt.vnphuongvl 302 0 0
10:52:21 /K2V3/Workspace/workspace.aspx Retry=Yes&ErrorLine=The+request+failed+with+HTTP+status+401%3a+Unauthorized. fsoft.fpt.vnphuongvl 200 0 0


- When Basic is on:


10:52:21 /K2V3/Workspace/Workspace.aspx ExpirePage= fsoft.fpt.vnphuongvl 302 0 0
10:52:21 /K2V3/Workspace/Workspace.aspx ErrorLine=The+request+failed+with+HTTP+status+401%3a+Unauthorized. fsoft.fpt.vnphuongvl 302 0 0
10:52:21 /K2V3/Workspace/workspace.aspx Retry=Yes&ErrorLine=The+request+failed+with+HTTP+status+401%3a+Unauthorized. fsoft.fpt.vnphuongvl 200 0 0
10:54:31 /K2V3/Workspace/Workspace.aspx - - 401 2 2148074254
10:54:34 /K2V3/Workspace/Workspace.aspx - fsoft.fpt.vnphuongvl 302 0 0
10:54:34 /K2V3/WorkSpaceService/FilterService.asmx - - 401 2 2148074254
10:54:42 /K2V3/WorkSpaceService/FilterService.asmx - FSOFT.FPT.VNphuongvl 200 0 0
10:54:46 /K2V3/WorkSpaceService/FilterService.asmx - FSOFT.FPT.VNphuongvl 200 0 0
10:54:46 /K2V3/Workspace/Workspace.aspx ExpirePage= fsoft.fpt.vnphuongvl 302 0 0
10:54:46 /K2V3/Workspace/Report.aspx - fsoft.fpt.vnphuongvl 200 0 0
10:54:46 /K2V3/Workspace/Image/icon_print.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:46 /K2V3/Workspace/Image/refresh.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/WorkSpaceService/FilterService.asmx - FSOFT.FPT.VNphuongvl 200 0 0
10:54:47 /K2V3/Workspace/K2MIS/FilterDetail.aspx - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Loading.aspx - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/Settings.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/report_list_tab.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/logo_olive.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/Large_repeat_olive.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/workspace_olive.jpg - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/nav_back_olive.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/top_arrow_left.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/Spacer.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/new_template.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/delete_template.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/WorkSpaceService/FilterService.asmx - FSOFT.FPT.VNphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/save_template.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/image/Spacer.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/K2MIS/ReportTemplateList.aspx - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/back_header_olive.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/lightrow_back2_olive.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/divider4.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/image/divider4.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/nav_hl_back.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:47 /K2V3/Workspace/Image/expand_back_olive.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/image/Report-grey.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/image/Search-grey.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/image/WorkList-grey.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/K2MIS/DragFunc.js - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/Image/Report.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/Image/Folder_open.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/Image/Folder_Closed.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/Image/Open.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/Image/Olive-menu-back.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/image/uc.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/image/c.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/Image/AZ.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:48 /K2V3/Workspace/Image/back_subhead3_olive.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:50 /K2V3/WorkSpaceService/FilterService.asmx - FSOFT.FPT.VNphuongvl 200 0 0
10:54:50 /K2V3/Workspace/Report/Process.aspx ReportID=20&TemplID=18 fsoft.fpt.vnphuongvl 200 0 0
10:54:50 /K2V3/Workspace/image/spacer.gif - fsoft.fpt.vnphuongvl 200 0 0
10:54:50 /K2V3/Workspace/stylesheet/Image/arrow11.gif - fsoft.fpt.vnphuongvl 404 0 3
10:54:50 /K2V3/WorkSpaceService/FilterService.asmx - FSOFT.FPT.VNphuongvl 200 0 0
10:54:50 /K2V3/Workspace/K2MIS/FilterDetail.aspx ReportID=20&TemplID=18&PageId=0 fsoft.fpt.vnphuongvl 200 0 0
10:55:04 /K2V3/Workspace/SaveSetting.aspx PageName=Report&Default=20~18&Report=true&Filter=false&LeftTab=false&TabWidth=337 fsoft.fpt.vnphuongvl 200 0 64
10:55:04 /K2V3/WorkSpaceService/FilterService.asmx - FSOFT.FPT.VNphuongvl 200 0 0


Can you please help me explain this? I don't want to let's the whole world see my password in clear text!
Try this:

Follow these steps to disable the loopback check:
1. Click Start | Run and then type regedit , and click OK .
2. In Registry Editor, locate and then click the following registry key: KEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsa
3. Right-click Lsa , point to New, and then click the DWORD value.
4. Type DisableLoopbackCheck , and then press Enter .
5. Right-click DisableLoopbackCheck , and then click Modify .
6. In the Value data box, type 1, and then click OK .
7. Quit Registry Editor, and then restart your computer.

Revert back to IWA and test again.

Regards,
Ockert
I did all solutions posted here but it still doesnt work except for Basic auth. LSA DisableLoopbackCheck, setting permissions on ASP.NET temporary folders... all done and same result: IWA failed!

The question is: how come the workspace.aspx run as my account but turns back as anonymous (or Network Service account) when calling the webservice, while impersonation was set in all configurations?
Implementing kerberos will usually take care of this issue - if you are planning on installing k2 in a distributed environment eventually - it won't hurt - but will infact be good to go ahead and start understanding how it all works now.

you can learn about enabling k2 to use kerberos by reading k2 -kb123
Paisleygo is right - Kerberos usually sorts out this type of problem.

Some other things to check...
1. Make sure K2V3 and ALL its sub-sites run under the SAME AppPool.
2. Make sure this AppPool is started under a domain acount and NOT 'Local System' or 'Network Service'.

Regards,
Ockert
icon-quote.gifOckert:
Paisleygo is right - Kerberos usually sorts out this type of problem.

Some other things to check...
1. Make sure K2V3 and ALL its sub-sites run under the SAME AppPool.
2. Make sure this AppPool is started under a domain acount and NOT 'Local System' or 'Network Service'.

Regards,
Ockert


Sorry but I dont wanna sort it out with Kerberos. My colleague runs this K2 flawlessly with IWA from a default installation. So I'd not accept that I'd have to go a hard way to get the same goal. I'd like to know the cause, not just to make it run!

For your suggestion, I created a new app pool in IIS with my domain account as its identity, added my domain account to IIS_WPG group, move all K2 webapp to that pool, restart IIS and re-run the workspace with IWA, and guess what happened? 401 error again :D

Here's the log:

[quote user= fsoft.fpt.vnphuongvl 302 0 0
10:07:19 /K2V3/Workspace/Workspace.aspx ErrorLine=The+request+failed+with+HTTP+status+401%3a+Unauthorized. fsoft.fpt.vnphuongvl 302 0 0
10:07:19 /K2V3/Workspace/workspace.aspx Retry=Yes&ErrorLine=The+request+failed+with+HTTP+status+401%3a+Unauthorized. fsoft.fpt.vnphuongvl 200 0 0
10:07:19 /K2V3/Workspace/stylesheet/mainstyle_olive.css - fsoft.fpt.vnphuongvl 200 0 0


Any other suggestion?
What changes did you make to the WorkspaceService's web.config file?

Is your IIS and K2.net Server on the same machine?

If you can not get it going, I would recommend opening a formal support ticket for this issue.

Regards,
Ockert
The only change I made is setting impersonation to true. I found this on my colleague's web.config file, which is different from mine.

Since this is a trial, I installed everything in a single server, IIS, K2, SQL Server...

Another thing: my colleague run the registered version. Can it be the cause?
No, registered vs. trial version should not cause this. Is your colleagues OS exactly the same as yours (with Service Packs)?

Ockert
His system is similar to mine: Windows 2K3 SP1.
I FIXED IT!

I'd to create a completely new website under IIS (used different port) pointed to a new blank directory. In that website, I create a new virtual path which pointed to the K2V3 directory, also create application (used the default app pool) for it and its sub-directories. IWA turned on, and it worked like a charm!

So, why would it complain living inside the Default Web Site?

Reply