自定义控件部署到母版页查询 [英] Custom control deployment to master page query

查看:69
本文介绍了自定义控件部署到母版页查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个自定义控制器,并设法使用Visual Studio中的本地化部署方法部署到我的母版页并按预期工作,但我尝试通过.wsp文件而不是.dll方法进行部署。所以现在它已经为Sharepoint部署了
并且已经全局激活。



我添加了对web.config文件的引用;
$
< SafeControl Assembly =" customcontrolcanonical,Version = 1.0.0.0 ,Culture = neutral,PublicKeyToken = 98fba23c6fac0b64"命名空间= QUOT; CanonicalControl"类型名= QUOT * QUOT;安全= QUOT;真" SafeAgainstScript = QUOT;真" />



在主文件中注册;


<%@ Register TagPrefix =" HWL"名称空间= QUOT; CanonicalControl" Assembly =" customcontrolcanonical,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = 98fba23c6fac0b64" %> 


在主文件中调用它;


< HWL:CanonicalControl runat =" server" id =" CanonicalOverride">< / HWL:CanonicalControl>



但是我收到了错误;


分析程序错误消息:  未知服务器标签'HWL:CanonicalControl'。



任何人都可以放弃任何光吗?



非常感谢!

解决方案


尝试将dll打包为'GlobalAssemblyCache',如下面的线程所示。



https://social.technet.microsoft.com/Forums/en-US/ 7642b88a-4046-4429-a9d2-e2088c86f3fd / deploying-custom-dlls-in-sharepoint-2013?forum = sharepointadmin


最好的问候,



I have created a custom controller and have managed to deploy to my master page using the localised deploy method from Visual Studio and working as intended however I am trying to deploy via .wsp file rather than the .dll method. So now it's currently deployed to Sharepoint and have activated globally.

I have added the reference to the web.config file;
<SafeControl Assembly="customcontrolcanonical, Version=1.0.0.0, Culture=neutral, PublicKeyToken=98fba23c6fac0b64" Namespace="CanonicalControl" TypeName="*" Safe="True" SafeAgainstScript="True" />

Register in master file;

<%@ Register TagPrefix="HWL" NameSpace="CanonicalControl" Assembly="customcontrolcanonical, Version=1.0.0.0, Culture=neutral, PublicKeyToken=98fba23c6fac0b64" %> 

Calling it within the master file;

<HWL:CanonicalControl runat="server" id="CanonicalOverride"></HWL:CanonicalControl>

But I get the error;

Parser Error Message: Unknown server tag 'HWL:CanonicalControl'.

Can anyone shed any light please?

Many thanks!

解决方案

Hi,

Try to package the dll as ‘GlobalAssemblyCache’ as below thread.

https://social.technet.microsoft.com/Forums/en-US/7642b88a-4046-4429-a9d2-e2088c86f3fd/deploying-custom-dlls-in-sharepoint-2013?forum=sharepointadmin

Best Regards,

Lee


这篇关于自定义控件部署到母版页查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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