惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
博客园 - 聂微东
N
Netflix TechBlog - Medium
B
Blog RSS Feed
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
The Hacker News
The Hacker News
Scott Helme
Scott Helme
MongoDB | Blog
MongoDB | Blog
C
CERT Recently Published Vulnerability Notes
L
Lohrmann on Cybersecurity
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
T
The Exploit Database - CXSecurity.com
S
Securelist
MyScale Blog
MyScale Blog
A
Arctic Wolf
V2EX - 技术
V2EX - 技术
The GitHub Blog
The GitHub Blog
Simon Willison's Weblog
Simon Willison's Weblog
H
Hacker News: Front Page
D
DataBreaches.Net
S
Secure Thoughts
腾讯CDC
TaoSecurity Blog
TaoSecurity Blog
Project Zero
Project Zero
H
Help Net Security
P
Privacy International News Feed
Cloudbric
Cloudbric
博客园_首页
Latest news
Latest news
小众软件
小众软件

博客园 - SAL

【转】WinForm窗体显示和窗体间传值 【转】Emgu CV on C# (五) —— Emgu CV on 局部自适应阈值二值化 常用的几种OCR方法/组件小结(C#) URL重写html后Html文件打不开解决办法 【转】SQL SERVER 2005/2008 中关于架构的理解 Visual Studio、.net framework、CLR与JDK、JRE、JVM、Eclipse 【转】让Entity Framework不再私闯sys.databases 【转】MVC Model建模及Entity Framework Power Tool使用 【转】NuGet学习笔记 【转】一点一点学ASP.NET之基础概念——HttpModule 【转】如何在ASP.NET 2.0中定制Expression Builders 【转】C#微信公众平台开发者模式开启代码 【转】合理的布局,绚丽的样式,谈谈Winform程序的界面设计 【转】winform程序textbox滚动条保持在最下面 内容不闪烁 【转】检测到在集成的托管管道模式下不适用的ASP.NET设置的解决方法(非简单设置为【经典】模式)。 【转】C#中的委托,匿名方法和Lambda表达式 【转】HttpWebRequest 保持session 【转】“无法从http://XXX/XXX.svc?wsdl获取元数据”错误的解决方法 【转】开源Word读写组件DocX介绍与入门
【转】WCF 服务第一次调用慢的问题
SAL · 2013-07-31 · via 博客园 - SAL

写了一个WCF Serivces供外部程序通过.NET Businesss Connector调用AX的代码,第一次调用的时候总是很慢,有时候甚至超过1分钟,访问地址改成http://localhost的时候第一次调用又很快,改成IP地址后第一次就非常慢。

之所以这样是因为通过添加服务引用的方式生成的配置文件里,默认把useDefaultWebProxy设置为true了,这种情况下在连接WCF Serives的时候客户端总是尝试查找代理,找不到后再直接连,这个时间很长,所以会出现超时,解决办法是把这个属性改成false,不让它找代理。

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
          
            <basicHttpBinding>
                <binding name="BasicHttpBinding_AXServices" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="true" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://192.168.0.110:8889/AXServices" binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_AXServices" contract="AXServices.AXServices"
                name="BasicHttpBinding_AXServices" />
        </client>
    </system.serviceModel>
</configuration>