web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
Posted on by 32

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

*This post is locked for comments

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans