2

I seem to have found a very specific Firefox bug, an wondering if anyone can help.

I have an ASP.NET 3.5 web site that uses Windows Authentication.

In most browsers it works fine, but when viewed with Firefox (v10.0.1) the css background images are not loaded. That is, css like this stop working:

.hasabackground
{
    background: url(images/something.png) no-repeat top left;
}

It seems to be something specific to do with Windows Authentication, because when I use the same markup/css/background images without Windows Authentication, it works OK in Firefox.

(I would post an example page but thats hard to do because the bug only occurs with Windows Authentication)

Any ideas?

3 Answers 3

1

I'm guessing the images/something.png path isn't accesible or served to the client.
Try checking the html traffic(with fiddler, firebug , ...) to see what response you get.
it's possible that the request for something.png gets redirected to the homepage or that the png file isn't served by your webserver.

Sign up to request clarification or add additional context in comments.

Comments

1

It looks like your image may need authentication to allow the browser to download it. Try adding this to your web.config:

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

I can't explain why this is only a firefox problem... maybe the other browsers are displaying a cached image?

You can test this by trying to access the image directly by typing the URL into your browser:

http://mywebserver/images/something.png

2 Comments

Thanks, yes I tried the location tag but it didn't help (and putting the image url in browser results in firefox popping up a password dialog). Part of the problem may be that windows authentication is partly controlled in IIS so the web.config location thing seems to make no difference.
re: Why firefox: IE and Chrome have more natural support for Windows Authentication, whereas in Firefox its supported but less smoothly - I think that might be part of the problem
1

From what I remember for firefox 3.x, it does not pass your windows credentials on by default. (I am not sure about the latest versions) You might have to add your URI to the list of trusted sites, depending on which domain the images sits on:

  1. In Firefox, type about:config in the address bar, then
  2. Type network.automatic-ntlm-auth.trusted-uris. Enter your site's URL eg http://yoursite.com

Hope this helps :)

2 Comments

It stops Firefox 10 from asking me for a username/password when I first navigate to the site, but doesn't solve the missing css background images issue.
Ok so another option you could look into is check to see if your container 'hasabackground' has any content in it. Try adding a 'min-height:50px' in the css. Another thing is check to if your image has any spaces. Before I noticed some of my images were not rendered due to firefox/safari not recognising spaces so I had to add the characters '%20' between the spaces in the filename.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.