2

Working on getting a ServiceStack.NET HelloWorld example up and going on Mono. Stuck at this error:

System.Web.HttpException
Failed to load httpHandler type `ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack'

Description: HTTP 500.Error processing request.

Details: Error processing request.
Exception stack trace:
at System.Web.Configuration.HttpHandlerAction.LoadType (System.String type_name) [0x00053] in /root/mono-2.11.4/mcs/class/System.Web/System.Web.Configuration_2.0/HttpHandlerAction.cs:170 at System.Web.Configuration.HttpHandlerAction.GetHandlerInstance () [0x00039] in /root/mono-2.11.4/mcs/class/System.Web/System.Web.Configuration_2.0/HttpHandlerAction.cs:296 at System.Web.Configuration.HttpHandlersSection.LocateHandler (System.String verb, System.String filepath, System.Boolean& allowCache) [0x0004b] in /root/mono-2.11.4/mcs/class/System.Web/System.Web.Configuration_2.0/HttpHandlersSection.cs:80 at System.Web.HttpApplication.LocateHandler (System.Web.HttpRequest req, System.String verb, System.String url) [0x0003b] in /root/mono-2.11.4/mcs/class/System.Web/System.Web/HttpApplication.cs:1603 at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler) [0x00028] in /root/mono-2.11.4/mcs/class/System.Web/System.Web/HttpApplication.cs:1627 at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) [0x00000] in /root/mono-2.11.4/mcs/class/System.Web/System.Web/HttpApplication.cs:1614 at System.Web.HttpApplication+<Pipeline>c__Iterator3.MoveNext () [0x00866] in /root/mono-2.11.4/mcs/class/System.Web/System.Web/HttpApplication.cs:1276 

Here's my web.config -- I think something must be wrong with it:

<?xml version="1.0"?>
<configuration>
  <!-- ServiceStack: Required to host at: /servicestack -->
  <location path="servicestack">
    <system.web>
      <httpHandlers>
        <add path="servicestack*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
      </httpHandlers>
    </system.web>

    <!-- Required for IIS7 -->
    <system.webServer>
      <modules runAllManagedModulesForAllRequests="true"/>
      <validation validateIntegratedModeConfiguration="false" />
      <handlers>
        <add path="servicestack*" name="ServiceStack.Factory" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" />
      </handlers>
    </system.webServer>
  </location>
  <!-- Required for MONO -->
  <system.web>
  <customErrors mode="Off"/>
    <httpHandlers>
      <add path="servicestack*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
    </httpHandlers>
  </system.web>
  <!-- Required for IIS7 -->
  <system.webServer>
    <!-- ServiceStack: Required -->
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>
</configuration>
3
  • you are working with Xamarin studio?
    – kunjee
    May 13, 2013 at 9:54
  • I do own Xamarin Studio--but this project, I just downloaded from ServiceStack's GitHub repository and built in VS2012, then uploaded to my server.
    – scotru
    May 13, 2013 at 23:28
  • This is under Apache/mod_mono as a virtual host if that's relevant.
    – scotru
    May 13, 2013 at 23:32

1 Answer 1

4

A configuration error in my Apache virtual host setup for the app. The applications path was not correctly specified in the MonoApplications directive in the Apache configuration file. Correcting the error resolved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.