I'm a big fan of the renaming feature in visual studio. You can right click on any variable in your code and select Refactor -> Rename. Then rename the variable once and all other references are updated.
<% Response.Write(SOME C# CODE); %>My daily struggles as a developer. Questions, answers, and expressions of frustration.
I'm a big fan of the renaming feature in visual studio. You can right click on any variable in your code and select Refactor -> Rename. Then rename the variable once and all other references are updated.
<% Response.Write(SOME C# CODE); %>I was following the instructions that GoDaddy provided to install an new SSL cert on IIS6. These instructions cover how to get up and running on one web server, but they don't detail how to export the cert to other web servers. The site I was working on had several in a cluster.
set arithabort onset quoted_identifier onset arithabort offset numeric_roundabort offset ansi_warnings onset ansi_padding onset ansi_nulls onset concat_null_yields_null onset cursor_close_on_commit offset implicit_transactions offset language us_englishset dateformat mdyset datefirst 7set transaction isolation level read committedCREATE TABLE [dbo].[SpeedLog](
[Count] [int] NULL,
[Timestamp] [datetime] NULL,
[PerHour] [int] NULL,
[PerDay] [int] NULL
) ON [PRIMARY]
CREATE VIEW [dbo].[vw_Status]
as
SELECT
count(*) as [Count]
, CURRENT_TIMESTAMP as [Timestamp]
, (count(*)-MAX(lRow.UrlSnapShotsCount))/DATEDIFF(hour, MAX(lRow.[Timestamp]), CURRENT_TIMESTAMP) [PerHour]
, (count(*)-MAX(lRow.UrlSnapShotsCount))/DATEDIFF(hour, MAX(lRow.[Timestamp]), CURRENT_TIMESTAMP)*24 [PerDay]
FROM MyGrowingTable u
LEFT JOIN
(SELECT a.[Count], b.[Timestamp], a.PerHour, a.PerDay FROM SpeedLog a
INNER JOIN (SELECT MAX([Timestamp]) [Timestamp] FROM SpeedLog) b ON a.[Timestamp] = b.[Timestamp]) lRow
ON 1=1That is a bit much to throw at anyone all at once. To abstract it a little in pseudo code I'm saying:SELECT CurrentCount, (y2-y1)/(x2-x1) as PerHour, PerHour*24 as PerDayFROM MyGrowingTableLEFT JOIN (the most recently inserted row of my log table) lRowON 1=1
INSERT INTO SpeedLogSELECT * FROM vw_StatusI've done HttpModules in separate assemblies and don't remember integration being too tricky. But when I was just writing one within the App_Code of the same site I was having all sorts of issues. I think I found some common gotchas related to HttpModules.
First, my module was not loading but I didn't even get an error page. I was able to get useful errors by switching the App Pool of the site to "Classic .NET AppPool" from the "DefaultAppPool". Turns out this did more than give me error messages, when all was finished I had to have this classic app pool for the module to work. Thanks to lucky abhishek for figuring out the app pool problem first.
Once I was seeing errors I first found that I had other modules in a parent site that could not load. In IIS web.config settings from parent sites are inherited by sites in any virtual sub directories. So I was loading other HttpModules that I didn't care about in this sub site. I fixed this with a quick
<remove name="NameOfModuleIDontHave" />
<add type="ParentNamespace.SubNamespace" name="MyClassName" />
<add type="ParentNamespace.SubNamespace.MyClassName" name="MyClassName" />
<add type="ParentNamespace.SubNamespace.MyClassName,App_code" name="MyClassName" />
It is one of those features that never gets any hype. Much like the quick launch bar, windows allows you to add your own custom taskbar toolbars. Just
- right click the taskbar- Toolbars -> New Toolbar- Point to a folder and you're all set.

cmd /k cd "C:\My Solutions\My Project\bin\Debug"
Say you want to create a directory that points to another directory. For example something in your home directory that point to a long and convoluted path that you often have to go down. In Linux the answer is pretty easy, the ln command. Here is a decent forum post on using the ln command.
cd "C:\Some\Long\Directory\Path"
cmd /k cd "C:\My\Dir"if you like a little point and click in your life.
Copyright © 2010 Cold Black Coffee
Icons & Wordpress Theme by N.Design | Blogger Templates by Blog and Web