473,394 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Image not showing in MasterPage during login

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?
Jul 25 '06 #1
2 2994
dgk wrote:
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/de...ionElement.asp

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

Jul 25 '06 #2
dgk
On 25 Jul 2006 08:58:27 -0700, qu********@gmail.com wrote:
>dgk wrote:
>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/de...ionElement.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.
Jul 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: karthikeyan | last post by:
Hi, I am having some problems hosting my website. Everything works fine in my local machine but when I upload to propduction server, my images won't load properly. I have my state configuration...
0
by: Herman verschooten | last post by:
Hi, I am creating my first real ASP.NET 2.0 site and want to use the some of the new features. I created a masterpage with my main layout and added several contentpages, no problem so far. I...
3
by: Sean | last post by:
I have set up public properties, methods and even classes inside my masterpage. only when I go to my content page they are not visible. I try master.<where is my property> and even...
7
by: needin4mation | last post by:
Hi, I have an Access 2002 - 2003 database. I am using Access 2003. Whenever I link an image all it shows is the filename. Not the image. Other versions of Access can link the image just fine. ...
3
by: Tom | last post by:
I have a VS.NET 2005 WEB application where I place all of my common controls (ie header, nav, footer) into a mater page template. Then all of my web forms inherit from the mater page template. All...
3
by: Switch4Mac | last post by:
Hi, I want to insert an ad in my MasterPage. So in the MasterPage, I have this piece of code: <asp:Image ID="GatesAd" runat="server"...
8
by: Randy Smith | last post by:
Hi, I now need to add MasterPages to a number of existing forms, but when I add the code for MasterPage, the MasterPage does NOT appear when it runs. Any thoughts? TIA, Randy Smith
1
by: Sems | last post by:
Hi I have a masterpage that has an image in it. Whats the best way to cach the image to stop it from being reloaded each time a new page is displayed? Will the masterpage take care of this...
5
by: Jeff | last post by:
hi asp.net 2.0 I get this compile error: 'Image' does not contain a definition for 'ImageUrl' Image image = (Image)e.Item.FindControl("img"); image.ImageUrl = "~/image.png";
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.