Asp.net ASP MVC会员可以';t当用户未登录时显示图像
我的内容文件夹中有一些图像需要添加到登录页面。问题是,当用户登录时,我可以显示图像“#someDivId{background:../../Content/image.png”,但当用户未登录时,我无法在登录页面上显示该图片。知道如果用户未登录,如何显示该图像吗?您的web.config可能需要类似的内容Asp.net ASP MVC会员可以';t当用户未登录时显示图像,asp.net,css,asp.net-mvc,authentication,asp.net-membership,Asp.net,Css,Asp.net Mvc,Authentication,Asp.net Membership,我的内容文件夹中有一些图像需要添加到登录页面。问题是,当用户登录时,我可以显示图像“#someDivId{background:../../Content/image.png”,但当用户未登录时,我无法在登录页面上显示该图片。知道如果用户未登录,如何显示该图像吗?您的web.config可能需要类似的内容 <location path="images"> <system.web> <authorization>
<location path="images">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
您的web.config可能需要这样的内容
<location path="images">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>