Thursday, January 5, 2012

Some browsers use .domain.com as wildcard, others use domain.com
It is common practice for a user to forget the www and most servers will return the same page for www or non-www.
If a user vists the non-www version of a website & the server returns a sessionID cookie, the browser may consider it a wildcard cookie, thus it will use that same cookie for ALL request to ANY subdomain of that site. Normally, each subdomain would have a separate set of cookies, so the server would generate a different sessionId for each.

Here's a method you can call in the Application_EndRequest method of the global.asax.cs to prevent this from happening.

Wednesday, June 15, 2011

I found a cool tool today for doing mutation testing in C#. Basically, it runs your unit tests to analyze your code coverage, then it purposefully modifies the sections of your code that are covered, to see if the tests will still pass. The theory is, if the tests pass, then even though you have coverage, you're not asserting the right things. So, it helps you analyze the quality of your unit tests.
Check it out here: http://galera.ii.pw.edu.pl/~adr/CREAM/index.php

When creating a branch from main to release you may get an error like this:

Branch from Main

TF14098: Access Denied: User CTAC\dgarner needs Read permissions(s)

for $/RxInfoInquiry/Main/*.

Even though you're able to get latest on main & build/run the app, there is some random file/folder underneath the main branch that you don't have permissions to. This is causing you to not be able to make a new release branch.

You'll need to find the file & add read permissions to [DefaultCollection]\Contributors (assuming you're a developer & in that group).

There is a command-line utility called "TF" that you can use to interact with TFS. You can access it through the

"Visual Studio Command Prompt" found on your start menu.

To find the problem file, you'll need to recurse through all the items in the project & check their permissions.