[英]Hosting WPF application within IIS
I have created a WPF application (contains 8 projects). 我创建了一个WPF应用程序(包含8个项目)。 one project is of type (Class Library) ,this dll contains class which implement System.Web.IHttpHandler as the following.
一个项目是(类库)类型的,此dll包含实现System.Web.IHttpHandler的类,如下所示。
public class ReportFileHttpHandler : IHttpHandler
{
public bool IsReusable
{
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
// some code
}
}
this HttpHandler is designed to interrupt the IIS request and handle the requrest of the xml file. 此HttpHandler旨在中断IIS请求并处理xml文件的要求。
I also created a web.config file which exists inside this dll. 我还创建了一个存在于此dll中的web.config文件。
<system.webServer>
<handlers>
<add verb="*" path="*.xml" type="ReportFileHttpHandler" name="ReportFileHttpHandler"/>
</handlers>
Every thing is good here. 这里的一切都很好。 I want to do the following : I want to test the code inside the "ReportFileHttpHandler" ,so I need to host the my WPF application within (inside) the IIS to make test.
我要执行以下操作:我想测试“ ReportFileHttpHandler”中的代码,因此需要在IIS中(内部)托管WPF应用程序以进行测试。 in this way I can write URL inside the Browser (which end with .xml) to execute the code in the method
这样,我可以在浏览器中写入URL(以.xml结尾)以执行方法中的代码
public void ProcessRequrest(HttpContext context)
How can I Host the WPF application inside the IIS ? 如何在IIS中托管WPF应用程序?
any idea will be helpful, thank you 任何想法都会有所帮助,谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.