[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

StyleSheet not working in ASP.NET 4.0 and IIS7

Posted on 2011-02-27
7
Medium Priority
?
4,133 Views
Last Modified: 2012-05-11
Hello,

I have a ASP.NET web application in Visual Studio 2010, that I have been working on for the past month using the ASP.NET development server. When I tried to set it up to run under IIS7, it does not work properly: the StyleSheet is not detected and the pages render as without any CSS styles.

I have checked all the paths and <link> tags within the application, and they are correct. I think it has something to do with IIS7 settings which I cant seem to figure out.

A bit of a background: I am running Windows 7 OS with MS SQL Server 2008 R2.
I ran the "aspnet_regiis.exe -i" after installing IIS7 (I installed II7 after installing Visual Studio 2010 on my dev machine). when I tried to use the regsvr32 command to register aspnet_isapi.dll, it gave me an error: "aspnet_isapi.dll was loaded but the entry-point DllRegisterServer was not found." But I think this should not be a problem because, I have another Web Application, "DotNetNuke" setup correctly on my same machine and it runs absolutely fine (no CSS problems). The only thing different between DNN and my Application is that my application is configured as a website under the root "Default Web Site" node in IIS7.

would really appreciate if I could get some help. Thanks in advance.
0
Comment
Question by:Atif-XiChi
[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
  • 5
  • 2
7 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 34992987
0
 

Author Comment

by:Atif-XiChi
ID: 34993321
hello jacko72,

My IIS7 Manager does not look like anything which is shown in the blog you posted. It says IIS7 Manager should look like the following:
 install-iis7-02.png

when in fact, my IIS7 Management console look like following on Win7 machine:
 IIS7 Management console on my machine
you can clearly see that the Roles, Features, Diagnostics, Configuration and Storage nodes are just not there in my IIS7 Manager left pane...

Am I missing something? Please help! thanks for your reply
- Atif
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 34993401
In Add/Remove Windows Features in control panel, Expand World Wide Web Services, Expand Common HTTP Features, Ensure Static content is checked. I would check everything here. Click OK
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:Atif-XiChi
ID: 34993425
I have done that, and checked everything under IIS in Windows Features On/Off...

but still the same problem. and now one additional problem: when I change my web project properties to make it run under ASP.NET internal development server, it behaves in the same manner as under IIS: No CSS... whereas, before I started out to set up IIS7 it was running fine under internal development server.

appreciate you time. Please help! Thanks
0
 

Author Comment

by:Atif-XiChi
ID: 34993458
hello,

I now think that it is not a problem with IIS7.

I have written a Custom Membership Provider (as a class library) and am using that on my website. I have set up Forms Authentication and when I use the following tag in web.config:

<authorization>
      <deny users="?" />
      <allow users="*" />
</authorization>
   
the login page that I see does not have any CSS.

when I allow anonymous access (by removing  the line <deny users="?" />), I see that all the forms, including the Login page, display correctly (with CSS enabled and styles applied), both on IIS7 as well as the internal development server.

does anyone have any idea what is going on?

Thanks in advance.
- Atif
0
 

Accepted Solution

by:
Atif-XiChi earned 0 total points
ID: 34993555

the issue now resolved. I had set the authorization false on the whole directory; which meant that the CSS file itself was not accessible to unauthorized users. allowing ALL users full access to CSS files (through web.config) solved the issue.

thanks for your time.

Atif
0
 

Author Closing Comment

by:Atif-XiChi
ID: 35034674
the reason is that I did the research and hard work to find the solution.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

649 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