Last post Feb 07, 2017 09:14 PM by aabruzzese
Jan 24, 2017 09:27 PMemail@example.com|LINK
I'm not very experienced with ASP.net or web.config files. So any help would be greatly appreciated.
I get this server error in my web.config file and I don't know what 'type' attribute to add to the 'section' tag to make it work.
error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The 'type' attribute must be specified on the 'section' tag.
Line 4: <sectionGroup name="system.web">
Line 5: <sectionGroup name="rewrite">
Line 6: <section name="rewriteMaps" overrideModeDefault="Allow" />
Line 7: <section name="rules" overrideModeDefault="Allow" />
Line 8: </sectionGroup>
File: C:\inetpub\wwwroot\web.config Line: 6
Show Additional Configuration Errors:
The 'type' attribute must be specified on the 'section' tag. (C:\inetpub\wwwroot\web.config line 7)
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1040
Jan 24, 2017 11:39 PM|PatriceSc|LINK
But what are you trying to do? If you are really trying to create your own configuration section(s) see the
ttps://msdn.microsoft.com/en-us/library/2tw134k3.aspx sample. Basically you create a type and register those types to define and handle new sections in your web.config file.
Based on the names you are using it seems you are trying rather to use the url rewriting module? As far as I know you should just install the module and it should update the machine.config file so that registering those new section is done once for all at
the server level rather than in each and every web.config file.
Then you'll write your rules in system.webServer as show at
https://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module and around...
Jan 25, 2017 02:52 AMfirstname.lastname@example.org|LINK
The site runs on Wordpress and the code was originally added to the web.config file to fix a problem with Permalinks. I got the code from wordpress.org and it fixed the problem back when the site was first created (about 3 years ago) on an older server running
PHP 5.2 with ISAPI. But now it's being migrated to a new server using PHP 7 with FastCgi, so I'm thinking that's where the problem is. I'll try figuring out how to use the URL Rewrite module in IIS instead.
Feb 07, 2017 09:44 AM|Zhi Lv - MSFT|LINK
You could also check the following article:
Required String attribute.
Specifies the name of the configuration section handler class that handles the processing of the configuration settings in the section or element that is specified in the
name attribute. Use the following format:
type="Fully qualified class name,
assembly file name,
public key token"
The definition must match the assembly reference. For example, if the version number in the following example syntax does not match the assembly, an error occurs.
The assembly file must be located in the same application directory as the Web.config file that defines the assembly file. In the case of the root Web.config file or the Machine.config file, the assembly file must be in %SystemRoot%\Microsoft.NET\Framework\version.
Feb 07, 2017 09:14 PM|aabruzzese|LINK
Take a look at the following page:
It should cover all the bases you are hitting on.