I migrated an application from IIS 6 to IIS7 and everything works except one thing.
We have a Download Manager that uses a WebService to connect to the site but for some reason it gives the following error:
" Error message 401.2.: Unauthorized: Logon failed due to server configuration Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact
the Web server's administrator for additional assistance"
Looking at IIS logs it shows the following:
2008-09-30 18:46:03 XX.XX.XXX.XX POST /DataSite/FileList2.asmx - 80 - XX.XX.XXX.XX Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.1434) 401 0 0 92
I checked all the possible permissions and compare with the ones in IIS6 where this is working but still no luck.
Anonymous Authentication is enabled for this application starting with the website down to all the virtual directories.
401.2 means that your server and the browser are following 2 different authentication protocols.... are you entering any sort of credentials for accessing this resource???
Yes, This is basically a website protected by a user name and password defined in the database. That same user name and password are used to access the app through the download manager but I'm getting that error. The user name and pass works fine through the
browser. The same URL is specified in the download manager app that is using the Web Service to access the data. Thanks C
I am not sure if IIS understand the authentication method you are using within your app... I would try and look in that direction ... 401.2 has got to do more with the authentication method used than just the permission on the resource...
Please reproduce the error again and open event viewer to check if there is any logon failure of anonymous account in security log. If so, post the details here.
The Application Pool runs under NetworkService. The website authentication method has Anonymous enabled and is using Application pool identity. I also tried with LocalSystem and same result. Thanks
I am having the same issue running an Asp.Net 2.0 site using Forms authentication. The issue only happens after the session has timed out and you attempt to access a resource in a secured folder. This has occured on both a development workstation running
the asp.net development server and on an IIS 6 server.
cosmin10
11 Posts
Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Sep 30, 2008 07:49 PM|LINK
I migrated an application from IIS 6 to IIS7 and everything works except one thing.
We have a Download Manager that uses a WebService to connect to the site but for some reason it gives the following error:
" Error message 401.2.: Unauthorized: Logon failed due to server configuration Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance"
Looking at IIS logs it shows the following:
2008-09-30 18:46:03 XX.XX.XXX.XX POST /DataSite/FileList2.asmx - 80 - XX.XX.XXX.XX Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.1434) 401 0 0 92
I checked all the possible permissions and compare with the ones in IIS6 where this is working but still no luck.
Anonymous Authentication is enabled for this application starting with the website down to all the virtual directories.
Any ideas?
Thanks
C
IIS7 IIS 7.0 authentication IIS 7.0 Problem
ma_khan
869 Posts
MVP
Moderator
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Sep 30, 2008 10:46 PM|LINK
401.2 means that your server and the browser are following 2 different authentication protocols.... are you entering any sort of credentials for accessing this resource???
cosmin10
11 Posts
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Sep 30, 2008 11:14 PM|LINK
ma_khan
869 Posts
MVP
Moderator
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Sep 30, 2008 11:36 PM|LINK
I am not sure if IIS understand the authentication method you are using within your app... I would try and look in that direction ... 401.2 has got to do more with the authentication method used than just the permission on the resource...
WenJun Zhang...
472 Posts
Microsoft
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Oct 07, 2008 10:36 AM|LINK
Please reproduce the error again and open event viewer to check if there is any logon failure of anonymous account in security log. If so, post the details here.
cosmin10
11 Posts
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Oct 08, 2008 05:51 PM|LINK
cosmin10
11 Posts
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Oct 08, 2008 05:57 PM|LINK
bcross
2 Posts
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Jul 24, 2009 03:07 PM|LINK
im having the same issue however its only when i access the site via the IP. if i access by localhost, servername or url, it works fine.
rzwirtz
1 Post
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Sep 03, 2009 05:13 PM|LINK
I am having the same issue running an Asp.Net 2.0 site using Forms authentication. The issue only happens after the session has timed out and you attempt to access a resource in a secured folder. This has occured on both a development workstation running the asp.net development server and on an IIS 6 server.
vashikarafat...
1 Post
Re: Error message 401.2.: Unauthorized: Logon failed due to server configuration - IIS7
Apr 02, 2013 11:07 AM|LINK
Hi ,
Im calling a webpage via VBS file through Task scheduler.I am getting 401.2 IIS error when the Task scheduler runs.
But when the webpage is called manually it is working fine with the iis status 200
please help me resolve it