Portable Area not finding embedded files MVC4 C#

后端 未结 2 554
梦如初夏
梦如初夏 2021-01-26 03:43

I have a solution with two projects in it. A portable areas project, and a web site that references the portable areas project, and Both reference MvcContrib.

The proble

相关标签:
2条回答
  • 2021-01-26 04:24

    In the Web.Config add for each file type:

    <system.webServer>
      <handlers>
        <add name="js" path="*.js" verb="*" type="System.Web.Handlers.TransferRequestHandler" resourceType="File" preCondition="integratedMode" />
      </handlers>
    </system.webServer>
    

    This will make IIS try to use the defined routes instead of searching for the static file.

    0 讨论(0)
  • 2021-01-26 04:28

    Could not reproduce the issue once I created a new project and redid everything. I'm not sure if it was an error or I just missed a step in setting up my portable areas.

    0 讨论(0)
提交回复
热议问题