目前,我从.ashx处理程序返回XML时,有此版本的自动完成控件.xml看起来像这样:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<States>
<State>
<Code>CA</Code>
<Name>California</Name>
</State>
<State>
<Code>NC</Code>
<Name>North Carolina</Name>
</State>
<State>
<Code>SC</Code>
<Name>South Carolina</Name>
</State>
Run Code Online (Sandbox Code Playgroud)
自动完成代码如下所示:
$('.autocompleteTest').autocomplete(
{
source: function(request, response) {
var list = [];
$.ajax({
url: "http://commonservices.qa.kirkland.com/StateLookup.ashx",
dataType: "xml",
async: false,
data: request,
success: function(xmlResponse) {
list = $("State", xmlResponse).map(function() {
return {
value: $("Code", this).text(),
label: $("Name", this).text()
};
}).get();
}
});
response(list);
},
focus: function(event, ui) {
$('.autocompleteTest').val(ui.item.label);
return false;
},
select: function(event, ui) {
$('.autocompleteTest').val(ui.item.label);
$('.autocompleteValue').val(ui.item.value);
return false;
} …Run Code Online (Sandbox Code Playgroud) Azure中有多个Web和辅助角色通过StackExchange.Redis库连接到我们的Azure Redis缓存,并且我们收到的定期超时使我们的端到端解决方案陷入停顿。下面是其中一个示例:
System.TimeoutException:执行GET流的超时:459,inst:4,mgr:不活动,队列:12,在StackExchange.Redis上qu = 0,qs = 12,qc = 0,wr = 0/0,in = 65536/0 .ConnectionMultiplexer.ExecuteSyncImpl [T](消息消息,ResultProcessor
1 processor, ServerEndPoint server) in c:\TeamCity\buildAgent\work\58bc9a6df18a3782\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1785 at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor1处理器,ServerEndPoint服务器)位于c:\ TeamCity \ buildAgent \ work \ 58bc9a6df18a3782 \ StackExchange.Redis \ StackExchange \ Redis \ RedisBase.cs:StackExchange.Redis.RedisDatabase的第79行.StringGet(RedisKey键,CommandFlags标志)位于c:\ TeamCity \ buildAgent \ work \ 58bc9a6df18a3782 \ StackExchange.Redis \ StackExchange \ Redis \ RedisDatabase.cs:OptiRTC.Cache.RedisCacheActions的第1346行。<> c__DisplayClass41.<Get>b__3() in c:\dev\OptiRTCAzure\OptiRTC.Cache\RedisCacheActions.cs:line 104 at Polly.Retry.RetryPolicy.Implementation(Action action, IEnumerableOptiRTC.Cache.RedisCacheActions.Get [T](String key,Boolean allowDirtyRead)中的1 shouldRetryPredicates,Func`1 policyStateFactory)位于OptiRTC.Cache.RedisCacheAccess的c:\ dev \ OptiRTCAzure \ OptiRTC.Cache \ RedisCacheActions.cs:line:107中.d__e4.MoveNext()在c:\ dev …