Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

plugin error accessing server that has implemented X-FRAME-OPTION = DENY

$
0
0

I'm administering  on premise instance of MS dynamics 365 V8 .  this instance contains a plugin that sync data to a FileNet instance using SOAP call .  this process has been working in production for several year. recently our server administrator has implemented a new security protocol to turn on the "xframe-option = DENY".  after this change all calls to the server are return the following error :

Exception message: The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
the information about the call is the following :
  • MS Dynamics on premise V8.2
  • Vendor API call within C# plugin
  • Plugin is registered in the Sandbox
My question is has any one encountered this issues and is there a soliton is to override one of the header setting .   research that I've done has brought some option but most are for ASP.net and require changes in the app.config file (see below)  .  as far as I know dynamics plugin do not have access to config files.  Research, the consensus is to use the following in your C# or ASP.NET application :
Add following to app.config :
<configuration>
 <system.net>
  <settings>
   <httpWebRequest useUnsafeHeaderParsing="true" />
  </settings>
 </system.net>
</configuration>
Additional test done : Since I'm using a Vendor API call it not always possible to determine if the problem is with the API from the connection .  I was able successfully test the error using a simple HTTP request in my plugin

try
{
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
ServicePointManager.Expect100Continue = true;
WebResponse responseObj = request.GetResponse();
Stream dataStream = responseObj.GetResponseStream();
StreamReader streamReader = new StreamReader(dataStream);
response += "Response: \n";
response += streamReader.ReadToEnd();
entity["statuscode"] = new OptionSetValue(1);
}
catch (Exception ex)
{
response += "Error: " + ex.Message;
response += "\n";
response += ex.StackTrace;
response += "\n\n";
response += ex.HelpLink;
entity["statuscode"] = new OptionSetValue(960380000); //error status
}
Any help on this would be appreciated .
Martin Carpenter

Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images