WCF客户端可以正常使用IIS Express,但不适用于本地IIS [英] WCF client works fine IIS express but not with Local IIS

查看:289
本文介绍了WCF客户端可以正常使用IIS Express,但不适用于本地IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Mvc应用程序。我正在尝试使用https服务。当我使用IIS express 主持项目时,它工作正常

实际上问题是我的wcf客户端只有在Fiddler捕获时才能正常工作数据包,奇怪但真实....我一直保证通过使用Using()关闭或中止连接,并在客户端的配置方法中调用下面的方法...



I have a Mvc App. I am trying to reach a https service.When I host the project with IIS express it works fine
In fact the problem is that my wcf client only works fine when Fiddler captures the packets ,strange but true....All the time I guarantee to close or abort connection by using "Using()" and call the method below inside the client's dispose method...

public static void DisposeServiceClient(ICommunicationObject client)
{
    if (client != null)
    {
        if (client.State == System.ServiceModel.CommunicationState.Faulted)
        {
            client.Abort();
        }
        else
        {
            client.Close();
        }

    }
}







顺便说一句,我使用代理,我已经读过有关Fiddler更改代理的问题。问题可能是代理,但仍然无法弄清楚如何解决它

http://stackoverflow.com/questions/4801189/httpwebrequest-doesnt-work-except-when-fiddler-is-running [ ^ ]






By the way I am using proxy ,I have read about Fiddler changing proxy.The issue may be proxy but still couldnt figure out how to resolve it
http://stackoverflow.com/questions/4801189/httpwebrequest-doesnt-work-except-when-fiddler-is-running[^]

推荐答案

无需为此启用SSL应该正常工作,你有没有试过IIS通过视觉工作室,去财产 - >网络 - >使用本地IIS Web服务器不检查iis express
no need to enable SSL for this it should work normally, have you tried IIS trough visual studio ,go to property -> web -> use local IIS web server do not check iis express


这篇关于WCF客户端可以正常使用IIS Express,但不适用于本地IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆