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!