Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8605405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:49:20+00:00 2026-06-12T02:49:20+00:00

Adding to my web.config <system.webServer> <staticContent> <mimeMap fileExtension=.json mimeType=application/json /> </staticContent> </system.webServer> Allows my

  • 0

Adding to my web.config

<system.webServer>
  <staticContent>
    <mimeMap fileExtension=".json" mimeType="application/json" />
  </staticContent>
</system.webServer>

Allows my application to run on Azure, but will crash my remote IIS server because its already included. Removing the remote IIS mimeType is not practical in this particular case. I end up using a different web.config

Is there another mechanism by which I can configure Azure IIS mimeType so I don’t have this problematic web.config?

I would like a single deployment package that will work on Azure and non Azure.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:49:22+00:00Added an answer on June 12, 2026 at 2:49 am

    This should work:

    <system.webServer>
      <staticContent>
        <remove fileExtension=".json" />
        <mimeMap fileExtension=".json" mimeType="application/json" />
      </staticContent>
    </system.webServer>
    

    See also here: http://blogs.msdn.com/b/chaun/archive/2009/12/04/iis7-error-cannot-add-duplicate-collection-entry-of-type-mimemap-with-unique-key-attribute-fileextension.aspx

    This doesn’t make any difference to your overall IIS configuration, it just conditionally removes the mimeMap from the configuration of this particular site (as governed by this web.config) before adding it again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried adding namespaces to configuration/system.web/pages/namespaces in the web.config of my ASP.NET MVC 3
Does adding a machinekey in the system.web of your web.config cause any performance problems?
After adding these settings in web.config for increasing session timeout: <sessionState mode=InProc stateConnectionString=tcpip=127.0.0.1:42424 stateNetworkTimeout=240
I`m doing some web.config modifications with SPWebConfigModification class. When adding them to WebApplication and
I've edited the webconfig in my Web Application (WebForms, .NET 4) adding this :
I working on adding file uploading to my web application. I'm using an iframe
After adding <location> tag to web.config (ASP.NET 4) I got HTTP 500 Internal Server
Long story, long: I am adding a web interface (ASPX.NET: VB) to a data
I have a sharepoint web part where I am programatically adding a button to
I am adding the ability for users of my web app to get credit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.