Solved

ASP.NET 2.0 - Login.aspx loses Master Page settings during runtime

Posted on 2006-11-07
6
1,328 Views
Last Modified: 2011-01-22
I have a Login.aspx page that I created based upon a "Template.master" page.  It looks fine in the designer but when I go to run it the login control shows up but there is no formatting almost as if the Template.master or CSS are disconnected.  I then login and everything is fine.  Weird.

The startup page is "Default.aspx" but the user is taken to the "Login.aspx" page because these "web.config" settings:

    <authorization>
        <deny users="?" />
    </authorization>
   
    <authentication mode="Forms">
      <forms loginUrl="Login.aspx" path="/" />
    </authentication>

Any ideas or thoughts are GREATLY appreciated,

Hammer
0
Comment
Question by:HAMMER33333
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17897548
Where is the CSS coming from--the template folder?

Bob
0
 

Author Comment

by:HAMMER33333
ID: 17898597
The Template.master is in the root directory and so is the CSS ("layout.css").  The CSS is linked like this:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="layout.css" />
<title>Testing</title>
<script type="text/javascript" >
    function PopTheWindow(pageName, pageFeatures)
    {
        window.open(pageName, null, pageFeatures);
    }
</script>
</head>
<body>
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17898696
Where is the login control in relation to Template.master?

Bob
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:HAMMER33333
ID: 17900946
The Login is an Aspx page (Login.aspx) based upon Template.master.  It is in the same directory as Template.master, the root directory.

It's HTML is:

<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Title="Login" %>

<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" Runat="Server" Visible="true">
    <asp:Login ID="Login1" runat="server">
    </asp:Login>
</asp:Content>

Weird stuff because it looks fine in the designer.

Hammer
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17905454
That is too strange :(

Bob
0
 

Expert Comment

by:jmyonan
ID: 34675196
No one gave a solution to this problem...so here is the solution...

You need to set the authentication on the images/css folder to allow everyone.  It would look something like this in the web.config:

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

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question