AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/nservicebus/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

Exception caveats

Component:
NServiceBus

NServiceBus cannot guarantee the handling of certain types of exceptions.

AccessViolationException

If an AccessViolationException is thrown, the endpoint will likely terminate. This is because an AccessViolationException thrown by the common language runtime cannot be caught by a try...catch block.

While this problem can be mitigated by using HandleProcessCorruptedStateExceptionsAttribute, Microsoft explicitly recommends not to do this.

Corrupted process state exceptions are exceptions that indicate that the state of a process has been corrupted.

For more information, see Handling Corrupted State Exceptions.

StackOverflowException

If a StackOverflowException is thrown, the process will terminate because the exception cannot be caught by a try...catch block.

OutOfMemoryException

The process may terminate if an OutOfMemoryException is thrown. This is because, even though this exception type is handled the same way as all others if the lack of sufficient memory persists, another instance of OutOfMemoryException may be thrown while the original exception is being handled.