Tuesday, December 23, 2008
Internet Explorer / Google Chrome (Gradients)
Comparrison of Internet Explorer and Google Chrome displaying gradients. Can you tell the difference?
Friday, December 5, 2008
Visual Studio Closes when Opening a Solution
The Solution was .NET 2.0 and there were .NET 3.0 values in the Web.config
Saturday, November 15, 2008
Remove Meraki Toolbar
"The toolbar at the top of your browser serves up local advertising, which is one of the ways we may be able to keep Internet access free."
Personally, I don't like anyone to have control over my browser...not even me! I found out that this toolbar can be removed in FireFox using an add-on called Adblock Plus which is a free download.
- Open FireFox
- Tools
- Get Extensions (bottom left link)
- Search for 'Adblock Plus' and then 'Add to FireFox'
- Add a filter: 'meraki.com/toolbar'
Unfortunately, Adblock Plus is not available for Internet Explorer. It is very interesting to read the developer's comments regarding the cost of creating an IE add-on that performs the same task: http://adblockplus.org/blog/adblock-for-internet-explorer-is-not-an-option
Be careful of rip-offs for Internet Explorer with the same name:
http://www.download.com/Adblock-Plus-for-IE/3000-12770_4-10690444.html
I develop custom applications and only test in Internet Explorer becacause our customers use IE. I really don't like to switch between browsers, but while I am on this network I will be using FireFox. I'm glad that there's an alternative that allows me to feel comfortable, cozy, and secure.
Thursday, August 21, 2008
HTTP 401.2 - Unauthorized
<authorization> <deny users="?"/> </authorization>
This could be causing the error.
Saturday, August 16, 2008
Telerik with VS 2008 - Working with 2.0 Framework
Here is the properties of the DLL in our Library folder which we reference:
Originally, the Telerik installation only installed the 3.5 components. I unchecked all of the 3.5 components and created a new tab in the Toolbox. Then I Browsed to the Telerik DLL above and the result was that these components were added.
When I drag a control onto an ASPX page, this is the error I receive:
Here is the Web References:
Here is the Build settings:
Thursday, August 14, 2008
File has invalid value ">>>>>>> .mine". Illegal characters in path.
Delete the /obj folder in each project that is complaining and re-compile.
Wednesday, August 13, 2008
Cannot update project reference. Source project not available.
1. Right click over web site project
2. select property pages
3. inside category References search the project for (unavalable)
4. select and remove those references
Thursday, July 31, 2008
Delete SVN Folders Windows Vista
I found this which does work...
http://britishinside.com/archive/2008/03/06/The-Deleting-SVN-Folders-meme.aspx
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]
@="Delete SVN Folders"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn _svn) DO RD /s /q \"%%f\" \""
Copy the text and paste it into a text file called 'svn.reg'. Save the file and open it to add these keys to your registry. Then all you have to do is right-click on the folder and choose "Delete SVN Folders". It's even easier than the Search and Delete method :)
Here's a Delete PDB files shell:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeletePDB]
@="Delete PDB Files"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeletePDB\command]
@="cmd.exe /c \"TITLE Removing PDB Files in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (*.pdb) DO DEL /s /q \"%%f\" \""
.
Monday, July 28, 2008
JavaScript Current URL Including Querystring
window.location = location.href;
Another recommendation was:
window.location.reload();
The one above worked for my needs, and the one below did not. I'm sure it depends on your situation.
WebDrive Automatically Downloading Files
I thought my FTP Client had been possessed by a ghost. WebDrive worked fine on Windows XP, but after installing on Windows Vista it got a life of its own. By browsing an FPT folder, it would start downloading files into the ether. Try canceling and it would come back to life to steal my bandwidth and download worthless bytes of data.
After a bit of digging I found this...
http://srthelpdesk.helpserve.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=62
WebDrive isn't automatically downloading the files it's actually Windows Explorer or another process downloading the files anytime something accesses them. Most likely there are programs running in the background such as anti virus real-time scanning that may be accessing these files. WebDrive will NEVER download a file on it's own, it's always in response to an application opening the file and reading data from it. Explorer column hanlders or thumbnail viewers do this.
You can try the following to prevent downloading by explorer
- In Windows explorer, choose Tools/Folder Options / View Tab. Make sure "Show popup descriptions" is off, also make sure the explorer "View" mode is set to Details, not "Icons" or "Thumbnails".
- Also in WebDrive make sure you have enabled "Disable shell column handlers" on the program settings/general settings dialog.
- For Vista turn on the option "Disable explorer icon handler" on the site properties/file settings dialog.
So far so good. Computer exorcism has occurred and I'm back in business.
Windows Vista vs. Windows XP
Windows Vista is a turd. I have finally had to eat Vista for breakfast, lunch, and dinner and compared to XP it's a big slop of fat with lard icing. Besides the minor unnessesary changes, I have managed to lock up the system twice in the last 30 minutes to the point of re-boot. No more "blue screen of death". It's been replaced by a 'hanging processes' for infinity while 'end process' becomes a nice game of nothingness. It's a memory hog and a hard drive hog, and what have I gained? I have gained a machine that sounds like a jet engine which produces enough heat to cause my shoes to melt. Wow! A quad processor and 4GB of RAM that is needed to make this elephant fly.
I don't think it's really Microsoft's fault. Well, I guess it is...I'm sure I have programs installed that are not 'compatible' with Vista - whatever that means.
SQL DateTime British / U.S. Conversion Issue
yyyy-MM-dd HH:MM:ss.mmm
This seems to work except there is an issue with time. I haven't figured out what the issue is yet, but I wanted to post the format for anyone looking to resolve this issue.
Wednesday, July 23, 2008
The Most Clickable HTML Link Color
Click Me! I'm Google Blue
Background Image Top-Right Corner
STYLE="background-position: top right; background-repeat: no-repeat;"
Tuesday, July 22, 2008
Burned by Check Point VPN
I received a nice new computer from work and installed Windows Ultimate 64bit OS on it. After spending the day getting everything installed and patched, the last installation failed. Check Point hasn't released their 64bit client yet. So sad. Check Point goes on the Do Not Call list. I'm re-installing a 32bit OS now...
Microsoft License Activation - Phone Number
1(800)936-5700
Wednesday, July 16, 2008
Server.Transfer vs. Response.Redirect
"Where possible, use the Server.Transfer method instead of the Response.Redirect method. Response.Redirect sends a response header to the client that causes the client to send a new request to the redirected server by using the new URL. Server.Transfer avoids this level of indirection by simply making a server-side call.
You cannot always just replace Response.Redirect calls with Server.Transfer calls because Server.Transfer uses a new handler during the handler phase of request processing. If you need authentication and authorization checks during redirection, use Response.Redirect instead of Server.Transfer because the two mechanisms are not equivalent. When you use Response.Redirect, ensure you use the overloaded method that accepts a Boolean second parameter, and pass a value of false to ensure an internal exception is not raised.
Also note that you can only use Server.Transfer to transfer control to pages in the same application. To transfer to pages in other applications, you must use Response.Redirect."
Monday, July 7, 2008
Live Meeting Give Control Grayed Out
2. On the "My Home" screen click "Meet Now Details"
3. Click on "Meet Now Options"
4. Click on "Additional Features"
5. Make sure all of the setting on this page are correct to Give Control to your Desktop.
Wednesday, July 2, 2008
Log4Net Appender SQL 2005 Express
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="Data Source=192.168.1.3\SQLEXPRESS,2296;Database=MyDatabase;User Id=MyUser;Pwd=password;Trusted_Connection=False;" />
<commandText value="INSERT INTO QMC_A_LOG ([THREAD],[LEVEL],[LOGGER],[MESSAGE], [EXCEPTION]) VALUES (@thread, @log_level, @logger, @message, @exception)"/>
<parameter>
<parameterName value="@thread" />
<dbType value="String" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%thread" />
</layout>
</parameter>
<parameter>
<parameterName value="@log_level" />
<dbType value="String" /> <size value="50" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%level" />
</layout> </parameter>
<parameter> <parameterName value="@logger" />
<dbType value="String" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%logger" />
</layout> </parameter>
<parameter>
<parameterName value="@message" />
<dbType value="String" /> <size value="4000" />
<layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%message" />
</layout>
</parameter>
<parameter>
<parameterName value="@exception" /> <dbType value="String" />
<size value="4000" />
<layout type="log4net.Layout.ExceptionLayout" />
</parameter>
</appender>
C# Page Title Method
Space Between Propercase Letters
{
string title = String.Empty;
string fileNameWithoutExtension = String.Empty;
string[] titleParts = fileName.Split('.');
fileNameWithoutExtension = titleParts[0];
char[] c = fileNameWithoutExtension.ToCharArray();
int i = 0; // Don't put a Space in front of the First Character
foreach (char character in c)
{
if (Regex.IsMatch(character.ToString(), "[A-Z]") && i != 0)
{
title += " " + character;
}
else
{
title += character;
}
i++;
}
return title;
}
Tuesday, July 1, 2008
Log4Net Appender MS Access
Local Database
<!-- *** log4net *** -->
<log4net debug="false">
<appender name="AccessDatabase" type="log4net.Appender.AdoNetAppender">
<connectionString value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DataDirectoryAccess.mdb;"/>
<commandText value="INSERT INTO Log ([Thread],[Level],[Logger],[Message], [Exception]) VALUES (@thread, @log_level, @logger, @message, @exception)"/>
<bufferSize value="1"/>
<parameter>
<parameterName value="@thread"/>
<dbType value="String"/>
<size value="255"/>
<layout type="log4net.Layout.PatternLayout" value="%thread"/>
</parameter>
<parameter>
<parameterName value="@log_level"/>
<dbType value="String"/>
<size value="50"/>
<layout type="log4net.Layout.PatternLayout" value="%level"/>
</parameter>
<parameter>
<parameterName value="@logger"/>
<dbType value="String"/>
<size value="255"/>
<layout type="log4net.Layout.PatternLayout" value="%logger"/>
</parameter>
<parameter>
<parameterName value="@message"/>
<dbType value="String"/>
<size value="4000"/>
<layout type="log4net.Layout.PatternLayout" value="%message"/>
</parameter>
<parameter>
<parameterName value="@exception"/>
<dbType value="String"/>
<size value="4000"/>
<layout type="log4net.Layout.PatternLayout" value="%exception"/>
</parameter>
</appender>
<root>
<level value="All"/>
<appender-ref ref="AccessDatabase"/>
</root>
</log4net>
Wednesday, June 25, 2008
Filter Background Not Showing Up
in RadGrid ASP.NET
The RadGrid Skin now uses RadGridMenu for the Filtiring dropdown. To modify an existing RadGrid Skin:
1. Set the Skin property of the RadGrid to an existing Skin name
2. Set the RadGrid property EnableEmbeddedSkins="False"
3. Manually create a link to the CCS on the page (or MasterPage) for both the RadGrid and RadMenu
Example:
<link id="RadGridSkinCss" href="~/Skins/Telerik/Grid.Telerik.css" rel="stylesheet" type="text/css" runat="server" />
<link id="MenuSkinCss" href="~/Skins/Telerik/Menu.Telerik.css" rel="stylesheet" type="text/css" runat="server" />
Now you can modify the CSS and make changes to the RadGrid.
Friday, June 20, 2008
Free Icon Creator and Editor
IcoFX (http://icofx.ro/)
An award winning freeware icon editor. It is an all-in-one solution for icon creation, extraction and editing. It is designed to work with Windows XP, Windows Vista and Macintosh icons supporting transparency.
And if you don't have a free graphic editor yet...
Paint.NET
http://www.getpaint.net/
SQL International Date Format
(Insert / Update)
yyyy-mm-ddThh:mi:ss[.mmm]
Another option is to use parameterized queries.
Tuesday, June 17, 2008
Oracle Deleted DAT File
Failed Server Startup
Errors in file d:\oracle\product\10.1.0\admin\server\bdump\server_dbw0_352.trc:ORA-01157: cannot identify/lock data file 21 - see DBWR trace fileORA-01110: data file 21: 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\SERVER\DATABASE_NAME'ORA-27041: unable to open fileOSD-04002: unable to open fileO/S-Error: (OS 2) The system cannot find the file specified.
Here's the solution:
http://www.mydigitallife.info/2007/08/04/how-drop-tablespace-and-recover-oracle-database-when-accidentally-delete-datafile/
Tips for Connecting
- Launch SQL Plus using '/nolog' in the command line. You can also right-click on the SQL Plus shortcut and add ' /nolog' to the executable path.
- Type: 'conn sys as sysdba'
- Enter your password
Monday, June 16, 2008
Display Server Information on the Desktop
http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx
Here is my sample BgInfo configuration:
***************************************
<Host Name> SERVER (User: <User Name>)
IP Addresses: <IP Address>
Free Space: <Free Space>
Volumes: <Volumes>
CPU: <CPU>
Memory: <Memory>
OS Version: <OS Version>
Service Pack: <Service Pack>
MAC Address: <MAC Address>
***************************************
Note: It is probably best to place the .exe in a location like C: and a shortcut to the .exe in the Startup folder. Save out your configuration (bgi). Then you can add the parameters to the shortcut as:
C:\Bginfo.exe C:\bginfo.bgi /SILENT /timer 0
This will start the application without the timer window and shut off all error messages.
Wednesday, June 11, 2008
Update One Oracle Column with the
Data from Another Table
UPDATE TABLE_A SET COLUMN_A = (SELECT TABLE_B.COLUMN_B FROM TABLE_B WHERE TABLE_A.COLUMN_A = TABLE_B.COLUMN_B)
WHERE EXISTS (SELECT TABLE_B.COLUMN_B FROM TABLE_B WHERE TABLE_A.COLUMN_A = TABLE_B.COLUMN_B)
The Bad Oracle Update
(unless you want to wipe out the data in TABLE_A.COLUMN_A when there is no match)
UPDATE TABLE_A SET COLUMN_A = (SELECT TABLE_B.COLUMN_B FROM TABLE_B WHERE TABLE_A.COLUMN_A = TABLE_B.COLUMN_B)
Sunday, June 8, 2008
Microsoft Windows XP Professional Version 2002 OEM
Serial Number Location
After opening the product and throwing away the wrapper, I started the installation and then looked for a license key. I couldn't find it anywhere! That's because Microsoft put it on the cellophane wrapper which was in my trash.
I happened to find the answer on Mac-Pro
http://www.mac-pro.com/Microsoft-OEM-Windows-XP-2002-Pro-DSP
After receiving your copy of Windows XP be careful not to throw away the "product key," which is printed on a sticker affixed to the outside of the software's cellophane wrapper. You will need the product key in order to activate the software.
ASP.NET Task Scheduler:
Windows Service / Web Service or Web Page
The C# (Visual Studio 2008) solution is here:
HttpWebResponse wRes = (HttpWebResponse)(wReq).GetResponse();
str = wRes.GetResponseStream();
I was experiencing a error:
The operation has timed out
str.Close();
wRes.Close();
wRes = null;
It works....
Saturday, June 7, 2008
Windows Service:
Path to Executable
using System.IO
string pathToExecutable = System.Reflection.Assembly.GetExecutingAssembly().Location;
FileInfo fileInfo = new FileInfo(pathToExecutable);
string pathToConfig = fileInfo.DirectoryName + @"\Configuration.xml";
Wednesday, May 21, 2008
Tortise SVN Optimization and Tweaks
General:
If you have not started using Tortise, I would recommend checking the box that says "Use '_svn" instead of ".svn" directories. DO NOT CHECK THIS IF YOU ALREADY HAVE FOLDERS USING SVN.
http://lisazhou.wordpress.com/2008/03/09/can-not-open-visual-studio-net-2003-project-once-added-to-svn-problem-resolved/
If it causes problems in VS 2003, it may cause problems with other applications as well.
Icon Overlays:
I noticed that there was a process in Task Manager called "TSVNCache.exe" which is taking up 60k of memory and running at 1-2% every other second causing I/O on the hard drive. My laptop has been running slow, so I was searching to increase speed. I found out that by default, TortiseSVN is set to Overlay all of C:\ and any other Fixed drives.
1. Check Fixed Drives, but exclude them in "Excluded paths:"
C:\*
D:\*
2. Include the paths to the root folders which are using Subversion:
D:\MyApps\*
3. Open up Task Manager and right-click on the TSVNCache.exe process. Choose "Set Priority / Low".
It's amazing how my hard drive has stopped thrashing!
Mailing Address Validation
UPS OnLine Tools
http://www.ups.com/content/us/en/bussol/offering/technology/automated_shipping/online_tools.html
Sign up and use UPS Address Validation Tool -Ensures that customer-entered shipping addresses are correct at the time of order processing (XML)
FedEx Address Checker
http://www.fedex.com/avs/us_english/?link=4
US Postal Service Address Validation
http://www.eggheadcafe.com/articles/20060430.asp
Sunday, May 18, 2008
Email Validation C#
- Syntax Validation: Does it have an @ sign and at least one full stop, are the left and right hand sides of the @ valid, searching the internet will give you all the things an email address must have.
http://www.cambiaresearch.com/c4/bf974b23-484b-41c3-b331-0bd8121d5177/Parsing-Email-Addresses-with-Regular-Expressions.aspx - Resolve the Domain: You will need to do a DNS MX lookup, there is a nice C# dll on the internet should be easy to find.
http://aspalliance.com/744_CodeSnip_Resolving_Domain_Names__and_IP_Addresses - Use a Socket: Actually go through the process of sending an email and then stop just before issuing the .quit command.
http://www.eggheadcafe.com/articles/20030316.asp
Thursday, May 15, 2008
Convert ArrayList of Objects to DataTable
using System.Data;using System.Reflection;
using System.Collections.Generic;
using System.Text;
public static class Util
{
public static DataTable ConvertArrayListToDataTable(ArrayList arrayList)
{
DataTable dt = new DataTable();
if (arrayList.Count != 0)
{
dt = ConvertObjectToDataTableSchema(arrayList[0]);
FillData(arrayList, dt);
}
return dt;
}
public static DataTable ConvertObjectToDataTableSchema(Object o)
{
DataTable dt = new DataTable();
PropertyInfo[] properties = o.GetType().GetProperties();
foreach (PropertyInfo property in properties)
{
DataColumn dc = new DataColumn(property.Name);
dc.DataType = property.PropertyType; dt.Columns.Add(dc);
}
return dt;
}
private static void FillData(ArrayList arrayList, DataTable dt)
{
foreach (Object o in arrayList)
{
DataRow dr = dt.NewRow();
PropertyInfo[] properties = o.GetType().GetProperties();
foreach (PropertyInfo property in properties)
{
dr[property.Name] = property.GetValue(o, null);
}
dt.Rows.Add(dr);
}
}
}
Tuesday, May 13, 2008
Visual Studio ASP.NET Formatting Setting Tip
I'm always having to type in quotations for parameter values. Check this box to have Visual Studio do it for you...
If I format a control how I want and then paste another value in, Visual Studio re-formats the control and destroys my work! Uncheck the Format HTML on Paste checkbox...
Telerik Open Window and
Close From Opened Window
<script type="text/javascript"> //<
![CDATA[
function OpenWindow(name)
{
var mgr = GetRadWindowManager();
}
//]]> </script>
<button id="btnDeleteCustomer">Open with radopen</button> <radW:RadWindowManager ID="RadWindowManager1" runat="server"> <Windows>
<radW:RadWindow
ID="DeleteCustomer"
NavigateUrl = "DeleteBusiness.aspx"
Skin="Default"
VisibleOnPageLoad = "false"
OpenerElementId = "btnDeleteCustomer"
OffsetElementID = "offsetElement"
Top = "115"
Left = "30"
Width = "700px"
Height = "600px"
runat="server"
/>
</Windows>
</radW:RadWindowManager>
CLOSE FROM OPENED WINDOW
<script type="text/javascript">
function GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function CloseWindow()
{
var oWindow = GetRadWindow();
oWindow.Close();
}
</script>
Monday, May 12, 2008
Telerik Rad Window Alert
<%@ Register TagPrefix="rad" Namespace="Telerik.WebControls" Assembly="RadWindow.Net2" %>
<rad:RadWindowManager ID="RadWindowManager1" runat="server" Left="" NavigateUrl="" Skin="Office2007" SkinsPath="~/RadControls/Window/Skins" Title="" Top="">
</rad:RadWindowManager>
C#
protected void btnSave_Click(object sender, EventArgs e)
{
string strWindowTitle = "Saved";
string strAlert = "Settings have been Saved.";
string strWidth = "330";
string strHeight = "200";
string alert = "<script language='javascript'>" + "radalert('" + strAlert + "', " + strWidth + ", " + strHeight + ", '" + strWindowTitle + "');" + "</script>";
Page.RegisterStartupScript("AlertScript", alert);
}
Sunday, May 11, 2008
Telerik.WebControls.GridInsertionObject
In attempting to use the edit form of the Telerik Grid Control, there is an error when there are no records in the table when using an ArrayList of Objects. Since no Objects are in the array list, the RadGrid cannot determine the column headings or the fields for editing. A way around this is to create a DataTable with the proper headings for the fields which need to be entered.
ArrayList units = unitsBusinessLogic.GetAll();
if (units.Count == 0)
{
DataTable dt = new DataTable();
DataColumn dc = new DataColumn("Name", System.Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("AccessCode", System.Type.GetType("System.String"));
dt.Columns.Add(dc);
RadGrid1.DataSource = dt;
}
else
{
RadGrid1.DataSource = units;
}
Monday, May 5, 2008
Microsoft Error Message - Move or Copy
Wednesday, April 23, 2008
Life Expectancy and Longevity - 120 years
http://creationwiki.org/Human_longevity
Man Lives to 70 or 80 if he has the Strength
http://www.kerala.com/wiki-Longevity
The mainstream view on the future of longevity, such as the US Census Bureau, is that life expectancy in the USA will be in the mid-80s by 2050 (up from 77.85 in 2006) and will top out eventually in the low 90s, barring major scientific advances that can change the rate of human aging itself, as opposed to merely treating the effects of aging as is done today. The Census Bureau also predicted that the USA would have 5.3 million people aged over 100 in 2100.
Life Expectancy is Declining in the United States
http://www.voanews.com/english/AmericanLife/2008-04-22-voa57.cfm
Ezzati finds this a grim statistic for an industrialized nation. "We don't associate worsening of health, worsening of life expectancy with something that happens in a developed high-income country." Ezzati finds this a grim statistic for an industrialized nation. "We don't associate worsening of health, worsening of life expectancy with something that happens in a developed high-income country."
Saturday, April 5, 2008
Free Subversion Repository Space (500 MB)
http://www.assembla.com/
The site is fast, simple, productive, and you can start a project for free.
Our Development team uses Perforce, so our Consulting team decided to piggy-back on what was already being used. After fighting Perforce and losing 3 days of code which was overwritten during a sync, we decided to try something else. The Microsoft solution was going to cost us 10k, Visual Source Safe was cheap and old, so we decided to go with something free and fresh - Subversion. There's no turning back now.
Subversion has a wonderful interface and it has never eaten my hours of development time by copying the old files down to my local - overwritting my work. Sometimes it is difficult to get the Subversion repository sync'd due to conflicts, but we have always managed to figure out a way to make it happen.
In searching for free Subversion storage for a personal project, I came across Assembla. I thought "Oh great, another lame free site. What will I have to put up with for some storage?"
I was shocked. I could have used something like SourceForge or Microsoft's Codeplex but to be honest, these sites confuse me. Google hasn't even stepped up to 'logical site design' at Google Code The free source control sites seem to be littered with advertisements and they lack good navigation. It's like they were designed by programmers :)
Whoever designed Assembla should be working for Google. Maybe Google will buy them out and change the name of the site to 'Googlembla". Whatever you want to call it, I call it a 'Top Pick'.
Give it a try! What have you got to lose?
Tuesday, February 26, 2008
C# Web Service Timeout
C# Code
MyWebService.WebService webService = new MyWebService.WebService();
webService.Url = ConfigurationManager.AppSettings["WebService.URL"];
webService.Timeout = Int32.Parse(ConfigurationManager.AppSettings["WebService.Timeout"]);
Web.config
<add key="WebService.URL" value="http://myserver.com/MyWebService.asmx">
<add key="WebService.Timeout" value="-1">
Undefined Object JavaScript Controls
Web Resources (.axd)
URLScan
allow for .axd files
IIS
- Open IIS management snap-in ( e.g. run inetmgr.exe)
- Right click your website and choose properties
- Go to the "Home Directory" tab and click the "Configuration" button
- A dialog should pop out and you would see the mappings listbox
- Find the entry for the ".axd" extension and edit it by clicking the "Edit" button
In the new dialog uncheck the "Verify if file exist" checkbox - which I suspect is causing the problem.
SiteMinder
I had to uncheck "Verify that file exists" for the "Wildcard application map" for SiteMinder (Website Properties->Home Directory tab->Configuration). Once I made the change, my browser started receiving webResource.axd If this does not work for you, create an empty file named 'webresource.axd' and place it in the root of your application. Then the file will exist and it won't matter what the settings are in IIS or SiteMinder.
Friday, February 8, 2008
Burning Heart - Filled with the Spirit
Wednesday, February 6, 2008
.NET 2.0 Exception Handling in Threads
{
new Thread (Go).Start();
}
static void Go()
{
try
{
...
throw null; // this exception will get caught below
...
}
catch (Exception ex)
{
Typically log the exception, and/or signal another thread
that we've come unstuck
...
}
From .NET 2.0 onwards, an unhandled exception on any thread shuts down the whole application, meaning ignoring the exception is generally not an option. Hence a try/catch block is required in every thread entry method – at least in production applications – in order to avoid unwanted application shutdown in case of an unhandled exception.
Wednesday, January 2, 2008
Log4Net Debugging Trace Troubleshooting
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections>
<system.diagnostics>
<trace autoflush="true">
<listeners>
<add name="textWriterTraceListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="log4net_trace.txt" />
</listeners>
</trace>
</system.diagnostics>
<appSettings>
<add key="log4net.Internal.Debug" value="true"/>
</appSettings>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value="log-file.txt" />
<appendToFile value="true" />
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="FileAppender"/>
</root>
</log4net>
</configuration>
C# Log4Net Oracle Appender
<appender name="Oracle" type="log4net.Appender.AdoNetAppender">
<connectionType value="System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, publicKeyToken=b77a5c561934e089"/>
<connectionString value="Data Source=TNSName;User ID=MyTableSpace;Password=password;"/>
<commandText value="INSERT INTO LOG_TABLE (DATETIME, THREAD, LOG_LEVEL, LOGGER ,MESSAGE, EXCEPTION, APPDOMAIN, NDC) VALUES (:log_date, :thread, :log_level, :logger, :message, :exception, :appdomain, :ndc)"/>
<bufferSize value="1"/>
<parameter>
<parameterName value=":log_date"/>
<dbType value="DateTime"/>
<layout type="log4net.Layout.RawTimeStampLayout"/>
</parameter>
<parameter>
<parameterName value=":thread"/>
<dbType value="String"/>
<size value="255"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%thread"/>
</layout>
</parameter>
<parameter>
<parameterName value=":log_level"/>
<dbType value="String"/>
<size value="50"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%level"/>
</layout>
</parameter>
<parameter>
<parameterName value=":logger"/>
<dbType value="String"/>
<size value="255"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%logger"/>
</layout>
</parameter>
<parameter>
<parameterName value=":message"/>
<dbType value="String"/>
<size value="4000"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%message"/>
</layout>
</parameter>
<parameter>
<parameterName value=":exception"/>
<dbType value="String"/>
<size value="2000"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%exception"/>
</layout>
</parameter>
<parameter>
<parameterName value=":appdomain"/>
<dbType value="String"/>
<size value="200"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%appdomain"/>
</layout>
</parameter>
<parameter>
<parameterName value=":ndc"/>
<dbType value="String"/>
<size value="2000"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%ndc"/>
</layout>
</parameter>
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="Oracle"/>
</root>
</log4net>
Log Table Script
CREATE TABLE LOG_TABLE
(
DATETIME TIMESTAMP(3),
THREAD VARCHAR2(255 BYTE),
LOG_LEVEL VARCHAR2(255 BYTE),
LOGGER VARCHAR2(255 BYTE),
MESSAGE VARCHAR2(4000 BYTE),
EXCEPTION VARCHAR2(2000 BYTE),
APPDOMAIN VARCHAR2(200 BYTE),
NDC VARCHAR2(2000 BYTE),
ID NUMBER(10) NOT NULL
)
TABLESPACE MyTableSpace
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
CREATE UNIQUE INDEX LOG_TABLE_PK ON LOG_TABLE
(ID)
LOGGING
TABLESPACE MyTableSpace
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
NOPARALLEL;
ALTER TABLE LOG_TABLE ADD (
CONSTRAINT LOG_TABLE_PK
PRIMARY KEY
(ID)
USING INDEX
TABLESPACE PWC
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
));
Check This Out!
More Links to Good Information
- January (1)
- September (1)
- February (2)
- January (2)
- May (3)
- February (1)
- May (1)
- October (1)
- January (1)
- August (1)
- March (1)
- May (1)
- March (1)
- January (1)
- March (1)
- December (2)
- September (2)
- June (1)
- February (1)
- January (1)
- October (1)
- December (2)
- November (1)
- August (4)
- July (14)
- June (10)
- May (9)
- April (2)
- February (4)
- January (2)
- December (7)
- October (10)