0

I was just curious if anyone might know why this suddenly changed on me.

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) .

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.

The way I want it to look, and the way it looks in VS.

The way I don't want it to look, and the way it looks when deployed.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Control
  • 93
  • 1
  • 3
  • 14

2 Answers2

4

It looks like your CSS files are in a folder that's only accessible to logged in users. 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>
Daniel Szabo
  • 7,181
  • 6
  • 48
  • 65
  • Oh man, that would actually make complete sense.. I'll try that out now. – Control Apr 12 '12 at 14:38
  • This code didn't work only because I had for everything, but once I removed that it went back to normal. So that is the problem, but can I have for everything with the exception of the css? – Control Apr 12 '12 at 14:42
  • Ahh, nevermind! I figured it out! Thank you so much for the help! Such a simple problem I probably would have never figured out. – Control Apr 12 '12 at 14:44
  • @Kruce: No problem. That one got me when I was first starting out, too ;) – Daniel Szabo Apr 12 '12 at 14:51
  • can you give some example of the location path, because I still fail to do that – Shi Jie Tio May 29 '17 at 08:59
0

Make sure you other css has tables and they are overriding them.Try to remove them and it will work fine.

coder
  • 13,002
  • 31
  • 112
  • 214