【问题标题】:The Reason Phrase Must not Contain New Line Characters原因短语不能包含换行符
【发布时间】:2015-06-26 05:41:31
【问题描述】:

我在尝试通过应用程序执行 SQL 查询时遇到错误。

错误:原因短语不能包含换行符。

当我关闭集成安全选项时,错误消失了。

请告知为什么会出现此错误以及其背后的原因是什么?

【问题讨论】:

标签: c# sql-server database asp.net-web-api


【解决方案1】:

这不是sql-server的错误。属性问题HttpResponseMessage.ReasonPhrase

public string ReasonPhrase
{
    get { return reasonPhrase; }
    set
    {
        if ((value != null) && ContainsNewLineCharacter(value))
        {
            throw new FormatException("The reason phrase must not contain new-line characters.");
        }
        CheckDisposed();

        reasonPhrase = value; // It's OK to have a 'null' reason phrase
    }
}

请详细描述您的问题

【讨论】:

    猜你喜欢
    • 2020-02-07
    • 1970-01-01
    • 1970-01-01
    • 2018-09-11
    • 1970-01-01
    • 1970-01-01
    • 2019-11-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多