10 Replies Latest reply on Dec 5, 2014 12:12 PM by Joe Piotrowski

    Is there a character limit on a compliance rule?

    Mike Buckley

      I'm creating a compliance job that includes an IIS web.config.  In a certain section of this web config, the XML gets fairly long.  I'm checking 56 lines and all work, except for 10 lines which are longer.  Below is an example of one of the lines I'm checking that is failing.  When I live browse the server, I see these values.  Even the check to see if the value exists is failing.


      Running BSA 8.5.01.


      Compliance Rule


      Live Browse Values


        • 1. Re: Is there a character limit on a compliance rule?
          Joe Piotrowski

          Can you scrub (if needed) the web.config file and attach it? I'd like to test with it if possible. You might also want to open a Support ticket in parallel and verify if there is a character limit. I've personally never hit one before.

          • 2. Re: Is there a character limit on a compliance rule?
            Monoj Padhy

            never experienced character limitation for compliance rule. Its hard to tell if it hitting becoz of lengthy characters or due to some special characters in those lines. I have experienced a similar situation before for syslog compliance. I was looking for existence of a line. But due to presence of few spl characters it is failed to parse the file.


            If that is the case then try with some other grammar file. If you can attach the file then it is easier to trouble shoot the issue.

            • 3. Re: Is there a character limit on a compliance rule?
              Mike Buckley

              I have opened a ticket with BMC, but haven't got back anything useful yet.


              Here is the web.config in question with certain values changed.  The runtime section is where I'm having the issues.




              <?xml version="1.0" encoding="utf-8"?>


                For more information on how to configure your ASP.NET application, please visit






                <requestLimits maxAllowedContentLength="2000000" />





                <add key="webpages:Version" value="" />

                <add key="webpages:Enabled" value="false" />

                <add key="ClientValidationEnabled" value="true" />

                <add key="UnobtrusiveJavaScriptEnabled" value="true" />

                <add key="Portal" value="CsgConnect" />

                <add key="DbInstance" value="spc9" />

                  <add key="sqlDbInstance" value="CSGConnect" />

                <add key="DbReportInstance" value="dba9,dba2"/>

                <add key="SmtpServer" value="smtp.csgi.com" />

                <add key="SSRS_ReportUrl" value="http://odcsgoscweb11.devcsg.com/reportserver"/>

                 <add key="SqlServerConnectionString" value="Data Source=ODCSGOSCWEB11.devcsg.com;Initial Catalog=master;user id=csgoma\\svc_user"/>

                <add key="DbInstanceRegistryKey" value="SOFTWARE\CSG_Systems\DirectNet\DataAccess\Instance\" />


                <!-- SXAPI Production -->

                <!--<add key="SxApiUrl" value=""/>-->


                <!-- CFR Holds Production -->

                <!--<add key="CfrHoldsSxApiUserName" value="CFRSTAGING" />-->

                <!--<add key="CfrHoldsSxApiUserPassword" value="1234561234561234561234=="/>-->



                <!-- SXAPI QA -->

                <add key="SxApiUrl" value="http://server1-int.csgedirect.com/odcsg"/>



                <!-- CFR Holds Production -->

                <add key="CfrHoldsSxApiUserName" value="dnadmin" />

                <add key="CfrHoldsSxApiUserPassword" value="1234561234561234561234=="/>



                  <!-- Viewstate -->

                  <add key="ViewStatePersistenceFolder" value="~/ViewState"/>



                  <!-- Error Handling -->

                  <add key="ErrorEmailList" value="List-DPS_DN_Dev@csgi.com,Mike.Sebby@csgi.com,Serena.Prososki@csgi.com,jon.chester@csgi.com,karin.abbott@csgi.com"/>

                  <add key="EmailSmtpServer" value="smtp.server.com"/>



                  <!-- SSO-->

                  <add key="partnersPublicKey" value="E:\\inetpub\wwwroot\\CsgConnect\\keys\\private_sig_key"/>

                  <add key="myPrivateSignatureKey" value="E:\\inetpub\\wwwroot\\CsgConnect\\keys\\public_message_key"/>



                  <!-- Address Change Service Files Report -->

                  <add key="AddressChangeServiceFilesPath" value="\\webserver03.devcsg.com\ACS" />

                  <add key="AddressChangeServiceFilesAuthenticationUserDomain" value="1234561234561234561234==" />

                  <add key="AddressChangeServiceFilesAuthenticationUserId" value="1234561234561234561234==" />

                  <add key="AddressChangeServiceFilesAuthenticationPassword" value="1234561234561234561234==" />




                For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.



                The following attributes can be set on the <httpRuntime> tag.


                <httpRuntime targetFramework="4.5"/>





                <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91"

                validate="false" />


                <customErrors mode="Off" />

                <authentication mode="Forms">

                <forms loginUrl="~/Account/Login" timeout="2880" />




                <compilation targetFramework="4.5.1">


                <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />







                <httpRuntime targetFramework="4.5" />




                <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">


                <assemblyIdentity name="WebGrease" publicKeyToken="123abc456def789z" culture="neutral" />

                <bindingRedirect oldVersion="" newVersion="1.6.5135.21930" />



                <assemblyIdentity name="Microsoft.Owin" publicKeyToken="123abc456def789z" culture="neutral" />

                <bindingRedirect oldVersion="" newVersion="" />



                <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="123abc456def789z" culture="neutral" />

                <bindingRedirect oldVersion="" newVersion="" />



                <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="123abc456def789z" culture="neutral" />

                <bindingRedirect oldVersion="" newVersion="" />



                <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="123abc456def789z" culture="neutral" />

                <bindingRedirect oldVersion="" newVersion="" />



                <assemblyIdentity name="System.Web.Helpers" publicKeyToken="123abc456def789z" />

                <bindingRedirect oldVersion="" newVersion="" />



                <assemblyIdentity name="System.Web.WebPages" publicKeyToken="123abc456def789z" />

                <bindingRedirect oldVersion="" newVersion="" />



                <assemblyIdentity name="System.Web.Mvc" publicKeyToken="123abc456def789z" />

                <bindingRedirect oldVersion="" newVersion="" />



                <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="123abc456def789z" culture="neutral" />

                <bindingRedirect oldVersion="" newVersion="" />



                <assemblyIdentity name="System.Web.Http" publicKeyToken="123abc456def789z" culture="neutral" />

                <bindingRedirect oldVersion="" newVersion="" />





                <validation validateIntegratedModeConfiguration="false" />


                <remove name="ExtensionlessUrlHandler-Integrated-4.0" />

                <remove name="OPTIONSVerbHandler" />

                <remove name="TRACEVerbHandler" />

                <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />

                <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

                <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />



              • 4. Re: Is there a character limit on a compliance rule?
                Joe Piotrowski

                Which grammar are you using exactly? In my test I'm using:

                Grammar file: Web Config XML file grammar (web.config.xml.gm)


                Here is a screenshot of what I'm seeing. I haven't attempted any Rule testing yet.

                11-12-2014 8-25-40 PM.jpg

                Two things stick out to me; the [] and the common tag name "dependentAssembly." In BSA it will create unique Names, so you can see on the left hand side it increments the names with -numbers at the end. This will impact the Rule syntax you have to create. Not sure if the [] are causing any issues, but sometimes certain characters can interfere.

                • 5. Re: Is there a character limit on a compliance rule?
                  Mike Buckley

                  I am using the web.config.7.xml.gm file.


                  Here's how mine displays.



                  • 6. Re: Is there a character limit on a compliance rule?
                    Joe Piotrowski

                    So I found something interesting. If I did a live browse of the configuration file on a server, and copied the values to the clipboard, and pasted them into my Rules, they failed. But the ones I manually entered worked. I'm wondering if hidden characters are the problem. When I went back and entered all of them in manually, they worked.






                    1 of 1 people found this helpful
                    • 7. Re: Is there a character limit on a compliance rule?
                      Mike Buckley

                      I ran into the same issue, it appears the copy/paste adds a carriage return at the end of the line.  I have attempted to type the values in manually and am still having the issue.


                      This even fails when I have the rule to check for existence.

                      • 8. Re: Is there a character limit on a compliance rule?
                        Joe Piotrowski

                        Has Support been able to assist you with a resolution on this?

                        • 9. Re: Is there a character limit on a compliance rule?
                          Mike Buckley

                          I ended up finding a work around so I closed my ticket with support.  I changed my config object to use config.xml.gm instead of web.config.7.xml.gm.  It seems that the web.config.7.xml grammar file doesn’t handle [] very well.

                          • 10. Re: Is there a character limit on a compliance rule?
                            Joe Piotrowski

                            Weird. I wonder why I was able to get it to work and you could not. I'm using the same BSA version as you but Patch1 (if that matters). (8.5 SP1 Patch1)