我正在尝试将简单的测试ServiceStack(版本4.0.30)应用程序部署到IIS 8.5上的Windows Server 2012..NET的版本是4.5.应用程序池设置为.NET 4.0,集成模式.在IIS中,我创建了一个新网站并将其映射到物理文件夹.该文件夹包含web.config,然后所有dll都在bin文件夹下.
我可以从Visual Studio 2013成功运行项目,但在部署之后,我收到以下这些错误消息.我找了其他类似的错误,但似乎没有看到任何相同的错误.
这是异常堆栈跟踪:
[NullReferenceException: Object reference not set to an instance of an object.]
ServiceStack.HttpHandlerFactory..cctor() +363
[TypeInitializationException: The type initializer for 'ServiceStack.HttpHandlerFactory' threw an exception.]
ServiceStack.HttpHandlerFactory..ctor() +0
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +159
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +256
System.Activator.CreateInstance(Type type, Boolean nonPublic) +127 …Run Code Online (Sandbox Code Playgroud) servicestack ×1