-
Net4.0以上的项目,一定要为Web.config中<page>标签添加controlRenderingCompatibilityVersion和clientIDMode两个属性。
<pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID">
<controls>
<add assembly="FineUI" namespace="FineUI" tagPrefix="f" />
</controls>
</pages>
-
IIS集成模式(VS2013、VS2015的默认设置)
需要将 httpModules 和 httpHandlers 从 system.web 中删除,并添加到 system.webServer 中,如下所示:
<system.webServer>
<modules>
<add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
</modules>
<handlers>
<add name="FineUIResourceHandler" verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI"/>
</handlers>
</system.webServer>
你也可以直接将官网示例源代码中的 Web.config_for_VS2013 改名为 Web.config 使用。
-
如果项目中使用了表单认证,需要添加 res.axd 的例外
如果在 system.web 下有类似如下的表单验证配置:
<system.web>
<authentication mode="Forms">
<forms name=".ASPXFORMSAUTH" loginUrl="~/default.aspx" timeout="120" defaultUrl="~/main.aspx" protection="All" path="/"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
则需要添加 res.axd 例外,否则所有的图标字体都显示不了:
</system.web>
<location path="res.axd">
<system.web>
<authorization>
<allow users ="*" />
</authorization>
</system.web>
</location>
-
注意引用的Newtonsoft.Json.dll版本
FineUI.dll只有一个版本,无论你的项目是2.0、3.5、4.0、4.5,都只需要引用同一个FineUI.dll即可。
Newtonsoft.Json.dll在不同的NET版本有不同的DLL,建议您使用Visual Studio的NuGet工具下载最新的JSON库: