我将MVC 3项目从aspx转换为razor,这一行出现了问题: ASPX:
<%@ Register TagPrefix="cc1" Namespace="WebControlCaptcha" Assembly="WebControlCaptcha" %>剃须刀:
@{
Register TagPrefix="cc1" Namespace="WebControlCaptcha" Assembly="WebControlCaptcha";
} 以下是错误:
Compiler Error Message: CS1002: ; expected提前谢谢。
发布于 2013-08-15 19:15:55
您可以在web.config内部视图文件夹中放置以下键:
<configuration>
<system.web>
<pages>
<controls>
<add assembly="WebControlCaptcha" namespace="WebControlCaptcha" tagPrefix="cc1" />
</controls>
</pages>
</system.web>
</configuration>发布于 2016-02-12 16:28:01
在我的例子中,应用程序池被设置为使用.NET Framework2.0的集成管道模式。验证码图像不会产生。我将应用程序池更改为使用“经典”,同时保留了.NET框架选项,这解决了图像生成问题。
https://stackoverflow.com/questions/18259947
复制相似问题