Welcome to Community Server Sign in | Join

/Dan/.NET - Dan Robey's .NET Dumping Spot

IESL Software

<November 2009>
SuMoTuWeThFrSa
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Post Categories

Navigation

Subscriptions

/c# (RSS)

/c#
removing designer files from template
I've gotten fed up with designer files when I'm doing development, so I removed them from my "add item" templates.  I basically followed the instructions at dave hayden's blog with a few added quirks.  That means edit the files inside the relevant Read More

posted Thursday, April 24, 2008 6:25 PM by dsrobey with 0 Comments

link to every page in a .net project
I wanted to print out a list of links to every page in a c#/ASP.NET project to check that they all looked correct. The caveats: the namespace needs to be the same as the IIS virtual directory for the links to work. We first get a list of all classes Read More

posted Friday, August 19, 2005 6:13 PM by dsrobey with 0 Comments

strange .net special character quirk
Apparently doing String.IndexOf("special character") might not always work as you expect it. The æ character is found in the string "ae" Test yourself by dropping this into a .aspx page: <% if("ae".IndexOf("æ") == 0) {Response.Write("why?");}%> Read More

posted Tuesday, August 02, 2005 5:52 PM by dsrobey with 0 Comments

firefox/IE ASP.NET textbox
Just in case anyone else ever has this problem, the asp:textbox in ASP.NET has the two width properties "Width" and "Columns" if you want to set the width of a textbox to a certain size so it will display correctly across browsers, both width and columns Read More

posted Monday, April 11, 2005 3:41 PM by dsrobey with 1 Comments

random ascii generator
I needed to test an ecryption routine over a large amount of text, so I came up with this quick/dirty c# code to generate random (english/code) ascii text. If you need to test with long strings, you should use a stringbuilder instead of normal string Read More

posted Tuesday, February 08, 2005 2:52 PM by dsrobey with 0 Comments

find which validator's not working
sometimes you get a validator that's screwing up Page.IsValid, but it doesn't show text for some reason. Here's how I find it: foreach(BaseValidator b in Page.Validators) { if(!b.IsValid) Response.Write(b.Text+":"+b.ErrorMessage); } Read More

posted Saturday, October 16, 2004 5:36 PM by dsrobey with 0 Comments

embedded windows forms
The steps (hopefully)to making a windows form into an embedded internet object: 1: make the solution compile as a class library 2: delete the entry point (main()) 3: have your class inherit from a userControl 4: compile into a .dll 5: drop the .dll Read More

posted Wednesday, July 07, 2004 12:03 PM by dsrobey with 0 Comments

excellent ws-security reference
Good reference on Web Services Security Drilldown for anyone interested in how to programmatically manipulate the WS proxy to provide security using WSE2. Read More

posted Monday, April 26, 2004 8:10 PM by dsrobey with 0 Comments

XAML layers
What have people heard about the new Avalon / XAML programming practice MS seems to be pushing? To me it seems almost parallel to the Java/Javascript division, with new twists thrown in. What it promises (if it is integrated into IE as I think it will Read More

posted Monday, April 26, 2004 12:26 PM by dsrobey with 0 Comments

dynamic pictures
I was thinking about how to get around the limitations some sites have on the http-referer for pictures (mostly webcomics that don't want deep linking of pics), and I came up with an interesting idea. Using the strange qualities of Response.Write() and Read More

posted Saturday, April 24, 2004 7:14 PM by dsrobey with 0 Comments

Exceptions- use them!
I am annoyed. I am extremely annoyed. I have just taken an hour to debug an error which did not exist. I downloaded the source code for the newest taxi server for 1.124. Installed, set permissions, etc. When I hit the server, it froze. ASPNET went to Read More

posted Monday, December 08, 2003 2:20 AM by dsrobey with 0 Comments

security issues with xmlportal
I just realized that since our xml data files have to be set ASPNETuser readable, if an adversary knew their location, he could read all the data, including users and passwords. I'm not sure how much is needed, but here are some possible solutions depending Read More

posted Thursday, November 20, 2003 1:51 PM by dsrobey with 0 Comments

BigInts, C#, Crypto
I take back what I said here about the C# BigInt class. It actually is very well put together. I take issue with the fact that .Equals() does not take an Object, but aside from that it does everything you'd really want a bigint class to do. I'm wondering Read More

posted Monday, November 17, 2003 10:29 PM by dsrobey with 0 Comments

eclipse
been playing with eclipse for a couple days now. Very nice development environment, and it's written in such a way that it is easily extended. There's a kind of Intellisense for both Java and C#, and probably more, although those are the only two languages Read More

posted Monday, November 17, 2003 10:17 PM by dsrobey with 0 Comments

bigint for c#?
Anyone heard of a bigint class for c#?  I'm talking 2^4096 big here.  Trying to implement a couple encryption routines for 6.857. best I could find is this, but it doesn't do a lot of useful things Read More

posted Wednesday, October 08, 2003 4:18 PM by dsrobey with 0 Comments

.NET more secure than Linux?
@stake recently published a survey claiming that the .NET framework is more easily secured than Linux. Their methodology includesa list of actions system admins needed to perform to harden the web server. Their criteria mainly hinges on usability and Read More

posted Monday, October 06, 2003 1:31 PM by dsrobey with 0 Comments

using blogs as database storage
The real reason I wanted to have a blog web service, as I stated in my last post, is that I'm looking at storing web data I scrape off the internet in a blog or blog-structured database, an idea I disucussed a while back. The nice thing about the blog Read More

posted Monday, October 06, 2003 1:12 PM by dsrobey with 0 Comments

blog web service needed
we need a blog web service. Or do we already have one?  I want to programmatically author rss. The only problem would be security, which we could do through WS-SEC I've been looking through lately. Read More

posted Tuesday, September 30, 2003 2:08 PM by dsrobey with 0 Comments

pros and woes of Intellisense
Ever since I started using mono to do my 1.124 problem sets, I've noticed that my honed programmer's edge has been dulled by years of working with Intellisense. If I need to take a sqare root of a number, I no longer can remember where to find the function. Read More

posted Monday, September 29, 2003 12:50 PM by dsrobey with 0 Comments

alternative to ISAPI filters
ISAPI filters may not be necessary to do directory/content mapping, as this blog server does. Let me reveal this to you in parts, and see if readers can put the pieces together. First of all we have web application directories in IIS, which are used Read More

posted Monday, September 15, 2003 2:07 AM by dsrobey with 0 Comments

bad cookie recipes
Just read a nice paper about the dangers of bad cookie authentication schemes in web sites and was wondering how secure the .NET default "FormsAuthentication.Encrypt(ticket);" is. Might be an useful little project to do an analysis. It appears to conform Read More

posted Tuesday, September 09, 2003 1:02 PM by dsrobey with 0 Comments

data access swappability
I'm beginning to realize that I should have forked my code a long time ago and created a data access subproject with xmlportal.  The portal framework and the modules all grab similar data from similar sources, even though they're in two separate projects. Read More

posted Tuesday, August 26, 2003 6:29 PM by dsrobey with 0 Comments

google did it!
google beat me to it :(I run my own little scraper portal called webwalkby, so named because it "walks by" some of the major sites I read frequently every so often and caches their content as rss streams. It grabs me comics, headlines from slashdot, and Read More

posted Tuesday, August 26, 2003 1:57 AM by dsrobey with 0 Comments

using Web.HttpContext for messaging
The current build of xmlportal uses a little known feature of .NET to message between its portal framework and the controls.  Rather than force controls to implement some abstract class with functions like “sendMessage(object obj)” and “getMessage(object Read More

posted Thursday, August 21, 2003 5:51 PM by dsrobey with 0 Comments

dynamic controls
Assume that you want to provide polls for a website.  You want there to be n polls of n questions apiece.  Because of this unconstrained nature, it is almost impossible to write a .NET control such as a DataGrid to do the work for you.  Instead, the logical Read More

posted Wednesday, August 20, 2003 3:16 PM by dsrobey with 0 Comments

WS security
went to the XML developers conference in boston the other day to see Don Box's presentation.  While he did give an amazing talk, the highlight of the conference in my mind was the new WS-security discussion.  With the new WS plugins, enforcing security, Read More

posted Monday, August 18, 2003 1:41 AM by dsrobey with 0 Comments