From Cassini to Live

Jun 6, 2009 at 1:46 AM

Hi Miron, a quick question..

Testing locally in visual studio, everything worked perfectly. I publish my project and copy it over to the web server and none of the js nor css files work on the page. I looked into the Firefox Error console and got these msgs :

Error: The stylesheet http://www.website.com/css/css.axd?d=style.css,container.css,jq.css,tabs.css,fmenu.css,tooltip.css was not loaded because its MIME type, "text/html", is not "text/css".

Line: 0

and this

Error: syntax error
Source File: http://www.website.com/javascript/jslib.axd?d=jquery.js,jquery.cyclepack.js,swfobject.js,jqModal.js,lt.js,tabs.js
Line: 2
Source Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

What permissions/configurations do i need to possibly setup in IIS to get your framework to work successfully?

Thanks!

 

Jun 6, 2009 at 2:56 AM

In case you set cachingStorage="OutputCache", you need a read permission to the ASPNET user for all the css & js files (or folder).

There shouldn't be a problem.

Try to see (using Firebug)  the content that was sent by the server in the url s you posted. It should be an error message.

 

Jun 6, 2009 at 3:54 PM

Hi Miron and thanks for responding so quickly.

I'm still abit stumped. I fiddled with alot of settings and still nothing. I used FireBug and saw the errors. The first Error is a syntax error on this line :

http://www.website.com/javascript/jslib.axd?d=jquery.js,j.cpack.js,swfobject.js,Modal.js,lt.js,tabs.js

then the rest are javascript errors.

Do i have to somehow register css.axd or jslib.axd? In firebug when i click to see the source code of the line above which jslib generated it shows me nothing, as if it never executed.

All the webconfig entries are there as they should be.

maybe any other clues you could give me would help very much!

Thanks Miron,

Daniel

Jun 6, 2009 at 4:37 PM

@Daniel,

Can you post the code how you set the javascript in you html page? (e.g: <script type="text/javascript" src="javascript/jslib.axd?d=jquery.js,j.cpack.js,swfobject.js,Modal.js,lt.js,tabs.js"></script> )

Do you have any webresource.axd in your page ? and are they working fine ?

Does your virtual directory in the IIS set to ASP.NET version 2 ?

 

Miron

Jun 6, 2009 at 5:40 PM
<link rel="stylesheet" type="text/css" href="/css/css.axd?d=style.css,container.css,jq.css,tabs.css,fmenu.css,tooltip.css"></link>
<script type="text/javascript" src="/javascript/jslib.axd?d=jquery.js,jquery.cyclepack.js,swfobject.js,jqModal.js,lt.js,tabs.js"></script>

The css files are all in the /CSS folder and javascript all in /javascript.

After abit more research, I'm starting to believe that it has to do with the declaration of your framework in the WebConfig. I am using IIS7 on the web server.

There is the <system.web> and <system.webServer>. I tried both and to still no avail.

In <system.webServer>

         <add name="jslib" verb="*" path="jslib.axd" type="Miron.Web.MbCompression.JavaScriptCompressionHandler, MbCompression"/>
         <add name="css" verb="*" path="css.axd" type="Miron.Web.MbCompression.CssCompressionHandler, MbCompression"/>

 

 

Jun 6, 2009 at 6:04 PM

Ahh, you are using IIS7 !!

I did tested it on IIS7 once and I had to change some things. It was some time ago and I really don't remember.

The point is, that the compression can work on IIS7 after some modification.

I'm planing to install IIS7 on my local server in the few weeks. Until than, I can't help you.

Sorry.

If you did make it work some how, please send me what did you had to modify so I can add it to the implementations instructions.

Good luck.