Type resolution error during ASP.NET precompilation

限于喜欢 提交于 2019-12-06 05:10:01

It appears that the aspnet_compiler.exe program uses .NET Remoting to communicate with the ASP.NET runtime. When the ASP.NET runtime throws my custom exception, the aspnet_compiler.exe is unable to deserialize it because it cannot resolve the type of the custom exception because my App.Project assembly is not in the GAC nor available via path search to aspnet_compiler.exe.

To test this hypothesis, I copied the App.Project assembly into the same directory as aspnet_compiler.exe (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) and performed the precompilation. When the custom exception is thrown, it comes out with the normal stack trace I would expect and the SerializationException does not occur.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!