Url Rewrite Configuration file size [Answered]RSS

4 replies

Last post Mar 17, 2013 02:40 PM by JamieFurr

  • Url Rewrite Configuration file size

    Mar 12, 2013 03:27 PM|mystUkon|LINK

    <p>Hello, we are using configuration files called from our web.config file as follows: &nbsp;&lt;rewrite&gt; &nbsp;&nbsp;&nbsp;&nbsp;</p> <p>&lt;rules configSource=&quot;InboundRules.config&quot; /&gt; &nbsp;&lt;outboundRules configSource=&quot;OutboundRules.config&quot; /&gt; &nbsp;&lt;/rewrite&gt;.</p> <p>This all works well. There are 4 inbound rules per subsite, when we reach about 500 rules we get the dreaded 500 server error. As soon as we remove some of the rules, it starts working again. Is there a limit on the number of rules? or the size of the file size or load time for the xml file (could it be timing out or something)? btw, we have tested each set of rules separately and they work, it's the combination that seems to break the file.</p> <p>&nbsp;</p> <p>thank you so much for your help.</p> Also, we are running in 64-bit mode, and we get the following error when we try to view the rules in iis7 management console: "Cannot read the confguration file because it exceeds the maximum file size" I thought that using the include as above, would get us around the file restriction? I searched the server registry for the key MaxWebConfigFileSizeInKB, and it does not exist on the server.
  • Re: Url Rewrite Configuration file size

    Mar 12, 2013 04:45 PM|JamieFurr|LINK

    Hi,

    By default in IIS7+ the configuration files size is limited to 250kb.  You can add the following key and specify a new max files size.

    HKLM\SOFTWARE\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB (REG_DWORD)

    Reference: http://support.microsoft.com/kb/954864

    Jamie Furr
    MCSA, Network +, A+

    Please 'Mark as Answer' if this post helps you.

    OrcsWeb: Managed Windows Hosting Solutions
    "Remarkable Service. Remarkable Support."
  • Re: Url Rewrite Configuration file size

    Mar 12, 2013 05:01 PM|mystUkon|LINK

    i added the MaxWebConfigFileSizeInKB and it does not help either, this is a 32 bit key and we run in 64 bit mode, ii7.5, the key has been added in both these areas and iis restarted..

    HKLM\SOFTWARE\Microsoft\InetStp\Configuration

    and

    HKLM\SOFTWARE\Wow6432Node\Microsoft\InetStp\Configuration

    Restarted IIS and still no luck

  • Re: Url Rewrite Configuration file size

    Mar 12, 2013 06:54 PM|mystUkon|LINK

    thank you everyone.  A reboot of the servers was the ticket! A restart of iis was not sufficient in our case. We now have the large file working. One last question, why do we require a 32 -bit key for a 64-bit application? None of our applications run in 32-bit mode.

  • Re: Url Rewrite Configuration file size

    Mar 17, 2013 02:40 PM|JamieFurr|LINK

    Hi,

    It should not require a 32 bit key if it runs in a 64 bit application pool.

    From the looks of it you may have added both the 32 bit and 64 bit keys.

    Jamie Furr
    MCSA, Network +, A+

    Please 'Mark as Answer' if this post helps you.

    OrcsWeb: Managed Windows Hosting Solutions
    "Remarkable Service. Remarkable Support."