SSRS Subscription fails with Protocol Violation (server committed protocol violation)

Chandrika Ramisetti 6 Reputation points
2021-12-30T15:40:12.307+00:00

Hi
we are facing issues with ssrs reports recently. Sometimes reports are delivered properly while most of the times they are not. Error message its showing in the ssrs web portal "Failure sending mail: One or more errors occurred.Mail will not be resent". When we check the error logs of the report it is throwing "Server committed protocol violation" error
In the event viewer its showing an error with "event ID 137" and source as report server PBIRS. Nothing has changed with the server or configuration.
Can someone help us to find the solution ASAP

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,064 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Lorenzo Morello 1 Reputation point
    2021-12-30T15:47:06.33+00:00

    Hi,

    You need to add this line of code in your web.config inside <system.net> section under configuration section.

    <system.net>
    <settings>
    <httpWebRequest useUnsafeHeaderParsing="true" />
    </settings>
    </system.net>


  2. Joyzhao-MSFT 15,636 Reputation points
    2021-12-31T02:34:09.757+00:00

    Hi @Chandrika Ramisetti

    Server committed protocol violation

    One of the most common cause of this error is the corrupt or missing headers in the request.
    IIS checks if headers are complete in the request. If there is an issue with headers, it may reject the request.
    The change in the requests and responses could be made by network devices in between the client and IIS server.

    Please following these steps:

    (1) Set UseUnsafeHeaderParsing value to “true” in web.config to ignore the header validation errors.

    <system.net>      
    <settings>          
    <httpWebRequest useUnsafeHeaderParsing="true" />      
    </settings>  
    </system.net>  
    

    (2) Set KeepAlive to “false” to prevent keeping the connection open which may solve the violation error

    <configuration>     
    <system.webServer>        
    <httpProtocol allowKeepAlive="false" />     
    </system.webServer>  
    </configuration>  
    

    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Giorgio Repetti 1 Reputation point
    2022-01-25T14:36:46.687+00:00

    Good Evening Experts,
    i have the same issue and i'm not sure where to add the lines, like AshishSinha.
    Please coul you give us more details?

    0 comments No comments

  4. Kevin Kohfeldt 1 Reputation point
    2022-01-25T20:39:52.017+00:00

    Same issue here as well. I cannot find the <system.net> section on the web.config file under the C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.