Mono 3.0,Ubuntu 12.10,Nginx和ServiceStack [英] Mono 3.0, Ubuntu 12.10, Nginx and ServiceStack

查看:81
本文介绍了Mono 3.0,Ubuntu 12.10,Nginx和ServiceStack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据ServiceStack网站,应该很容易在Mono上安装和运行ServiceStack并在Linux上运行.我已经在系统(Ubuntu 12.10)上安装了nginx,mono 3.0和fastcgi.我已经使用教程来使Nginx和fastcgi运行.在MonoDevelop中,我右键单击该项目,然后单击工具"->部署到Web".这将生成我要部署的文件.然后,我已将dll复制到Ubuntu上的/var/www/project_folder.接下来,我启动了Nginx和fastcgi.我的web.config文件如下所示:

According to the ServiceStack website, it should be easy to get ServiceStack up and running on Linux with Mono. I have installed nginx, mono 3.0 and fastcgi on the system (Ubuntu 12.10). I have used this tutorial to get Nginx and fastcgi running. In MonoDevelop I have right clicked on the project, then Tools -> Deploy to web. This generates the files I want to deploy. Then I have copied the dlls to /var/www/project_folder on Ubuntu. Next I started Nginx and fastcgi. My web.config file looks like this:

<?xml version="1.0"?>
<configuration>
   <system.web>
      <customErrors mode="Off"/>
      <httpHandlers>
         <add path="*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*" />
      </httpHandlers>
      <compilation>
         <assemblies>
            <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
         </assemblies>
      </compilation>
   </system.web>
   <!-- Required for IIS 7.0 (and above?) -->
   <system.webServer>
      <validation validateIntegratedModeConfiguration="false" />
         <handlers>
            <add path="*" name="ServiceStack.Factory" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" />
         </handlers>
    </system.webServer>
</configuration>

我尚未将XSP添加到服务器. 当我转到服务器上的网页(远程地址)时,收到一条错误消息,提示它找不到ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory. web.config文件与包含此ServiceStackHttpHandlerFactory的dll位于同一文件夹中.

I have not added XSP to the server. When I go to the webpage on the server (remote address) I get an error telling me that it can't find ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory. The web.config file is located in the same folder as the dll containing this ServiceStackHttpHandlerFactory.

任何想法是什么原因造成的?

Any ideas what's causing this?

推荐答案

首先,如果您尚未阅读它们,则应阅读Wiki文档,以获取

Firstly, if you haven't read them yet, you should go through the wiki docs on getting ServiceStack running on Mono/Linux.

您复制了哪些ServiceStack.dll,又从何处获得的? ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory是ASP.NET入口点,在核心ServiceStack.dll二进制文件中可用.

What ServiceStack.dlls have you copied and where did you get them from? The ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory is the ASP.NET entry point and it's available in the core ServiceStack.dll binary.

如果找不到入口点ServiceStack.dll,则Mono FastCGI/ASP.NET主机中找到ServiceStack.dll时必须存在问题,在ASP.NET应用程序中它应该位于/bin中相对于您的Web.Config所在的文件夹.如果所有文件都放在正确的位置,则可能是文件权限问题.

If it can't find the entry point ServiceStack.dll then there must be a problem in the Mono FastCGI/ASP.NET Host finding the ServiceStack .dlls, in an ASP.NET application it should be in the /bin folder relative to where your Web.Config is. If all the files are in the right place than it might be a file permission problem.

这篇关于Mono 3.0,Ubuntu 12.10,Nginx和ServiceStack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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