2013-08-05 1 views
2

IIS 8.0에서 실행되는 Arvixe ASP.NET 서버에서 ServiceStack이 작동하는 데 문제가 있습니다.IIS 8.0의 ServiceStack 문제 Arvixe 서버

http://servicestack.net/ServiceStack.Hello/에 대한 자습서를 따라 비어있는 ASP.NET 웹 응용 프로그램을 만들고 패키지 관리자 콘솔에서 "PM> Install-Package ServiceStack.Host.AspNet"명령을 실행했습니다.

이렇게하면 localhost의 Visual Studio에서 웹 응용 프로그램을 실행할 수 있으며 Todo 응용 프로그램이 제대로 작동하고/hello/{Name} URL을 호출하여 올바른 결과를 얻을 수 있습니다.

그런 다음 프로젝트를 IIS 8.0에서 실행되는 Arvixe ASP.NET 서버에 업로드하려고 시도했지만 여기서는 작동하지 않습니다. 할 일 애플리케이션로드되지만 항목을 추가하고, 작동하지 않습니다 나는/메타 데이터에 액세스하려고 할 때 또는/인사/{이름} 나는 HTTP 오류 404.0 얻을 -과 같이 찾을 수 없음 :

enter image description here

I을 ServiceStack에 완전히 익숙하지 않으므로이 문제를 해결하는 방법을 모르겠습니다. 누군가가이 일을하기 위해 내가해야 할 일을 말할 수 있습니까?

편집

내의 Web.config

<?xml version="1.0" encoding="utf-8"?> 

<!-- 
    For more information on how to configure your ASP.NET application, please visit 
    http://go.microsoft.com/fwlink/?LinkId=169433 
    --> 

<configuration> 
    <connectionStrings> 
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> 
    </connectionStrings> 

    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 

    <authentication mode="Forms"> 
     <forms loginUrl="~/Account/Login.aspx" timeout="2880" /> 
    </authentication> 

    <membership> 
     <providers> 
     <clear /> 
     <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> 
     </providers> 
    </membership> 

    <profile> 
     <providers> 
     <clear /> 
     <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /> 
     </providers> 
    </profile> 

    <roleManager enabled="false"> 
     <providers> 
     <clear /> 
     <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /> 
     <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /> 
     </providers> 
    </roleManager> 

    <httpHandlers><add path="*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*" /></httpHandlers></system.web> 

    <system.webServer> 
    <modules runAllManagedModulesForAllRequests="true" /> 
    <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> 
+0

여기서 무엇이 잘못되었는지를 파악하는 것은 불가능합니다. 게시 web.config 및 Global.asax –

+0

나는 직접 코드를 편집하지 않았으며 방금 ServiceStack.Host.AspNet을 설치하고 상자에서 바로 실행했습니다. 따라서 web.config와 Global.asax는 다운로드 된 것입니다. 지금까지 Global.asax가 비어 있고 AppHost 클래스 등이 App_Start라는 폴더에 있다고 말할 수 있습니다. – Daniel

+0

저는 이것이 IIS 문제라고 생각하지 않습니다. 새 프로젝트를 사용하는 경우 global.asax에서 몇 가지 설정을해야합니다. 자세한 내용은 여기에 있습니다. http://stackoverflow.com/questions/12361860/service-stack-on-mvc4/12797075#12797075. 그것을 확인하시기 바랍니다. – kunjee

답변

1

나는 문제가 무엇인지 발견

해결하고자 : 내가 수동으로 시각에 의해 생성 된 Web.config 파일을 업로드 할 수 있었다 사진관. 이 파일이 웹 서버의 루트에 업로드되면 예가 제대로 작동합니다. Visual Studio 2010에서 게시를 사용하면 Web.config 파일이 서버에 자동으로 업로드되지 않습니다.

0

실제로 Visual Studio 2010으로 웹 사이트를 게시하면 web.config가 업로드됩니다. web.config를 업로드하지 못하게합니다.