locked
The server committed a protocol violation RRS feed

  • Question

  • User1887777618 posted

    I created a asp.net 3.5 web service using the visual studio service template. After that without modifying it i published it to the server.

    Now when i am trying to add the service reference it shows the below error.

    There was an error downloading 'http://test1.owdaro.com/service1.asmx/_vti_bin/ListData.svc/$metadata'.
    The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
    Metadata contains a reference that cannot be resolved: 'http://test1.owdaro.com/service1.asmx'.
    The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
    The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
    If the service is defined in the current solution, try building the solution and adding the service reference again.

    what settings or configurations do i need to fix it. Or can anyone tell me of a walthrough or steps to manually add the web reference.

    Lots of Thanks

    Monday, January 14, 2013 4:44 AM

Answers

  • User1887777618 posted

    finally solved this. The protocol violation error was occuring because the Response Header was not in accordance with HTTP 1.1 specification and one of its entry contained a space. So next time i put anything in response header, there wont be a space in it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 15, 2013 1:14 PM

All replies

  • User1887777618 posted

    finally solved this. The protocol violation error was occuring because the Response Header was not in accordance with HTTP 1.1 specification and one of its entry contained a space. So next time i put anything in response header, there wont be a space in it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 15, 2013 1:14 PM
  • User-166373564 posted

    Hi,

    Thanks for sharing your solution and experience to us.

    Glad that you've solved your problem by yourself and I come here to confirm and close the issue. If you have anything urgent, please feedback by creating another issue.

    Welcome to post your question on our forums in your future programming.

    Kind regards

    Tuesday, January 15, 2013 9:38 PM