1

I am using create-sent.net version 2.2 for CampaignMonitor. But recently I get this error:

System.Net.WebException: The remote server returned an error: (406) Not Acceptable.

at createsend_dotnet.HttpHelper.MakeRequest[T,U,EX](String method, CreateSendCredentials authCredentials, String path, NameValueCollection queryArguments, T payload)

from the service. Would there be any problem in HTTP header content-type?

jazb
  • 5,498
  • 6
  • 37
  • 44

2 Answers2

4

Figured out the problem. The API was moved to HTTPS only. but inside our Http Request, we used HTTP URL. due to that reason the API returns (406) Not Acceptable code.

1

Your service is saying that the response type returned is not provided in the Accept HTTP header in your Client request.

Ref: http://en.wikipedia.org/wiki/List_of_HTTP_header_fields

Find out the response (content type) returned by Service. Provide this (content type) in your request Accept header.

So you will have to supply a different one which is acceptable to the server.

jazb
  • 5,498
  • 6
  • 37
  • 44