如何在 Apache mod-mono 中分离 ASP.NET MVC 上的静态内容

发布于 2024-10-07 18:59:51 字数 553 浏览 0 评论 0原文

我已经有一个基于 ASP.NET MVC 2.0 构建的项目,并且它正在运行。 我尝试在 Apache2 和 Mod mono 上的 Ubutuntu 10.4 服务器上运行它。

如您所知,当您在 VS.NET 上创建一个新项目时,它会创建一个 Content 文件夹来保存静态内容,例如 css、js、图像等。

此外,我的项目使用表单身份验证,并且我将项目的某些路径与下面是 web.config 中的 location 元素。

  <location path="Content">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>

但上述配置在 Apache 上不起作用。

问题是;如何通过 apache-mod mono 上静态内容的身份验证?

谢谢

I have already a project that built top of the ASP.NET MVC 2.0 and it's working.
I tried to run it on Ubutuntu 10.4 Server on Apache2 and Mod mono.

As you know, when you created a new project on VS.NET it creates a Content folder for holds static content such as css, js, images etc.

Also my project has working with Forms authentication, and i separated some path of my project with below location element in web.config.

  <location path="Content">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>

But above configuration hasn't worked on Apache.

The question is; how can i pass authentication for static contents on apache - mod mono ?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文