My problem is whenever i execute my app the first page that loads is the login page pointed to by my web.config file forms authentication, this page is meant to show CSS formatting for the info i am displaying but it is not. Any help with this problem would
be great. A cut and paste of my problem is shown below as you can see there is no CSS.
What happens if you try and navigate directly to the stylesheet? If you view the source on the rendered web page is the path correct. Where did you place the code I sugested, it should go inside the configuration element but outside the system.web element.
I entered the code as you directed in several different fashions /styles/site.css, etc, don't get me wrong it does work i just found out when i navigate forward that is entering the username and password and then navigating back to the login page the css
is working fine i believe the problem is an page load fault but still could be something to do with the web.config
I cant see the location configuration I posted earlier. It should go before the last </configuration> tag. You can try changing the styles to ~/styles. What happens if you try to navigate directly to the stylesheet before you log in. I.e. if you put styles/site.css
in place of your login.aspx in the address bar?
if you want you can download the entire code from sourceforge.net
http://basiccrm.sourceforge.net all you need is mySQL installed preferably with administrator and query browser so you can execute the stored procedures, the stored procedures are held within a folder named mysql. I'll try what you stated and leave it in
the .config file but please feel free to download the app and try it out, any advice on how to better it would be fantastic
thunder1234
Member
18 Points
34 Posts
On page loading or executing all CSS flags are ignored and website is plain without formatting
May 29, 2010 02:44 PM|LINK
My problem is whenever i execute my app the first page that loads is the login page pointed to by my web.config file forms authentication, this page is meant to show CSS formatting for the info i am displaying but it is not. Any help with this problem would be great. A cut and paste of my problem is shown below as you can see there is no CSS.
jsfdnjldfngjfg here it is
<div align=center sizcache="1" sizset="0">I have inserted all the link as in:
<!
<
<
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />and i am using a web user control to display the login any help would be great
RichardPerry
Member
178 Points
34 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 29, 2010 03:34 PM|LINK
You will need to add an exception in your web.config file to allow anonymous users to access the css file.
<location path="styles"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location>Hope this helps
Richard
eInfinity Limited
thunder1234
Member
18 Points
34 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 29, 2010 05:02 PM|LINK
Didn't work unfortunately got any other ideas
RichardPerry
Member
178 Points
34 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 29, 2010 05:21 PM|LINK
What happens if you try and navigate directly to the stylesheet? If you view the source on the rendered web page is the path correct. Where did you place the code I sugested, it should go inside the configuration element but outside the system.web element.
Regards
Richard
eInfinity Limited
thunder1234
Member
18 Points
34 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 29, 2010 05:28 PM|LINK
I entered the code as you directed in several different fashions /styles/site.css, etc, don't get me wrong it does work i just found out when i navigate forward that is entering the username and password and then navigating back to the login page the css is working fine i believe the problem is an page load fault but still could be something to do with the web.config
RichardPerry
Member
178 Points
34 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 29, 2010 05:44 PM|LINK
can you post your web.config?
Regards
Richard
eInfinity Limited
Caspar Kleij...
Contributor
2680 Points
447 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 29, 2010 05:51 PM|LINK
it is in the ~ that the path to the stylesheet is incorrect
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
change it to the proper path. I don't think you can use a plain runat="server" on the link tag
use it with <link href='<%=ResolveUrl("~/Styles/Site.css")%>' rel="stylesheet" type="text/css" runat="server" />
Caspar Kleijne,
the Netherlands
thunder1234
Member
18 Points
34 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 30, 2010 07:43 AM|LINK
I tried using your statement it didn't work it was a copy and paste job here is a copy of my web.config
<?
<!--
xml version="1.0"?>For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
<
<
<
</
-->configuration>connectionStrings>add name="MySQLConnectionString" connectionString="server=localhost; user id=root; password=root; database=test1;" providerName="MySql.Data.MySqlClient"/>connectionStrings><
<
</
<
<
<
</
<
<
<
<
<
</
<
<
<
</
<
<
<
<
</
</
<
<
<
<
</
</
<
<
<
<
<
</
</
</
<
<
<
<
<
</
</
</
appSettings>add key="ChartImageHandler" value="Storage=file;Timeout=20;Url=~/tempImages/;"/>appSettings>system.web>httpHandlers>add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>httpHandlers>compilation debug="true" targetFramework="4.0">assemblies>add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation>authentication mode="Forms" >forms name=".WebApplication1" loginUrl="login.aspx" protection="All" timeout="60"/>authentication>machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1"/>authorization>deny users="?"/>authorization>membership>providers>clear/>add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>providers>membership>profile>providers>clear/>add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>providers>profile>roleManager enabled="false">providers>clear/>add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>providers>roleManager>system.web>system.webServer>modules runAllManagedModulesForAllRequests="true"/>handlers>remove name="ChartImageHandler"/>add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>handlers>system.webServer>configuration>Sorry about the sloppy formatting if you want i will reply with a fully formatted version but it will take time
RichardPerry
Member
178 Points
34 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 30, 2010 10:05 AM|LINK
I cant see the location configuration I posted earlier. It should go before the last </configuration> tag. You can try changing the styles to ~/styles. What happens if you try to navigate directly to the stylesheet before you log in. I.e. if you put styles/site.css in place of your login.aspx in the address bar?
Regards
Richard
eInfinity Limited
thunder1234
Member
18 Points
34 Posts
Re: On page loading or executing all CSS flags are ignored and website is plain without formattin...
May 30, 2010 02:04 PM|LINK
if you want you can download the entire code from sourceforge.net http://basiccrm.sourceforge.net all you need is mySQL installed preferably with administrator and query browser so you can execute the stored procedures, the stored procedures are held within a folder named mysql. I'll try what you stated and leave it in the .config file but please feel free to download the app and try it out, any advice on how to better it would be fantastic