glsac
asked on
IIS Compression
I enabled IIS compression and now I am having problems with .ics and .rtf files...is there a way to exclude those MIME types?
-Joe
-Joe
What version of IIS are you using?
What problem are you experiencing with the two file types?
Dave Dietz
What problem are you experiencing with the two file types?
Dave Dietz
ASKER
I am using IIS with windows server 2003...I have compression setting up using GZIP (modified the xml file etc.) the problem which I had before when I use a custom http module for compression is that when I attempt to download an ics or rtf file that is created on the server it throws errors..or attempts to download an aspx page. I fixed this last time in my custom http Module by excluding file types rtf and ics from being compressed...so is there a way to do that in IIS as well?
ASKER
Anyone have an idea on this?
By default IIS will only compress HTM, HTML and TXT file types.
I'm not clear on the part about the custom HTTP module though....what is that and how does it fit into the picture?
Is this an ASP.Net HTTP Handler?
Dave Dietz
I'm not clear on the part about the custom HTTP module though....what is that and how does it fit into the picture?
Is this an ASP.Net HTTP Handler?
Dave Dietz
ASKER
Well the httpmodule that I had is no longer used...I just remember that I had to exclude MIME types from being compressed...I also read something about Response.Flush() Response.End() that could mess it up?
Hmmm, guess the two aren't really related since IIS HTTP Compression doesn't use ASP or ASP.Net and doesn't look at MIME types at all.
How did you enable HTTP Compression in IIS?
Are you sure that the errors you are receiving are actually related to HTTP Compression?
What are the actual errors you are experiencing now?
Dave Dietz
How did you enable HTTP Compression in IIS?
Are you sure that the errors you are receiving are actually related to HTTP Compression?
What are the actual errors you are experiencing now?
Dave Dietz
ASKER
I followed various blogs to get HTTP compression set up in IIS...and used fiddler to test and sure enough it is GZIP compressed.
I am not sure they are 100% related, but if I take compression off it works :) Seems to be related to compression.
Basically I dynamically create an ics (VCAL file) and on another page I dynamically create an rtf file...instead of these being created, it just opens up an aspx page now...does not create these files...
I am not sure they are 100% related, but if I take compression off it works :) Seems to be related to compression.
Basically I dynamically create an ics (VCAL file) and on another page I dynamically create an rtf file...instead of these being created, it just opens up an aspx page now...does not create these files...
Ahhh, so the files are not physically there - they are created on the fly by an ASPX page?
Have you enabled compression for Dynamic content?
Do other ASPX pages work properly?
Is the directory where the pages are that create these files has the directory been set to allow scripts to run?
Dave Dietz
Have you enabled compression for Dynamic content?
Do other ASPX pages work properly?
Is the directory where the pages are that create these files has the directory been set to allow scripts to run?
Dave Dietz
Hi,
so you have some aspx script that generates the vcal and delivers it (in stream) to the client? If so, then that would be the problem I suspect, because IIS would have no way of knowingthe difference between a script that generates plain html or one that generates something different - you would need to disable compression on the application files then.
Regards.
so you have some aspx script that generates the vcal and delivers it (in stream) to the client? If so, then that would be the problem I suspect, because IIS would have no way of knowingthe difference between a script that generates plain html or one that generates something different - you would need to disable compression on the application files then.
Regards.
ASKER
To answer both of you...
I have enabled dyanmic-content...and other aspx pages work fine. If i disable dynamic content I kind of lose it for all aspx pages...I am trying to figure out how to do it for these 2 aspx pages...can I disable for a page level...or am I just out of luck :(
I have enabled dyanmic-content...and other aspx pages work fine. If i disable dynamic content I kind of lose it for all aspx pages...I am trying to figure out how to do it for these 2 aspx pages...can I disable for a page level...or am I just out of luck :(
I can think of one tricky way around this.
Create a new script mapping at the root of the site or on the particular vdir these pages are in (if it is an application root of its own) called something like .aspxuc.
Set the mapping to point to C:\WINDOWS\Microsoft.NET\F ramework\v 1.1.4322\a spnet_isap i.dll
Set the Verbs to GET,HEAD,POST,DEBUG
Deselect 'Verify that file exists'
Now, rename your two pages from ASPX to ASPXUC.
They should now get processed like normal ASPX pages but won't get compressed since their file extensions won't match the Dynamic Compression parameters.
If you try this I'm very curious to know if it works..... :)
Dave Dietz
Create a new script mapping at the root of the site or on the particular vdir these pages are in (if it is an application root of its own) called something like .aspxuc.
Set the mapping to point to C:\WINDOWS\Microsoft.NET\F
Set the Verbs to GET,HEAD,POST,DEBUG
Deselect 'Verify that file exists'
Now, rename your two pages from ASPX to ASPXUC.
They should now get processed like normal ASPX pages but won't get compressed since their file extensions won't match the Dynamic Compression parameters.
If you try this I'm very curious to know if it works..... :)
Dave Dietz
yeah! good lateral thinking. I'm also keen to find out if that works! :-)
Cheers.
Cheers.
ASKER
Interesting...OK I am gonna give this a shot in the morning!
Oops. :-(
Went poking around in the Metabase settings and found a *much* easier way to do this......
There is a setting for compression that can be set at the directory or even the file level.
You can set this using adsutil.vbs:
cscript adsutil.vbs set w3svc/1/root/vdirname/file name.ext/D oDynamicCo mpression FALSE
Use this to set the two specific pages to FALSE for dynamic compression at it should do the trick.....
Dave Dietz
Went poking around in the Metabase settings and found a *much* easier way to do this......
There is a setting for compression that can be set at the directory or even the file level.
You can set this using adsutil.vbs:
cscript adsutil.vbs set w3svc/1/root/vdirname/file
Use this to set the two specific pages to FALSE for dynamic compression at it should do the trick.....
Dave Dietz
ASKER
Dave-
I tried the first thing yoo mentioned .aspxuc...this did not work, as the page just hung.
This second thing you are saying:
cscript adsutil.vbs set w3svc/1/root/vdirname/file name.ext/D oDynamicCo mpression FALSE
I guess this is easier...but still is based off the aspxuc idea?
I tried the first thing yoo mentioned .aspxuc...this did not work, as the page just hung.
This second thing you are saying:
cscript adsutil.vbs set w3svc/1/root/vdirname/file
I guess this is easier...but still is based off the aspxuc idea?
Nope, entirely different..
This metabase entry will tell IIS to not compress those files.
You can add this setting at the root, vdir or file level and will simply mark the content as non-compressible.
I would have suggested this first but I forgot there is a DoDynamicCompression entry as well as an HcDoDynamicCompression entry.
The Hc entry is for the service - to turn compression on or off globally. The entry without the Hc is for individual entries to determine whether they are affected by the compression if it is enabled globally.
Dave Dietz
This metabase entry will tell IIS to not compress those files.
You can add this setting at the root, vdir or file level and will simply mark the content as non-compressible.
I would have suggested this first but I forgot there is a DoDynamicCompression entry as well as an HcDoDynamicCompression entry.
The Hc entry is for the service - to turn compression on or off globally. The entry without the Hc is for individual entries to determine whether they are affected by the compression if it is enabled globally.
Dave Dietz
ASKER
I keep getting Error Trying to GET the schema of the property IIS://Localhost/Schema/Def ault
I have the sites on a different drive (not c:\inetpub\wwwroot)...does this matter?
I have the sites on a different drive (not c:\inetpub\wwwroot)...does
>> cscript adsutil.vbs set w3svc/1/root/vdirname/file name.ext/D oDynamicCo mpression FALSE
ooh, now there's a good reason to go hunting through metabase more often :)
ooh, now there's a good reason to go hunting through metabase more often :)
ASKER
Any idea on how to fix that problem I had?
What is the exact command line you are using?
Dave Dietz
Dave Dietz
ASKER
cscript.exe adsutil.vbs set w3svc/1/root/Default Web Site/vcal.aspx/DoDynamicCo mpression FALSE
Ok, couple things I have found....
First, go into the IIS management console and make some sort of configuration change to the vcal.aspx page - can be something as simple as change the auth method and then chage it back.
This creates the initial metabase entry for the file.
Next, we need to change the command slightly since you have spaces in the name:
cscript.exe adsutil.vbs set "w3svc/1/root/Default Web Site/vcal.aspx/DoDynamicCo mpression" FALSE
All of this is assuming that the URL to the file is http://servername/default web site/vcal.aspx
If the URL is actually http://servername/vcal.aspx then use the following command:
cscript.exe adsutil.vbs set "w3svc/1/root/vcal.aspx/Do DynamicCom pression" FALSE
If this is not the default web site (site instance 1) then you will need to change the 1 to whatever the site instance number is.
Dave Dietz
First, go into the IIS management console and make some sort of configuration change to the vcal.aspx page - can be something as simple as change the auth method and then chage it back.
This creates the initial metabase entry for the file.
Next, we need to change the command slightly since you have spaces in the name:
cscript.exe adsutil.vbs set "w3svc/1/root/Default Web Site/vcal.aspx/DoDynamicCo
All of this is assuming that the URL to the file is http://servername/default web site/vcal.aspx
If the URL is actually http://servername/vcal.aspx then use the following command:
cscript.exe adsutil.vbs set "w3svc/1/root/vcal.aspx/Do
If this is not the default web site (site instance 1) then you will need to change the 1 to whatever the site instance number is.
Dave Dietz
ASKER
OK...two more questions then (BTW really appreciate this)
1. "If this is not the default web site (site instance 1) then you will need to change the 1 to whatever the site instance number is." How do I get that instance number?
2. cscript.exe adsutil.vbs set "w3svc/1/root/Default Web Site/vcal.aspx/DoDynamicCo mpression" FALSE --> vcal.aspx is in a virtual directory under Default Web Site...how can I make it see that?
THANKS so much!
1. "If this is not the default web site (site instance 1) then you will need to change the 1 to whatever the site instance number is." How do I get that instance number?
2. cscript.exe adsutil.vbs set "w3svc/1/root/Default Web Site/vcal.aspx/DoDynamicCo
THANKS so much!
1) If you right-click on the Web Sites folder in the management console you can see the site instance numbers listed in the right hand panel with each site.
2) Assume the vdir under the default web site is called mynamehere - the command line would look like this:
cscript.exe adsutil.vbs set "w3svc/1/root/mynamehere/v cal.aspx/D oDynamicCo mpression" FALSE
If the path to the page was http://<whatever site has instance number 38878854>/mynamehere/yourn amethere/v cal.aspx the command line would look like this:
cscript.exe adsutil.vbs set "w3svc/38878854/root/mynam ehere/your namethere/ vcal.aspx/ DoDynamicC ompression " FALSE
Hope that helps.... :-)
Dave Dietz
2) Assume the vdir under the default web site is called mynamehere - the command line would look like this:
cscript.exe adsutil.vbs set "w3svc/1/root/mynamehere/v
If the path to the page was http://<whatever site has instance number 38878854>/mynamehere/yourn
cscript.exe adsutil.vbs set "w3svc/38878854/root/mynam
Hope that helps.... :-)
Dave Dietz
ASKER
Well I am almost there...
I actually could not see the instance numbers, but I ran: findWeb.vbs "Default Web Site" and that gave me 4....so now I have:
cscript.exe adsutil.vbs set "w3svc/4/root/Default Web Site/Indigo/MSM/vcal.aspx/ DoDynamicC ompression " FALSE
Default Web Site is root site, Indigo is a folder under that (not a virtual directory)...then MSM is in Indigo and is a virtual directory. I got a Error trying to get the object....this is a different error than before. I also found that the MSM virtual site was 793338 (id in IIS)..so I tried that, but still I got the same object error :(
Sorry...but I think we are almost here this time. I do appreciate all the help!
I actually could not see the instance numbers, but I ran: findWeb.vbs "Default Web Site" and that gave me 4....so now I have:
cscript.exe adsutil.vbs set "w3svc/4/root/Default Web Site/Indigo/MSM/vcal.aspx/
Default Web Site is root site, Indigo is a folder under that (not a virtual directory)...then MSM is in Indigo and is a virtual directory. I got a Error trying to get the object....this is a different error than before. I also found that the MSM virtual site was 793338 (id in IIS)..so I tried that, but still I got the same object error :(
Sorry...but I think we are almost here this time. I do appreciate all the help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nope that did not work...the link (oddly enough) is:
http://MySite/Indigo/msm/msm/vcal.aspx (dev environment where I am testing this)
https://www.MySite.com/Indigo/msm/msm/vcal.aspx (live site)
Both about the same....the first msm is a virtual directory...seems its an extra layer deep...I do not know why this was done...but in any event :)
http://MySite/Indigo/msm/msm/vcal.aspx (dev environment where I am testing this)
https://www.MySite.com/Indigo/msm/msm/vcal.aspx (live site)
Both about the same....the first msm is a virtual directory...seems its an extra layer deep...I do not know why this was done...but in any event :)
ASKER
Well I finally got it to work...I lookek into the metafile and saw the vcal.aspx created and from there saw the root and was able to modify it...I actually could have just went in here and set the flag of compression to FALSE....but now that this is done I have to rebuild the project and test it...I will let ya know what happened.
ASKER
WOW! It works...thanks so much for your time!!!!
Glad that worked for you..... :)
Dave Dietz
Dave Dietz
compression only works when the browser at the other end supports it. browser support should be provided as part of the request header and so IIS shouldn't compress files that are sent to clients that do not purport to support compression.
well at least that is my understanding of the matter :-}
so what I am trying to say is that you should not get such a problem just from enabling compression. thus my question to you is what is the problem symptom, maybe the root cause is something else? (though related probably)
Cheers.