나는이 간단한 솔루션이 있기를 바라고 있습니다. MVC 3을 사용하고 있습니다. 내 솔루션에는 두 개의 프로젝트가 있고 MyApp.Domain이라는 클래스 라이브러리와 MyApp.WebUI라는 MVC 3 웹 응용 프로그램이 있습니다. MyApp.Domain에서내 첫 HttpHandler 만들기 - 작동하지 않습니다
, 나는이 파일이 있습니다 MyApp.WebUI에서
namespace MyApp.Domain.Test
{
public class MyHandler : IHttpHandler
{
public bool IsReusable
{
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
context.Response.Write("test");
}
}
}
, 프로젝트의 루트에서의 Web.config의를, 나는이 있습니다
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="*.testhandler" type="MyApp.Domain.Test.MyHandler"/>
</httpHandlers>
</system.web>
</configuration>
그러나 http://localhost:52233/test.testhandler으로 이동하면 404 오류가 발생합니다. 일종의 네임 스페이스 문제가 있다고 생각하지만 해결 방법을 모르겠습니다.
누구나이 문제를 발견 할 수 있습니까?
Nice catch, thanks. – Steven
도와주세요! 감사! –