I got following error while hosting Web API in IIS 10.0
Error Code : 0x800700b7
Config Error : Cannot add duplicate collection entry of type 'add'
with unique key attribute 'FileExtension' set to '.idq'
Please tell me the solution
I think the port number is used by another project. You can try with different port.
Adding the same mime types at the application level (which IIS will place into a web.config file) and the site level (which IIS will place into the applicationHost.config file) may cause a conflict.
One solution would be to simply remove one of the two conflicting mimeMap extensions from one of the config files. However, in some rare scenarios, the IIS administrator may need to not remove one of the two conflicting mime mappings. If both mine maps are needed, the way to get around the conflict is to make one simple addition to the web.config which will do a REMOVE immediately prior to doing an ADD.
So if your application installation adds the following line to the web.config. . .
… And this line creates a conflict with the same mime map in the applicationhost.config file, all you have to do is add the following line ABOVE that line so that it will look like the following:
<remove fileExtension=".xyz" />
<mimeMap fileExtension=".xyz" mimeType="xml/text" />
Doing the removal before the add should be fine even when the .xyz mime map doesn't exist at a higher level.
you could also do it by using iis GUI.
1)open iis manager.
2)select your site or application.
3)double click mime type from the middle pane.
4)Remove the MIME Type entry ".idq".
Related
I'm getting started with request filters to block bot traffic.
I've started with an example .htaccess file, see here: IIS htaccess rule converter only importing 1 rule
I don't want to manually add a ton of rules through the clunky IIS interface, so I'd rather add them to a file directly. I thought these rules would be in the applicationHost.config (based on this post), but on opening %WINDIR%\System32\inetsrv\config\applicationHost.config, I don't see any of the rules.
I also saw this post, so I tried opening the file with Notepad++ as well as Windows Notepad, but I still don't see the rule I created in IIS.
Why not?
IIS has a distributed configuration system and as Lex Li mentions, a great resource to familiarize yourself with is: https://learn.microsoft.com/en-us/iis/get-started/planning-your-iis-architecture/the-configuration-system-in-iis-7
Your configuration changes undoubtedly went to a web.config file. The location the configuration goes to change based on configuration, but by default Request Filtering will go to the lowest configuration file for which you are setting. In other words, if you are configuring Request Filtering for a Site, it will go to that Site's web.config. If you are configuring at a subdirectory, it will go to that subdirectory's web.config. You can actually influence where the settings go (i.e. site specific config can go to ApplicaitonHost.config) and its far easier thru command line.
If you look at the AppCmd.exe sampe in the ScanHeaders documentation, those commands will make changes (by default) to the Default Web Site's web.config. You can append /commit:AppHost to the end of them to make the settings apply to the ApplicationHost.config.
I have done the following:
installed a clean Sitecore 7.5 instance
added the relevant asp.net web forms controls and pages to support the site
imported and published a content tree from an old application
Visiting the base site url yields a YSOD with the error message:
Could not find configuration node: contactRepository
Now I understand what this means - there's an expected configuration section that is missing. Adding an empty element contactRepository yields an expected message that this section is not defined.
What is contactRepository, what is its associated configuration section type, what is it for and what values should be specified in it? Alternatively, how can I turn off whatever demands this section to be present?
edit #1:
In the Sitecore.Analytics.config file in the node there are the following two lines:
<!--This configuration node is obsolete and will be removed in a future version of Sitecore. Use "contactRepository" node to get access to Contact repository-->
<contactRepository ref="contactRepository"/>
The comment is total gibberish. Which node? 'Use' how? 'get access' in what sense? How is this different to what's there?
replacing with an empty <contactRepository> without the ref attribute, commenting out this node, both nodes, and the whole tracking node makes no difference to the application's behaviour.
Looking at my local Sitecore 7.5 setup the Contact Repository settings should be in your Sitecore.Analytics.config.
The contacts repository settings relate to the new xDB stuff.
Please ensure you have the correct Sitecore.Analytics config files for 7.5.
There should be around 15 config files with new settings for xDB.
Please read this blog post for more information on the new Analytics setup.
https://www.sitecore.net/learn/blogs/technical-blogs/getting-to-know-sitecore/posts/2014/10/introducing-the-sitecore-analytics-index
Please tell me what is use of:
<add assembly="*"/>
because of this i am getting error:
Description: An 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: Exception of type 'System.OutOfMemoryException' was thrown.
Source File: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config
Thanks
As per MSDN:
you can specify the asterisk (*) wildcard character to add every assembly within the private assembly cache for the application, which is located either in the \bin subdirectory of an application or in the.NET Framework installation directory (%systemroot%\Microsoft.NET\Framework\version)
Since you most likely don't need to add all assemblies to your application I would suggest adding only the ones you are actually using and leave the <add assembly="*" /> part out, which should solve your problem.
The Indexing Service may cause such a problem. If Indexing Service is running on your computer then, you should exlude it from indexing directories:
Open Computer Management from Administrative Tools on your computer.
Navigate to Indexing Service under Services and Applications.
Select "Web" under Indexing Service.
On the right pane Right Click mouse and chose New > Directory.
Add the paths where your web pages are (Ex: c:\inetpub).
Repeat this for all virtual directories not under inetpub.
I'm using IIS7 and Umbraco 4 to run a clients site but I'm having issues browsing to pages with extensionless URLS.
The site is running several languages which are separated by Umbraco Folders. What I want to do is use the primary domain (.com) for all sites and request a specific one using the abbreviated country name i.e. mydomain.com/es (for spanish site). The trouble is I can only access the page by using the .aspx extension i.e. mydomain.com/es.aspx and without the extension i get a 404 error.
It's been suggested that I add the page I am requesting as a default dosument in IIS but this has not worked.
I've also tried setting the "umbracoHideTopLevelNodeFromPath" value to false but this makes no difference.
The system will be migrated to the clients servers once complete so I don't really want to add URL rewriting rules within IIS so is there anything I've missed which will allow me to do this?
Thanks
so, you want to browse with directory url's then,
this is very mutch possible.
first, open your web.config
find the line below, and make sure the value is set to true
<add key="umbracoUseDirectoryUrls" value="true" />
then, you will need to add a wildcard mapping in IIS
the steps you will need to take in IIS7 are explained in this post:
[http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/][1]
and if you would ever need to do this on IIS6
Open IIS6
Right click on your website
Select Properties
Click the home directory tab
Click Configuration
On the mappings tab, click the Insert button, next to the wildcard mappings box
Click Browse and find the aspnew_isapi.dll, this can usually be found here:
c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
Untick verify that file exists and click OK
Click OK
Click OK
Done
[1] : http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/
I know I'm a bit late in this one but if you want to have a directory NOT handled by Umbraco, try editing your web.config. Under the node, append your folder name to the existing value for umbracoReservedPaths. After the application restarts, you should be able to enter your folder and it will bypass the Umbraco handler.
<configuration>
...
<appSettings>
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/MyFolderName/" />
</appSettings>
...
</configuration>
I have a config file linked from web.config e.g.
<features configSource="feature.config" />
When I make changes to the "feature.config" file the IIS application appears to restart, is this expected behaviour?
Yes, this is expected behaviour by default as typically any changes made to the web.config will cause an application restart however this can be overridden for app.config files. From the msdn:
Saving a Web.config file restarts the
application. You can alternatively use
the configSource attribute of
individual section elements to point
to a secondary configuration file that
does not cause an application restart
when it is changed.
Although you have moved some of your configurations into a linked config file they are still effectively part of your web.config file and any changes made there will have the same effect as if you made the change directly in the web.config file itself. However you can specify a section to not restart the application on change by using the restartOnExternalChanges attribute in the section definition. See here and here for further details. However, according to the documentation this is not valid for ASP.NET applications which makes the above statement a little misleading.