简体   繁体   中英

How to get a safecontrol entry into manifest.xml with WSPBuilder project

Upon taking the default sharepoint master page for MySite, making some changes, and making a wsp out of it with WSPBuilder, I come to these errors in my logs:

http://spoint/MySite/_catalogs/masterpage/MySite.master - An unexpected error has been encountered in this Web Part. Error: The control with virtual path '_controltemplates/Welcome.ascx' is not in the safe controls list for web at URL ' http://spoint/MySite '., Source: [UnsafeControlException: The control with virtual path '_controltemplates/Welcome.ascx' is not in the safe controls list for web at URL ' http://spoint/MySite ' (stack trace omitted)

http://spoint/MySite/_catalogs/masterpage/MySite.master - An unexpected error has been encountered in this Web Part. Error: The control with virtual path '_controltemplates/DesignModeConsole.ascx' is not in the safe controls list for web at URL ' http://spoint/MySite '., Source: [UnsafeControlException: The control with virtual path '_controltemplates/DesignModeConsole.ascx' is not in the safe controls list for web at URL ' http://spoint/MySite ' (stack trace ommited)

So, this masterpage does in fact use these OOTB controls and so I guess I need to get them safecontrolled. And I guess I want to do this via the manifest.xml. But I do not see how to make WSPBuilder do this.

WSPBuilder will only create SafeControls tags for objects that inherits from the "Control" class. This is to speed up processing of the WSP package. A quick fix, could be to create a empty class that inherits from webcontrol and use the same namespace as the ASCX.

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