[英]jni4net - System.Runtime.Remoting.RemotingException
[英]System.Runtime.Remoting.RemotingException: Requested Service not found after Hosting Rest web service implementing IhttpHandler
錯誤信息
在Hosting Rest Web服務實現IhttpHandler之后,我得到System.Runtime.Remoting.RemotingException:找不到請求的服務,
下面是代碼
public class MyService:IHttpHandler
{
#region Handler
bool IHttpHandler.IsReusable
{
get { throw new NotImplementedException(); }
}
void IHttpHandler.ProcessRequest(HttpContext context)
{
HttpResponse objResponse = context.Response;
objResponse.Write("<html><body><h1>Hell world");
objResponse.Write("</body></html>");
}
}
我通過更改web.config中的處理程序上的preCondition屬性來解決它。 該屬性應與應用程序使用的應用程序輪詢匹配。
<handlers>
<add name="test" path="bill.soap" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
</handlers>
更多詳細信息: http : //helpcentral.componentone.com/netHelp/AR9/ConfigureHTTPHandlersinIIS7x.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.