Have an API folder
Use a completely separate folder for all your ASMX files. Don't keep them in a directory shared with regular web pages. That way you can create more reliable monitoring, better firewall rules, or authentication.
SSL
Encrypting your web communication is totally worth it for any data of value. It's easy, it doesn't have to cost you money (you can self-generate a certificate), and it gives you a box to tick on your security checklist.
In IIS 7, click on the folder that holds your ASMX files and select "SSL Settings." Click "Open Feature", and click "Require SSL."
Hide Documentation
You should probably not expose documentation for your API if you can avoid it. Create a blank page that says "Contact your account manager for documentation" and use this walkthrough to configure it:
http://www.15seconds.com/issue/040609.htm
| permalink | related link |




( 2.8 / 24 )SQL Server offers two different ways to create a temporary table in your stored procedure. The two options are declaring a local variable and creating a temporary table.
DECLARE @test TABLE (n int, v int, etc int)
CREATE TABLE #test (n int, v int, etc int)
When you create a local variable, you don't have to worry about deleting it when you are done. Local variables have a large number of special cases that you should know about; you can pass them as parameters and use them in user defined functions. But, they are created in memory, which doesn't always result in the performance you want.
Temporary tables are generally better supported and have fewer special cases, but if you forget to delete them they can prevent you from running the same commands twice.
Our database server has a dedicated disk for TempDB. As a result, I discovered during some testing today that creating temporary tables was an order of magnitude faster than using declared tables. I don't believe this performance issue is global, but in our case it was big enough.
Now you know!
| permalink | related link |




( 2.7 / 30 )In my junior years, I accidentally sent my resume to a recruiting company known then as "MacArthur Associates". They turned out to be a shamelessly harassing, unprofessional and rude headhunting company who inappropriately sent my resume to a number of companies and jeopardized job interviews I had already scheduled with people in my network by claiming that hiring me would trigger their referral fee, when I had already submitted my resume separately. Their high pressure sales tactics alienated companies with whom I might have had a chance during a regular interview. Eventually, I declined to work with them and moved on with my career.
However, they subsequently renamed themselves "Atlantis Partners" and later to "Workbridge Associates". I've heard they have more names as well. Each individual group has the same churn rate - they hire people to man the phone banks to harass employers with nonstop phonecalls and resume blasts. The recruiters do not know anything about the profession and know less about each individual company they target. Instead, they get their leads through trolling Craigslist, Monster.com and other job boards and attempt to sell overpriced recruiting.
I've recently been made a target as an employer as well. When I informed them that I would not work with them and asked them politely not to call me, they instead subjected me to random phonecalls from different salespeople from different affiliates all trying to get an "in". It truly leaves a bad taste. There are so many good, honest, patient, and knowledgeable recruiters in the world, why work with someone like Workbridge?
| permalink | related link |




( 3 / 33 )I just realized I'd hate to write out the code to sort through a list of strings and find the longest one. So I tried to do it in LINQ. Here's what I got:
List<string> words = new List<string>();
... fill in a bunch of data ...
var v = (from s in words orderby s.Length descending select s).Take(1);
The "orderby s.Length" clause sorts by string length. Descending takes longest ones first and shortest ones last. The part I didn't know was the ".Take(1)" function - that's interesting! So, basically, I get the first string returned by the select statement.
Of course, now you have to take a "var" and turn it into a string object. Here's a shortcut:
IEnumerable<string> list = v as IEnumerable<string>;
if (list != null) {
foreach (string s in list) {
return s;
}
}
| permalink | related link |




( 2.8 / 85 )As much as I'd welcome an upgrade to Windows, I doubt I'll be interested in what Microsoft is producing.
1) The new UI has a nifty "translucent" look to everything. However, this makes it virtually impossible to glance at text - now you have to study it carefully to make sure the background isn't distorting your words. This is part of the reason I haven't grown attached to Vista, and I'm sad to see it isn't changing much in the next release.
2) Every individual part of the default UI is now more cluttered. What used to be a simple "folder" window now has tons of options, hyperlinks, and buttons. In many cases, the icons now randomly jump in size depending on what Windows thinks you have in the folder - you can go from tiny icons to huge ones, and funny "1-5 star" ratings systems interjected if the folder contains some music or video files.
3) The control panel now attempts to hide stuff it thinks you don't want to see. This causes two problems: first, it's harder to find the correct choice to make since you have to bypass all the choices it thinks you want to see; and secondly, when you make a choice, it's hard to know if you've found the correct place to make it. For example, It takes a very long time now to find "network connections", when it used to be very simple to bring up a list of all network adapters on your computer and select the one you wanted to check.
I would be very interested in an OS that would reduce the amount of unnecessary garbage that clogs up the user interface. Ubuntu and Mac OSX both do well in this regard.
| permalink | related link |




( 2.8 / 240 )Next

Calendar



