用户未登录时,ASP MVC Membership无法显示图像

111*_*110 0 css asp.net authentication asp.net-mvc asp.net-membership

我在内容文件夹中有一些图像需要添加到登录页面.问题是,当用户登录时,我会显示图像'#someDivId {background:../../Content/Image.png',但是当用户未登录时,我无法在登录页面上显示该图片.如果用户没有登录,是否知道如何显示图像?

ken*_*ner 5

你的web.config可能需要这样的东西

<location path="images">
    <system.web>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</location>
Run Code Online (Sandbox Code Playgroud)