ASP.NET登录看起来不一样,当我调试和部署? [英] ASP.NET login looks different when I debug and deploy?
问题描述
我只是好奇,如果任何人都可能知道为什么会这样对我突然变了。
I was just curious if anyone might know why this suddenly changed on me.
我一直在做这个了一个多月,它从来没有发生过。在Visual Studio中我的登录屏幕看起来像默认屏幕(这我想,它总是有)时,我的工作就可以了,但是当我部署它看起来平淡无奇只用普通的文本(之前从未发生过)。
I've been working on this for over a month, and it has never happened. My login screen in Visual Studio looks like the default screen (which I want it to, and it always has) when I'm working on it, but when I deploy it looks bland with just normal text (never happened before) .
看起来这很可能是一些简单的我俯瞰,但任何有识之士将不胜AP preciated。图片一个是什么样子的VS,我希望它看起来的样子,和画面2是个什么样子,当我调试/部署等。
It seems like it'd probably be something simple I'm overlooking, but any insight would be greatly appreciated. Picture one is what it looks like in VS, the way I want it to look, and picture 2 is what it looks like when I debug/deploy.
推荐答案
它看起来像没有被送达你的CSS,因为它是不以未在该网站登录的人访问的文件夹中。尝试添加位置元素您的web.config文件:
It looks like your CSS isn't being served because its in a folder that isn't accessible to people that are not logged in to the site. Try adding a location element to your web.config file:
<location path="Your Styles Folder" allowOverride="false">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
这篇关于ASP.NET登录看起来不一样,当我调试和部署?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!