NServiceBus - 输入串行未注册 - 修复? [英] NServiceBus - Type was not registered in the serializer - Fix?

查看:131
本文介绍了NServiceBus - 输入串行未注册 - 修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Web应用程序中使用NServiceBus每次我们部署我们的code到生产,我们要删除临时文件夹中:

We are using NServiceBus in a web application and each time we deploy our code to production, we have to delete the Temporary Files in the folder:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

我们正在按照指示在这里解决这个问题:

We are following the instructions here to fix this:

http://www.nservicebus.com/faq/TypeNotRegisteredInSerializer.aspx

我在想,如果有一个更永久性的修复这个?我觉得我这个每次战斗我部署新的code。什么是从code处理这个最好的方法是什么?如果还是不行,是不是最好还是停止的应用程序池,删除文件,每次重新启动应用程序池我部署新的code?

I was wondering if there is a more permanent fix to this? I feel like I am fighting with this every time I deploy new code. What is the best way to handle this from code? If that doesn't work, is it best to just stop the application pools, delete the files, and restart the app pools every time I deploy new code?

感谢您的任何建议。

推荐答案

而不是使用Configure.WithWeb(),请尝试,而不是:

Instead of using Configure.WithWeb(), try instead:

Configure.With(HttpRuntime.BinDirectory)

这样的话,它会搜索实际的bin文件夹中部署的Web应用程序,而不是临时文件夹。这也是nservicebus 3.0的默认行为。

That way, it will search the actual bin folder in your deployed web application instead of the temporary folder. This is also the default behavior in nservicebus 3.0.

这篇关于NServiceBus - 输入串行未注册 - 修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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