问题验证码Asp.NET MVC [英] Problem captcha Asp.NET MVC

查看:57
本文介绍了问题验证码Asp.NET MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的MVC应用程序中存在一个由HttpHandler(.ashx)调用的验证码.

I have a captcha in my MVC application that is called from a HttpHandler (.ashx).

它在Visual Studio开发人员服务器中正常工作.

It works fine in Visual Studio developer server.

我只是在Global.asax中进行配置:

I just configure in Global.asax:

        public static void RegisterRoutes(RouteCollection routes)
        {    
            routes.IgnoreRoute("{filename}.ashx/{*pathInfo}");//captcha

.........

它将忽略Visual Studio开发人员服务器中的关注路径:

It ignores the follow path in Visual Studio developer server:

http://localhost:5011/captcha.ashx?id=2342556fgh767896sa

问题现在我正在IIS 7中运行该应用程序.现在要忽略的路径已更改为:

Problem is now i'm running the application in IIS 7.Now the path to be ignored has changed to:

http://localhost/Sce/captcha.ashx?id=2342556fgh767896sa

它不再起作用了.

有什么想法可以忽略新路径吗?

Any ideas to ignore the new path?

更新:

我已经解决了我的问题.需要在web.config中添加处理程序,而不必在< httpHandler> 部分中添加.必须位于< system.webserver> 部分导致即时通讯使用IIS 7.0

I´ve solved my problem.Need to add the handler in web.config,but not in <httpHandler> section.Must be in <system.webserver> section cause im using IIS 7.0

推荐答案

将处理程序添加到 web.config system.webserver 部分.

Add the handler to the system.webserver section of your web.config.

这篇关于问题验证码Asp.NET MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆