Image not showing in MasterPage during login

D

dgk

I have an image in the masterpage which works fine everywhere except
the login page. I have the login control on a page (login.aspx
naturally) and the user is directed to it via forms authentication. On
that page, the image in the masterpage is replaced by the default
square. Anyone know what's up with this?
 
Q

quamaretto

dgk said:
I have an image in the masterpage which works fine everywhere except
the login page. I have the login control on a page (login.aspx
naturally) and the user is directed to it via forms authentication. On
that page, the image in the masterpage is replaced by the default
square. Anyone know what's up with this?

I've had this problem. It seems to have happened spontaneously, but
there's probably some mind-boggling reason I missed. In my case, Forms
Authentication began blocking access to all files, rather than allowing
images, CSS files and Javascript files.

I never figured out a real solution, and instead ended up with this
inside the 'configuration' tag in web.config. This unblocks all of the
specific directories to all users.

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

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

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

See
http://msdn.microsoft.com/library/d.../en-us/cpgenref/html/gngrfLocationElement.asp

If you figure out the original reason, let me know.
 
D

dgk

I've had this problem. It seems to have happened spontaneously, but
there's probably some mind-boggling reason I missed. In my case, Forms
Authentication began blocking access to all files, rather than allowing
images, CSS files and Javascript files.

I never figured out a real solution, and instead ended up with this
inside the 'configuration' tag in web.config. This unblocks all of the
specific directories to all users.

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

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

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

See
http://msdn.microsoft.com/library/d.../en-us/cpgenref/html/gngrfLocationElement.asp

If you figure out the original reason, let me know.

Thanks, that worked out fine. I guess the reason is buried in ASP.NET
security.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top