Juan Ignacio 的个人资料devnotebook日志列表网络 工具 帮助

日志


11月28日

Moving

I'm moving my blog to geekswithblogs.net:
 
You'll find me here: http://geekswithblogs.net/juang
 
 
11月17日

Krypton Tookit

Component Factory has released a free set of Windows Forms user interface controls. It's called the Krypton Toolkit and it's targeted at Visual Studio 2005 and .NET Framework 2.0.

It is free for commercial use. It includes several controls:
  •      Krypton Button
  •      Krypton Group
  •      Krypton Header
  •      Krypton HeaderGroup
  •      Krypton SplitContainer
  •      Krypton Panel
  •      Krypton Label

 
11月7日

How to make custom assemblies visible in Visual Studio (eg the Add Reference dialog box, or make control Designers available to the IDE)

 
"...you can add a registry key, such as the following, which points to the location of the assembly
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies]@="C:\\MyAssemblies"
where MyAssemblies is the name of the folder in which the assemblies reside.

NOTE: You can create the this registry entry under the HKEY_LOCAL_MACHINE hive. This will change the setting for all of the users on the system. If you create this registry entry under HKEY_CURRENT_USER, this entry will affect the setting for only the current user.

Restart Visual Studio .NET after you have added the key."
 
Translated:
 
Create a new key (eg "My Company assemblies") under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\, and set its "(default)" value to the path of a folder where you'll put all the assemblies you want to make visible to Visual Studio.
 
 
8月6日

"The test form is only available for requests from the local machine"

If you simply open the web config file and add the following, you will be able to access the test form outside of the localhost:

<configuration>
    <system.web>
    <webServices>
        <protocols>
            <add name="HttpGet"/>
            <add name="HttpPost"/>
        </protocols>
    </webServices>
    </system.web>
</configuration>

6月15日

Enable ClickOnce Compression on IIS

ClickOnce supports downloads while using HTTP compression, a Web server technology that uses the GZIP algorithm to compress a data stream before sending it to the client. The client—in this case, ClickOnce—decompresses the stream before reading the files.

If you are using Internet Information Services (IIS), you can enable HTTP compression easily.

Enable Compression in IIS

  • From the IIS snap-in, right-click on the Web Sites node and click on Properties
  • Select the Service tab - Enable Compress application files
  • Enable Compress static files
  • Change Temporary Directory to a folder that you created (the IUSR_{machinename} will need write permission to the folder), or leave it at it's default
  • Set the max size of the temp folder to something that the hard drive can handle. i.e. 1000.
  • Save and close the Web Site Properties dialog

However, this only activates it for certain file types—namely, HTML and text files. In order to activate compression for assemblies (.dll), XML (.xml), deployment manifests (.deploy) and application manifests (.manifest), you must add these file types to IIS's list of types to compress. Until you do this, none of the files in your deployment except text and HTML files will be compressed.

To add the document types for ClickOnce deployment files (.application, .manifest, .deploy, .dll, .exe, etc.), follow these steps:

NOTE: The commands in step 3 replace the previously defined file extensions. It does not append them to the existing file extensions.

 1. Open a command prompt session. To do this, click Start, click Run, type CMD, and the click OK.
2. Change the directory to your \InetPub\AdminScripts folder. To do this, type CD \Inetpub\AdminScripts, and then press ENTER.
3. Type the following commands:

CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "application" "manifest" "deploy" "exe" "dll"

CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/DEFLATE/HcFileExtensions "htm" "html" "txt" "application" "manifest" "deploy" "exe" "dll"

IISRESET.EXE  (this will reset Web services)

In case you also want to enable compression for ASP.NET Web pages and Web services, drop in these (extra) two lines before the IISRESET:

CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx"

CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx"

 

Testing

To test the web server is compressing you can do two things:

1. Check the "...WINDOWS\IIS Temporary Compressed Files" folder on the server and see if new files are added as you go through the ClickOnce installation process.

2. Use netcat (yes, yes, from the old days of hackerish "security tools", nothing beats netcat yet) to manually send an HTTP request to the server and see if the HTTP response contains the header "Content-Encoding: gzip"

A sample HTTP request header you would send is:

GET /clientes/ventas/Ventas_1_0_0_8/Ventas.exe.deploy HTTP/1.1
Accept: */*
Accept-Language: es-ar
Accept-Encoding: gzip, deflate
Host: youhost.yourdomain.com
Connection: Keep-Alive

where the "replaceable parameters" are "youhost.yourdomain.com" for your webserver HOST, and "/clientes/ventas/Ventas_1_0_0_8/Ventas.exe.deploy" for the URL path to your application's exe .deploy file

 

Sources

IIS Compression in IIS6.0
http://www.wwwcoder.com/main/parentid/170/site/3669/68/default.aspx

HOW TO: Enable ASPX Compression in IIS
http://support.microsoft.com/default.aspx?scid=kb;en-us;322603

Troubleshooting ClickOnce Deployments
http://msdn2.microsoft.com/library/fb94w1t5(en-us,vs.80).aspx

2月17日

Server Performance Advisor

Server Performance Advisor

http://www.microsoft.com/downloads/details.aspx?FamilyID=61a41d78-e4aa-47b9-901b-cf85da075a73&displaylang=en

"Service Performance Advisor is a server performance diagnostic tool developed to diagnose root causes of performance problems in a Microsoft® Windows Server™ 2003 operating system, particularly performance problems for Internet Information Services (IIS) 6.0 and the Active Directory® directory service. Server Performance Advisor measures the performance and use of resources by your computer to report on the parts that are stressed under workload.

Other server roles include system overview (hot files, hot TCP clients, top CPU consumed), print spooler, context switch data and preliminary File Server trace data."

2月13日

HOWTO remap your keys (and their shift-states) by creating a new Keyboard Layout

Yesterday I was reading Jeff Atwood's blog (on Keyboarding) and I thought I´d try one more time to find a nice tool to remap the keyboard.

See, when you use non-english keyboards you tend to start wondering about why would you need to press Ctll-Alt and 2 just to type the @ char, while you have keys mapped to symbols you never use: the spanish keyboard, for example, has keys mapped to º, ª, ç, Ç, and so-called "dead-keys" so you can press them and then type a, e, i, o, u and get the accented version of those chars, THREE of them we never use in spanish: `, ^ and ~; ç and Ç are only used in portuguese!

I always wanted the ability to remap these keys into characters that would be a lot more useful while coding, so I had tried several approachs before, including Chris Sells Scancode Mapper, but those only allow you to remap entire keys, they don't really allow to modify the characters that appear when you 'modify' them with Shift or Ctrl-Alt (AltGr).

Enter the Microsoft Keyboard Layout Creator (MSKLC). KLC allows you to create a new Windows keyboard layout from scratch or customize a preexisting one, and build an MSI installer for it. You can then simply install it and configure Windows to use your custom layout.

The main window presents you with the representation of a standard keyboard (if your keyboard has an L shaped enter key you can change the physical layout so it represents your keyboard in the View... Options menu).

You can then double click any key to enter the new character that should be sent to Windows when it's pressed. If you changed the state by marking "Shift" on the main window, when you do this you'll be changing the character that will be sent when Shift and that key are pressed.

You can either simply enter the new character that should be sent, or enter it's Unicode number (UTF-16 code point).

If you want to go deeper, you can expand the key properties window (by pressing the All... button), so you get access to change the normal, shift, ctrl+alt (AltGr), shift+ctrl+alt, SGCAPS, etc, and to define your own Dead-keys.

Defining a dead key is straight-forward: just enter the normal characters that should be pressed after the dead-key, and the resulting characters that should be sent.

You can preload any installed Windows keyboard layout so you don't don't forget about any essential character.

Once you've defined your own keyboard layout, you can build the installer for it (Project... Build DLL and Setup Package), and proceed to install it.

 

Once you have it installed, all you need to do is open Regional and Language Options in the Control Panel, and configure Windows to use your new layout.

2月12日

HOWTO Install Windows Media Player 10 on Windows Server 2003

I'm copypasting this from: http://www.neowin.net/forum/lofiversion/index.php/t245309.html

1. Copy the MP10Setup.exe to the root of your C:\ drive.
2. Go to Start -> Run -> and type in C:\MP10Setup.exe /C /T:C:\TEMP and press enter.
3.Go to C:\TEMP and open file control.xml in notepad.
4. Search for words "oobinf" and change those to "advinf". Then search for words "5.1.2600" and change those to "5.2.3790". Lastly, save control.xml file.
5. Reboot into Safe Mode With Comand Prompt (Press F8 upon booting).
6. Once the Command Prompt has loaded, type C: followed by enter, then type CD TEMP followed by enter.
7. Type setup_wm.exe followed by enter to install Media Player
8. When setup is complete you will get error saying that install failed but it only says that because it couldn't start service called Windows User Mode Framework in services.msc, everything is installed fine and that service loads on reboot. Now Lastly reboot.

That's it enjoy and remember to ZIP C:\TEMP directory so you don't have to do steps 1-4 again.

Windows Media Player 10 Series (for Windows XP) (11.6mb)

2月10日

Whidbey CTP + SQL Server 2005 install order

Some people has been hitting my blog searching for the install order of Visual Studio 2005 Whidbey side by side with SQL Server 2005 Yukon. I thought I'd comment that SQL Server 2005 uses its own version of the framework, which usually is not the same version that comes with Whidbey. This doesn't seem to cause any problems for me. I personally install Visual Studio first, and then SQL Server.

 

US gives up search for Iraq WMD

http://news.bbc.co.uk/1/hi/world/americas/4169107.stm 

I just thought I'd also post the Report on UNMOVIC Findings (as reported to the U.N. Security Council in response to the question raised by the U.S., the United Kingdom, and other countries, whether the United Nations Inspection Commission, known as UNMOVIC, had found traces of weapons of mass destruction in Iraq. 

This report, in which Hans Blix (chief U.N. inspector) says UNMOVIC had not found any weapons of mass destruction in Iraq was broadcasted to the whole world on February 14, 2003, although few United States citizens recall seeing it (I guess it wasn't publicized enough). A little more than a month later, on March 20, 2003, the U.S. tried to assasinate Saddam Hussein, starting its latest unprovoked invasion of a foreign-country.

A few days after the UNMOVIC report I stopped trying to argue about Iraq with northamericans. I recall the exact point in time that made me give up in trying to reason with them: I was reading the owner of a popular IRC channel (chat room) saying that they should "kill all those fuckers" (Iraqi "terrorists", I guess).

It was clear for me at that moment that most of the US population didn't really care much about proof or facts about the WMDs issue, they just wanted someone to pay for 9/11, it didn't matter Iraq had nothing to do with it. 

On Feb 17, 2003, Undernet, #c++

[06:14] <WNDCLASS> If they strike, they will do it from the inside...
[06:14] <Tuplet> NoIdea we have no clue on who is on our soil right now.
[06:14] <NoideaLT> I don't know what they would expect to do to teh US.
[06:14] <NoideaLT> they certainly won't be hijacking planes ever again.
[06:15] <NoideaLT> so, they could try to bomb something
[06:15] <NoideaLT> that would be about it.
[06:15] <JBlitzen> They could suicide bomb a couple cafes.
[06:15] <JBlitzen> That would be hellishly damaging to us.
[06:15] <Tuplet> Noidea: the gossip is human bombs
[06:15] <JBlitzen> They can do basically anything they want.
[06:15] <X-Pantera> it would?
[06:15] <JBlitzen> Of course.
[06:15] <WNDCLASS> AHHHHHH!!!!! No more coffee
[06:15] <NoideaLT> but, they won't kill 1000's
[06:15] <WNDCLASS> :(
[06:15] <JBlitzen> Think about a bomb going off every week in NY.
[06:15] <JBlitzen> They don't have to kill 100's.
[06:15] <X-Pantera> sounds like a good reason not to attack iraq
[06:15] <JBlitzen> It's the impact and the fear.
[06:16] <JBlitzen> Sounds like a great reason to attack them.
[06:16] <JBlitzen> Kill all those fuckers.
[06:16] <X-Pantera> haha
[06:16] <NoideaLT> pfft, all the more reason to attack Iraq.
[06:16] <JBlitzen> Front load all their revenge.
[06:16] <JBlitzen> Hey, you want a piece of us?
[06:16] <JBlitzen> It'll be on our fuckin' terms.
[06:16] <JBlitzen> Sure, bomb a fuckin' starbucks.
[06:16] <X-Pantera> I would actually expect some sort of retaliation for an attack.
[06:16] <X-Pantera> so a few suicide bombings is ok whatever
[06:16] <X-Pantera> something to read about
[06:16] <WNDCLASS> Or we can make a virus that makes them infertile :) After we wait a couple a years and Bingo!
[06:16] <JBlitzen> I would expect an attack regardless.
[06:16] <JBlitzen> Might as well do what we can in the process.
[06:17] <JBlitzen> Remember, xp, no attack prompted september 11th.
[06:17] <NoideaLT> all this talk of a nuclear attack against the US
[06:17] <Tuplet> jbms: And what would you do to ones that are a good potential of being a hidden cell here? round them up like we did with the japaneze in wII?
[06:17] <NoideaLT> or a biological attack
[06:17] <Tuplet> damn this XChat
[06:17] <NoideaLT> or a chemical attack
[06:17] <Tuplet> JB, I ment
[06:17] <X-Pantera> JB, that wasn't iraq though
[06:17] <NoideaLT> not going to happen.
[06:17] <JBlitzen> Tuplet, give them a reason to think twice.
[06:17] <JBlitzen> If every time they fuck with us, we kill another regime dedicated to supporting them, they get afraid fast.
[06:17] <JBlitzen> It worked like a fucking charm with the soviet union.
[06:17] <JBlitzen> You don't hear much about the red terrorists these days.
[06:18] <JBlitzen> We didn't destroy Russia, but they did stop supporting those groups.
[06:18] <Tuplet> jbms: they are born to be human bombs
[06:18] <Tuplet> why is this program doing this!?!?
[06:18] <JBlitzen> Their tactics are only effective in the absence of a large scale response.
[06:18] <Tuplet> ack I am getting mad
[06:18] <JBlitzen> The jackals can piss off the lion, but the lion can still eat the fuckin' jackal whenever it wants.

2月9日

Free XP Themed Common Controls

The SteepValley.NET: XP Common Controls are a collection of themed and unthemed controls that are currently missing from the Visual Studio IDE.

This project is available for free including the source code.

Reflector.SQL2005Browser

The SQL 2005 Assembly Browser is a little add-in for Lutz Roeder's .NET Reflector that can be used to browse .NET assemblies stored in a SQL Server 2005 (Yukon) database.

You can connect your local Reflector installation to a remote SQL Server instance, list the databases and its assemblies and download them directly into .NET Reflector.

http://www.denisbauer.com/NETTools/SQL2005Browser.aspx

MS Antispyware written in VB6

Looks like the brand-new antispyware tool from Microsoft is written in (or at least has components written in...) Visual Basic 6!

http://dotnetjunkies.com/WebLog/johnwood/archive/2005/01/06/42086.aspx

 

QueryCommander - Intellisense for SQL Server

SQL query tool with a VS .NET-like interface and IntelliSense that works with SQL Server, MySQL, and Oracle - and it's free.

QueryCommander is a free sql editor wrapped in a Visual Studio type of environment.
QueryCommander supports:

  • Microsoft SQL Server 2000
  • Microsoft SQL Server 2005 (YUKON)
  • Microsoft SQL Server 6.5
  • MySQL 4.x
  • Oracle 9i (the "edit-in-grid" functionality is not yet implemented)

http://querycommander.rockwolf.com/

2月7日

Microsoft SQL Server 2005 Express Manager

Microsoft SQL Server 2005 Express Manager (free)

The "express" version of the Sql Server Client Tools, for Yukon.

http://www.microsoft.com/downloads/details.aspx?FamilyID=8f92556a-6c3b-47d2-9929-ecdc5a4d25ae&DisplayLang=en