找到了解决办法
解决方法参照:
https://stackoverflow.com/questions/16567197/publish-web-application-with-unsafe-code