Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7071621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:42:37+00:00 2026-05-28T05:42:37+00:00

I am using VS2005 C#. I have a login page which uses a background

  • 0

I am using VS2005 C#.

I have a login page which uses a background image from the CSS.

After I have modified my web.config to cater for AD authentication, the background image does not show anymore.

I am able to see the background image when viewed in source, but when the login page is viewed in browser, the background is plain white.

Below is the code snippet of my Login.aspx, loginCSS.css and Web.config:

Login.aspx:


<head runat="server"><link rel="stylesheet" type="text/css" href="loginCSS.css" />
    <title>Login</title>
<script language="javascript" type="text/javascript">
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div  align="center">
    <asp:Login ID="Login1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8" 
            BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
            Font-Size="Small" ForeColor="#333333" Height="130px" 
            Width="303px">
          <TextBoxStyle Font-Size="Small" />
          <LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" 
              BorderWidth="1px" Font-Names="Verdana" Font-Size="Small" ForeColor="#284775" />
          <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
          <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="Small" 
              ForeColor="White" />
        </asp:Login>

</div>
    </form>
</body>
</html>

LoginCSS.css


body 
{
    background-image:url('images/loginbackground.png');
    background-repeat:no-repeat;
    background-attachment:fixed;
}

Web.config:


<authentication mode="Forms">
            <forms name=".ADAuthCookie" timeout="10" loginUrl="Login.aspx" defaultUrl="~/Common/Default.aspx">
            </forms>
        </authentication>

May I know what went wrong? Is there a better way to display a background image in my login form?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:42:37+00:00Added an answer on May 28, 2026 at 5:42 am

    Sounds like you might be requiring authentication for your CSS or image files.

    Try adding

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

    which would give you anyone permission to retrieve your css/images without having to login

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using VS2005 ASP.NET 2.0. I have a web application which uses Active
I am using VS2005 C#. I have a Login control on my web form
I am using VS2005 C#. I have a .aspx login page and I would
I am using VS2005 C#. I have a login box in my .aspx page,
I have a Windows 7 machine on which I am using VS2005. .Net 2.0
I am using VS2005 C#. I am trying to switch my login authentication from
I am using VS2005 C#, and I have an application which has a few
I have a web application on VS2005 using C#. Whenever my webpage does not
I am using VS2005 C# ASP.NET. I have a .aspx page with a script
I have a small website developed using VS2005 and mySQl, it's just 2 webforms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.