我正在做一个ASP.NET MVC 3 Web服务,我一直在间歇性地得到这个例外.
堆栈跟踪:
Server Error in '/' Application.
A route named 'ListTables' is already in the route collection. Route names must be unique.
Parameter name: name
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: A route named 'ListTables' is already in the route collection. Route names must be unique.
Parameter name: name …Run Code Online (Sandbox Code Playgroud) 我想在我的ASP.NET Web API应用程序中为某些类型设置一个契约序列化程序.我可以在App_Start/FormatterConfig.cs中全局设置设置,如下所示:
public static void RegisterGlobalFormatters(MediaTypeFormatterCollection formatters)
{
jsonSerializerSettings.ContractResolver = new CriteriaContractResolver(new List<string>(new string[]{"mdData", "name", "label"}));
Run Code Online (Sandbox Code Playgroud)
...
但是我怎样才能将它应用于一个或多个特定的类类型?
我想这样做的原因是因为我需要能够根据Web服务的配置或参数设置在运行时应该序列化哪些字段,类似于这些示例:
当我尝试在Visual Studio 2013中暂停我的工作时,它会出现以下错误:
值不能为空.参数名称:parentHierarchy
我正在使用内部TFS 2012服务器,之后我能够搁置更改.什么可能导致这个?

我正在使用ODBC驱动程序连接到Caché数据库,我想进行查询以获取模式列表.在Microsoft SQL Server中,我可以使用如下查询:
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
Run Code Online (Sandbox Code Playgroud)
我怎么能在Caché做到这一点?我也使用ADO.NET架构集合,但这些架构似乎不可用.
有没有办法重试ASIHTTPRequest?我在REST服务中使用自定义身份验证而不是基本HTTP身份验证,如果会话已过期,我想重试请求.在请求上第二次调用startAsynchronous会导致异常.我想做这样的事情:
[request setCompletionBlock:^{
if ([request responseStatusCode] == 500)
{
// try to login again in case token expired
[server loginAndRetryRequest:request];
} else {
// parse response
}
}];
Run Code Online (Sandbox Code Playgroud)
loginAndRetryRequest:将执行另一个ASIHTTPRequest登录,当它完成时,它将从它的CompletionBlock再次启动原始请求(假设这可能以某种方式)?