ASP.NET Tracing 23 July 2004 at 00:00
If you want to quickly create trace files (say you want to get an average load time for your page over 10 loads) you can use the .net tracing view trace results. There are two ways of doing this:

Visibly

In the page tag on your .aspx file, add the Trace="True" attribute. This will spew out all trace information to your web page.

Using an axd file

Add this to your web config:

    <trace
        enabled="true"
        requestLimit="10"
        pageOutput="false"
        traceMode="SortByTime"
        localOnly="true"
    />

You can then access the trace output from the web browser e.g. http://localhost/mysite/trace.axd. If you use this method, be sure to remove the Trace attribute from your page tag in the .aspx file if you want the page's tracing to appear. For all pages you do not want traced, set Trace="False" and they will not output tracing or be logged in the Trace.axd file.

.NET Policy redirects 29 July 2004 at 00:00
Sometimes you may want calls to an older version of a component in the GAC to be diverted to a newer version of the component.

In order to do this, you need to create a policy redirect file and drop this into the GAC. The following must be done (the example is for an assembly named My.Assembly:

1. Create an XML file containing redirect information

  <?xml version="1.0" encoding="utf-8" ?>
  <configuration>
    <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
          <assemblyIdentity name="My.Assembly" publicKeyToken="17374ea5a1072ad8" />
          <bindingRedirect oldVersion="1.0.0.2" newVersion="1.0.1.0" />
          <bindingRedirect oldVersion="1.0.1.0" newVersion="1.0.2.0" />
          <bindingRedirect oldVersion="1.0.2.0" newVersion="1.0.3.0" />
        </dependentAssembly>
      </assemblyBinding>
    </runtime>
  </configuration>

In this example, the XML file is called "policy.1.0.My.Assembly.xml".

2. Create the policy redirect DLL

Use the Assembly Linker tool to create the policy redirect dll:

al /link:policy.1.0.My.Assembly.xml /out:policy.1.0.My.Assembly.dll /keyfile:"C:DevKeyFilessgKey.snk" /version:1.0.2.0

3. Add redirect to the GAC

Step 2 should have created a dll file which can then be dragged and dropped in the GAC (usually located at C:WinNTassembly.

CSS Opacity 29 July 2004 at 00:00

The following class should be applied to an element to make it opaque:

.opaque {
	opacity: .5;
	filter: alpha(opacity=50);
	-moz-opacity: .5;
}

where:
- opacity is for Safari
- filter is for IE
- -moz-opacity is for Mozilla

This specifies an opacity of 50% i.e. semi-transparent where 100 is not transparent and 0 is completely transparent. Note that the width OR height of the opaque element needs to be specified for opacity to work in IE.

Tracing with ASP.NET 23 July 2004 at 00:00
If you want to quickly create trace files (say you want to get an average load time for your page over 10 loads) you can use the .net tracing view trace results. There are two ways of doing this:

Visibly

In the page tag on your .aspx file, add the Trace="True" attribute. This will spew out all trace information to your web page.

Using an axd file

Add this to your web config:

    <trace
        enabled="true"
        requestLimit="10"
        pageOutput="false"
        traceMode="SortByTime"
        localOnly="true"
    />

You can then access the trace output from the web browser e.g. http://localhost/mysite/trace.axd. If you use this method, be sure to remove the Trace attribute from your page tag in the .aspx file if you want the page's tracing to appear. For all pages you do not want traced, set Trace="False" and they will not output tracing or be logged in the Trace.axd file.