I submitted a brand new installing of Wordpress 3.1.1 for an IIS 7 server. I added the rewrite rules to the net.config and delay pills work perfectly. This really is MY rewrite rule:

<rewrite>
  <rules>
    <rule name="Main Rule" stopProcessing="true">
      <match url=".*"/>
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
      </conditions>
      <action type="Rewrite" url="index.php"/>
    </rule>
    <rule name="wordpress - Rule 3" stopProcessing="true">
      <match url="^" ignoreCase="false"/>
      <conditions logicalGrouping="MatchAny">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false"/>
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false"/>
      </conditions>
      <action type="None"/>
    </rule>
    <rule name="wordpress - Rule 4" stopProcessing="true">
      <match url="." ignoreCase="false"/>
      <action type="Rewrite" url="index.php"/>
    </rule>
  </rules>
</rewrite>

But whenever I go to the Permalinks configurations page (/wordpress-admin/options-permalink.php), it messes up my web.config having a rewrite rule that does not work! This really is rewrite rule produced by wordpress:

<rewrite>
  <rules>
    <rule name="Main Rule" stopProcessing="true">
      <match url=".*"/>
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
      </conditions>
      <action type="Rewrite" url="index.php"/>
    </rule>
    <rule name="wordpress - Rule 4" stopProcessing="true">
      <match url="." ignoreCase="false"/>
      <action type="Rewrite" url="index.php"/>
    </rule>
  </rules>
</rewrite>

How do i turn this off?? My wordpress is set up in a sub-dir like site.com/blog2 and that i curently have another wordpress installation at site.com/blog1 however i dont understand this problem there! I have also attempted setting the file attribute from the web.config file to 644 but even so Wordpress handles to edit the file!!

Any kind of help could be appreciated.

Thanks