I was helping to troubleshoot a problem with HttpWebRequest where a cookie came from the server but wasn't going back to the server.
The server (say www.foo.com) sends the cookie in the header of the response with attribute domain=www.foo.com. The .Net cookie class interprets this according to RFC 2965 and adds a period (dot) in front of the domain. So when we try to get the cookies for www.foo.com this cookie is not included. Specifying something like
myCookieContainer.GetCookies(new Uri("http://a.www.foo.com")
works though.
The way I understand the RFC is that the domain should be foo.com instead of www.foo.com. However both IE and Firefox accepts this and sends the cookie back so no web server developer or tester would ever pick this up because the major browser works.
Showing posts with label web server. Show all posts
Showing posts with label web server. Show all posts
Tuesday, July 29, 2008
Wednesday, October 03, 2007
tracing in asp.net
I am trying to use the trace.axd viewer to view page traces. I changed the <trace enabled='true' > tag in web.config and all I get was
--------------------------------------------------------------------------------
Server Error in '/xyz' Application.
--------------------------------------------------------------------------------
Trace Error
Description: Trace.axd is not enabled in the configuration file for this application. Note: Trace is never enabled when
Details: To enable trace.axd, please create a tag within the configuration file located in the root directory of the current web application. This tag should then have its "enabled" attribute set to "true".
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
--------------------------------------------------------------------------------
Turns out I have to restart the worker process in order to get it to work. Turning it off has no such problems though.
--------------------------------------------------------------------------------
Server Error in '/xyz' Application.
--------------------------------------------------------------------------------
Trace Error
Description: Trace.axd is not enabled in the configuration file for this application. Note: Trace is never enabled when
Details: To enable trace.axd, please create a
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
--------------------------------------------------------------------------------
Turns out I have to restart the worker process in order to get it to work. Turning it off has no such problems though.
Thursday, September 06, 2007
it might be obvious for others
This is definitely not obvious for me.
I did some performance tuning for our web app and cached some pages a while back. I did this:
<%@ OutputCache Location="Any" Duration="3600" VaryByParam="none"%>
I was going through the IIS logs as see that the page in question is still being requested a lot. Changing it to
<%@ OutputCache Location="Any" Duration="3600" VaryByParam="None"%>
does the trick. It seems implicit and I have definitely seen other people using the lower case version. But the attribute is CASE-SENSITIVE!!!
I did some performance tuning for our web app and cached some pages a while back. I did this:
<%@ OutputCache Location="Any" Duration="3600" VaryByParam="none"%>
I was going through the IIS logs as see that the page in question is still being requested a lot. Changing it to
<%@ OutputCache Location="Any" Duration="3600" VaryByParam="None"%>
does the trick. It seems implicit and I have definitely seen other people using the lower case version. But the attribute is CASE-SENSITIVE!!!
Thursday, August 19, 2004
Compression on IIS 6
Since this blog is closed for comments I have to add mine here:
http://weblogs.asp.net/owscott/archive/2004/01/12/57916.aspx
I was looking for ways to compress javascripts and google just keep return to the tool that does the metabase editing. Turns out the MSDN library has the description for the metabase entries. The HTML equivalent of what I've read is here:
www.microsoft.com/resources/documentation/ iis/6/all/proddocs/en-us/ref_mb_hcfileextensions.mspx
IIS has htm, html and txt turned on for static compression so I've added js and css.
One more thing, turning it on does wonders. I am doing performance testing a test cycle without compression involves around 7000 packets. Turn it on make it drop to about 3500.
http://weblogs.asp.net/owscott/archive/2004/01/12/57916.aspx
I was looking for ways to compress javascripts and google just keep return to the tool that does the metabase editing. Turns out the MSDN library has the description for the metabase entries. The HTML equivalent of what I've read is here:
www.microsoft.com/resources/documentation/ iis/6/all/proddocs/en-us/ref_mb_hcfileextensions.mspx
IIS has htm, html and txt turned on for static compression so I've added js and css.
One more thing, turning it on does wonders. I am doing performance testing a test cycle without compression involves around 7000 packets. Turn it on make it drop to about 3500.
Subscribe to:
Posts (Atom)