I am working on an asp.net mvc web application, but i need to change the authentication type from form to windows, so is there a way to do so, and if i am publishing the application using IIS will my change work for IIS?
i have enabled the windows authenticationand i disable Anonymous authenticationon the IIS manager, but when i run my mvc application i got the following error:-
Server Error in '/' Application.
Access is denied.
Description:An
error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
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.
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
johnjohn1231...
Participant
922 Points
871 Posts
How can i change the authentication type for my asp.net mvc web application from form to windows ...
Jan 03, 2013 09:04 AM|LINK
I am working on an asp.net mvc web application, but i need to change the authentication type from form to windows, so is there a way to do so, and if i am publishing the application using IIS will my change work for IIS?
BR
sp00k
Participant
1916 Points
435 Posts
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 03, 2013 09:28 AM|LINK
check your web.config
<authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="2880" /> </authentication>reffer: http://msdn.microsoft.com/en-us/library/aa291347%28v=vs.71%29.aspx
johnjohn1231...
Participant
922 Points
871 Posts
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 03, 2013 11:02 AM|LINK
i have enabled the windows authentication and i disable Anonymous authentication on the IIS manager, but when i run my mvc application i got the following error:-
Server Error in '/' Application.
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
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.
CPrakash82
All-Star
18284 Points
2841 Posts
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 03, 2013 11:13 AM|LINK
Perhaps this is your solution- http://support.microsoft.com/kb/942043
johnjohn1231...
Participant
922 Points
871 Posts
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 03, 2013 11:51 AM|LINK
i have already made all these setting in the resolution sections , but the error is still ocuuring
ignatandrei
All-Star
134983 Points
21638 Posts
Moderator
MVP
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 03, 2013 12:09 PM|LINK
did you
?
johnjohn1231...
Participant
922 Points
871 Posts
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 03, 2013 12:38 PM|LINK
i should have the premission ,,, but how can i check this?
ignatandrei
All-Star
134983 Points
21638 Posts
Moderator
MVP
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 03, 2013 12:47 PM|LINK
with windows explorer
johnjohn1231...
Participant
922 Points
871 Posts
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 04, 2013 12:03 AM|LINK
april_123456
Participant
775 Points
246 Posts
Re: How can i change the authentication type for my asp.net mvc web application from form to wind...
Jan 04, 2013 02:20 AM|LINK
Hello there,
You need to install add Windows Authentication to the IIS role through server manager if you didn't do it previously.
In order to check whether or not you have permission to view the directory based on the credentials yous supplied -
http://support.microsoft.com/kb/253667
Also, try looking at this: http://forums.asp.net/t/1260071.aspx/1 (it is a similar situation)
With Kind Regards,