Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

css style sheets not working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jerry C - 17 Apr 2008 23:40 GMT
I have a machine running IIS 6.0. I just replaced the web.config and several
aspx pages in the application and now the style sheets are not working. the
images from the themes work but not the css files.

Any help.

Signature

Jerry

Stan - 18 Apr 2008 00:09 GMT
> I have a machine running IIS 6.0. I just replaced the web.config and several
> aspx pages in the application and now the style sheets are not working. the
[quoted text clipped - 4 lines]
> --
> Jerry

Make sure that any css files are in the App_Themes/<theme name> folder.
Steven Cheng [MSFT] - 18 Apr 2008 04:31 GMT
Hi Jerry,

As for the ASP.NET application, how did you originally reference those css
style sheets? Are you using the Theme feature to bind the stylesheets(put
them in Theme folder and let them be linked automatically)?

By default, style sheets under Theme folder will be linked into page(that
has applied the certain Theme) automatically.  To verify this, you can
visit the certain page(that doesn show style corrrectly) and open its html
source in client browser to see whether the style sheet link is displayed
in the client source.

Also, have you checked the aspx page template to see whether  there is any
difference between the original one?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Thread-Topic: css style sheets not working
>thread-index: Acig2/jPmvbRmVNLSnuZKxfmRujgkQ==
[quoted text clipped - 8 lines]
>
>Any help.
Jerry C - 18 Apr 2008 13:28 GMT
Thank you for the replys.

The web.config file had two entries like:
    <location path="styles.css">
        <system.web>
            <authorization>
                <allow users="*"/>
            </authorization>
        </system.web>
    </location>
On the development machine it worked OK but when I droped this web.config
file on another server it did not. It did not like duplicate location path
entries for the same file. Also FYI if the same css file is in the main
directory and in the App_Themes/theme directory it causes problems.

Thank you for your help.
Signature

Jerry

> Hi Jerry,
>
[quoted text clipped - 46 lines]
> >
> >Any help.
Steven Cheng [MSFT] - 21 Apr 2008 05:46 GMT
Thanks for your reply Jerry,

Yes, the further information you provided is very important. That remind me
of the potentitial cause from forms authentication protection on pages or
resource in the application.

So you're using Forms authentication, and by default deny  user="?",
correct? Is the application hosted in IIS on both machine? Normally asp.net
forms authenticaction won't affect those static files(such as css ,
jscript...) because only those ASP.NET documents(aspx, ascx ..) will be
forwarded to ASP.NET runtime for processing. However, you can check on the
server to see whether the IIS extention mapping has bee  changed that those
static files will also be processed by ASP.NET runtime.

For testing , you can also first turn off forms authentication protection
on all page(set allow users="*") to see whether the style sheet can be
accessed correctly.   Also, since those Theme files are for displaying
only, I suggest you consider add a rule (through <location> ) to allow all
users access for the Theme folder. e.g.

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

If you have any other findings, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?SmVycnkgQw==?= <jerryed@nospam.nospam>
>References:  <E87D5CC7-D556-4B0D-AE29-E2F719654C9A@microsoft.com>
<IMqx0SQoIHA.9016@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: css style sheets not working
>Date: Fri, 18 Apr 2008 05:28:01 -0700

>Thank you for the replys.
>
[quoted text clipped - 42 lines]
>> ==================================================
>> Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
[quoted text clipped - 16 lines]
>> >
>> >Any help.
Steven Cheng [MSFT] - 23 Apr 2008 11:28 GMT
Hi Jerry,

Have you got any progress on this issue? If there is anything else we can
help, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: stcheng@online.microsoft.com (Steven Cheng [MSFT])
>Organization: Microsoft
>Date: Mon, 21 Apr 2008 04:46:04 GMT
>Subject: RE: css style sheets not working

>Thanks for your reply Jerry,
>
[quoted text clipped - 45 lines]
>==================================================
>T

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.