简体   繁体   中英

ASP.NET - BotDetect Captcha Azure Web.Config Error

I integrated BotDetect Captcha into my C# ASP.NET MVC Application and everything worked well locally. However when I published to Azure, my app gives the error:

HTTP Error 500.23 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

Most likely causes:
This application defines configuration in the system.web/httpHandlers section.

Things you can try:
Migrate the configuration to the system.webServer/handlers section. You can do so manually or by using AppCmd from the command line - for example, %SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/". Using appcmd to migrate your application will enable it to work in Integrated mode, and continue to work in Classic mode and on previous versions of IIS.
If you are certain that it is OK to ignore this error, it can be disabled by setting system.webServer/validation@validateIntegratedModeConfiguration to false.
Alternatively, switch the application to a Classic mode application pool - for example, appcmd set app "Default Web Site/" /applicationPool:"Classic .NET AppPool". Only do this if you are unable to migrate your application.
(Set "Default Web Site" and "Classic .NET AppPool" to your application path and application pool name)

Detailed Error Information:
Module     ConfigurationValidationModule
Notification       BeginRequest
Handler    ExtensionlessUrlHandler-Integrated-4.0
Error Code     0x80070032

How can I solve this? Do I have to switch my Azure to "Classic Mode"? or is there a better way?

Thanks in advance.

The easiest thing to try would be to set your Azure Application to Classic Mode as stated in the error. This is very easily done.

Click on the configure tab; scroll down and you can choose "Classic" next to Managed Pipeline Mode. Make sure to hit "SAVE" after you change the settings.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM