2011-08-09 3 views
0

내 ASP .NET 응용 프로그램에서 내 SVG 요소가 제대로 렌더링되지 않습니다. 나는 그것이 MIME 유형의 합병증 때문이라고 생각합니다.SVG 요소는 로컬로 렌더링되지 않지만 원격으로 렌더링됩니까?

아래에 내 Web.Config 파일이 있습니다.

<?xml version="1.0"?> 
<!-- 
    For more information on how to configure your ASP.NET application, please visit 
    http://go.microsoft.com/fwlink/?LinkId=169433 
    --> 
<configuration> 
    <configSections> 
    <section name="microsoft.visualstudio.testtools" type="Microsoft.VisualStudio.TestTools.UnitTesting.TestConfigurationSection, Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> 
    </configSections> 
    <system.web> 
    <globalization culture="en-US" uiCulture="en-US"/> 
    <customErrors mode="On"/> 
    <pages validateRequest="false"/> 
    <compilation debug="true"/> 
    <webServices> 
     <protocols> 
     <clear /> 
     <add name="HttpGet"/> 
     <add name="HttpPost"/> 
     </protocols> 
    </webServices> 
    <sessionState timeout="1440" /> 
    </system.web> 
    <system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    <staticContent> 
     <remove fileExtension=".svg" /> 
     <remove fileExtension=".svgz" /> 
     <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> 
     <mimeMap fileExtension=".svgz" mimeType="image/svg+xml" /> 
    </staticContent> 
    </system.webServer> 
</configuration> 

무엇이 원인 일 수 있습니까? 모든 브라우저에서 문제를 재확인 할 수 있습니다.

답변

1

IIS express를 사용하여이 문제를 해결했습니다. Visual Studio의 내장 개발 서버에서는 MIME 유형을 수정할 수 없습니다.

관련 문제