mardi 14 novembre 2006

Tools for Visual Studio 2005

MZTOOL: http://www.mztools.com/ add lot of shortcuts

Precompilation for deployment ASP.NET 2.0

From: http://www.developer.com/net/asp/article.php/10917_3450901_2
Precompilation for deployment

Precompilation for deployment enables you to create an executable version of your entire Web site that can be deployed without any source code, including HTML and other static files. By using this mode of precompilation, you can prevent easy access to the intellectual property your code represents. The resulting set of assemblies and stub files can be deployed to a production server through XCOPY, FTP, Windows Explorer, and so forth.

ASP.NET 2.0 provides a command-line utility called aspnet_compiler.exe that allows you to not only precompile but also deploy the Web site in a single step (see Figure 6). To invoke the ASP.NET precompiler, open the Visual Studio 2005 command prompt and enter the following command:

aspnet_compiler -v /[websitename] -p [source] [destination]

Where [websitename] is the name of the Web site, and [source] and [destination] are file system paths pointing to the location of the source Web site and the location to which the compiled version should be emitted. For the example Web site, the command would look something like the following:

aspnet_compiler -v /Deployment -p c:\inetpub\wwwroot\myprojects\Developer\deployment c:\compiled

To view all of the available options for the ASP.NET precompiler, simply enter the command aspnet_compiler /? in the command prompt. After precompiling the Web site for deployment, navigate to the destination directory in Windows Explorer. You'll see a Web site with a bin directory containing several assemblies and descriptive files, as well as a number of stub files with the same names as the original pages, but with the code (both HTML and executable code) stripped out. However, if you browse the site, the output will be identical to the original site.

Precompilation using Visual Studio 2005

You also can use Visual Studio 2005 to precompile the Web site and deploy it in a specific location. To accomplish this, select Website->Publish Web Site from the menu, which will result in the dialog box displayed in Figure 7.

Clicking on Browse will display the Publish Web dialog box. In the Publish Web Site dialog box, you can choose to deploy the Web site in a file system, local IIS, FTP site, or remote site. If you click OK in the above dialog box, Visual Studio will copy all the required files to the C:\PrecompiledWeb directory and you can browse to this directory as any other Web directory.

lundi 13 novembre 2006

QuickStart: A Link to remember

Welcome to the Microsoft .NET Framework SDK QuickStart Tutorials:
http://quickstarts.asp.net/QuickStartv20/default.aspx

mardi 7 novembre 2006

20 Things the Average Person Doesn’t Know About Windows XP



1. It boasts how long it can stay up. Go to the Command Prompt in the Accessories menu from the All Programs start button option, and then type ’systeminfo’. The computer will produce a lot of useful info, including the uptime. If you want to keep these, type ’systeminfo > info.txt’. This creates a file called info.txt you can look at later with Notepad. (Professional Edition only).

2. You can delete files immediately, without having them move to the Recycle Bin first. Go to the Start menu, select Run… and type ‘gpedit.msc’; then select User Configuration, Administrative Templates, Windows Components, Windows Explorer and find the Do not move deleted files to the Recycle Bin setting. Set it. Poking around in gpedit will reveal a great many interface and system options, but take care — some may stop your computer behaving as you wish. (Professional Edition only).

3. You can lock your XP workstation with two clicks of the mouse. Create a new shortcut on your desktop using a right mouse click, and enter ‘rundll32.exe user32.dll,LockWorkStation’ in the location field. Give the shortcut a name you like. That’s it — just double click on it and your computer will be locked. And if that’s not easy enough, Windows key + L will do the same.

4. XP hides some system software you might want to remove, such as Windows Messenger, but you can make it show everything. Using Notepad or Edit, edit the text file /windows/inf/sysoc.inf, search for the word ‘hide’ and remove it. You can then go to the Add or Remove Programs in the Control Panel, select Add/Remove Windows Components and there will be the software and you can now uninstall it.

5. For those skilled in the art of DOS batch files, XP has a number of interesting new commands. These include ‘eventcreate’ and ‘eventtriggers’ for creating and watching system events, ‘typeperf’ for monitoring performance of various subsystems, and ’schtasks’ for handling scheduled tasks. As usual, typing the command name followed by /? will give a list of options.

6. XP has IP version 6 support — the next generation of IP. Unfortunately this is more than your ISP has, so you can only experiment with this on your LAN. Type ‘ipv6 install’ into Run… (it’s OK, it won’t ruin your existing network setup) and then ‘ipv6 /?’ at the command line to find out more. If you don’t know what IPv6 is, don’t worry.

7. You can at last get rid of tasks on the computer from the command line by using ‘taskkill /pid’ and the task number, or just ‘tskill’ and the process number. Find that out by typing ‘tasklist’, which will also tell you a lot about what’s going on in your system.

8. XP will treat Zip files like folders, which is nice if you’ve got a fast machine. On slower machines, you can make XP leave zip files alone by typing ‘regsvr32 /u zipfldr.dll’ at the command line. If you change your mind later, you can change things back by typing ‘regsvr32 zipfldr.dll’.

9. XP has ClearType — Microsoft’s anti-aliasing font display technology — but doesn’t have it enabled by default. It’s well worth trying, especially if you were there for DOS and all those years of staring at a screen have given you the eyes of an astigmatic bat. To enable ClearType, right click on the desktop, select Properties, Appearance, Effects, select ClearType from the second drop-down menu and enable the selection. Expect best results on laptop displays. If you want to use ClearType on the Welcome login screen as well, set the registry entry HKEY_USERS/.DEFAULT/Control Panel/Desktop/FontSmoothingType to 2.

10. You can use Remote Assistance to help a friend who’s using network address translation (NAT) on a home network, but not automatically. Get your pal to email you a Remote Assistance invitation and edit the file. Under the RCTICKET attribute will be a NAT IP address, like 192.168.1.10. Replace this with your friend’s real IP address — they can find this out by going to www.whatismyip.com — and get them to make sure that they’ve got port 3389 open on their firewall and forwarded to the errant computer.

11. You can run a program as a different user without logging out and back in again. Right click the icon, select Run As… and enter the user name and password you want to use. This only applies for that run. The trick is particularly useful if you need to have administrative permissions to install a program, which many require. Note that you can have some fun by running programs multiple times on the same system as different users, but this can have unforeseen effects.

12. Windows XP can be very insistent about you checking for auto updates, registering a Passport, using Windows Messenger and so on. After a while, the nagging goes away, but if you feel you might go insane before that point, run Regedit, go to HKEY_CURRENT_USER/Software/Microsoft/Windows/Current Version/Explorer/Advanced and create a DWORD value called EnableBalloonTips with a value of 0.

13. You can start up without needing to enter a user name or password. Select Run… from the start menu and type ‘control userpasswords2?, which will open the user accounts application. On the Users tab, clear the box for Users Must Enter A User Name And Password To Use This Computer, and click on OK. An Automatically Log On dialog box will appear; enter the user name and password for the account you want to use.

14. Internet Explorer 6 will automatically delete temporary files, but only if you tell it to. Start the browser, select Tools / Internet Options… and Advanced, go down to the Security area and check the box to Empty Temporary Internet Files folder when browser is closed.

15. XP comes with a free Network Activity Light, just in case you can’t see the LEDs twinkle on your network card. Right click on My Network Places on the desktop, then select Properties. Right click on the description for your LAN or dial-up connection, select Properties, then check the Show icon in notification area when connected box. You’ll now see a tiny network icon on the
right of your task bar that glimmers nicely during network traffic.

16. The Start Menu can be leisurely when it decides to appear, but you can speed things along by changing the registry entry HKEY_CURRENT_USER/Control Panel/Desktop/MenuShowDelay from the default 400 to something a little snappier. Like 0.

17. You can rename loads of files at once in Windows Explorer. Highlight a set of files in a window, then right click on one and rename it. All the other files will be renamed to that name, with individual numbers in brackets to distinguish them. Also, in a folder you can arrange icons in alphabetised groups by View, Arrange Icon By… Show In Groups.

18. Windows Media Player will display the cover art for albums as it plays the tracks — if it found the picture on the Internet when you copied the tracks from the CD. If it didn’t, or if you have lots of pre-WMP music files, you can put your own copy of the cover art in the same directory as the tracks. Just call it folder.jpg and Windows Media Player will pick it up and display it.

19. Windows key + Break brings up the System Properties dialogue box; Windows key + D brings up the desktop; Windows key + Tab moves through the taskbar buttons.

20. Windows XP secretly KNOWS that the average user has no idea what they are doing. Therefore, it doesn’t let you do really stupid things like deleting the windows directory (at least not without spending several hours convincing it that you REALLY want to do this). Oh yeah, and internet explorer kinda sucks, get Firefox.

lundi 6 novembre 2006

Explaining 'The Binding Handle Is Invalid'

From: http://blogs.msdn.com/greggm/archive/2006/01/04/509243.aspx

Today I want to try to give more insight into the 'Binding Handle Is Invalid' problem that a number of people have reported with the VS 2005 debugger. First, if all you care about is how to solve the problem: Enable the 'Terminal Services' service and reboot. If you want to know more, read on.

How to debug classic ASP pages in Visual Studion 200 5 (VS2005)

Quite a few people were unable to make VS 2005 to hit breakpoints in the server script in classic ASP pages. Little surprise here since the way we do ASP debugging changed since VS 2003 and there little or no information currently in VS 2005 Beta 2 docs on the topic (I filed a bug on this). Most importantly, setting BP and hitting F5 won't work - breakpoint never binds.

NOTE FOR IIS 5
:
This seems to work with my system, only I attached to the dllhost.exe(instead of w3wp.exe because I'm running IIS 5.0) running under the IWapUser Name. It gave me a warning, and asks if I want to attach to thisprocess, I clicked the 'Attach' button and my break points were hit. Two key items here:
  1. Classic ASP debugging only works with IIS. It does not work with the VS Development Web Server.
  2. In VS 2005 you have to attach to the ASP worker process (w3wp.exe in IIS 6).

Here is how to make ASP debugging work:

  1. Enable ASP debugging on the server. (I also added DEBUG verb to the asp extension, but I am not sure if it is required).
  2. Open classic ASP in VS 2005.
  3. Set breakpoint.
  4. View page in browser or run without debugging.
  5. Debug Attach to Process
  6. Locate IIS ASP worker process (w3wp.exe on IIS6) which exposes x86 and Script and attach as Script. At this point breakpoint should bind and you should be able to hit it. You may have to refresh the page in the browser to get the code executed again. I tried on Windows 2003 SP1 Standard Server running IIS 6 and it worked for me.



FROM MICROSOFT: http://msdn2.microsoft.com/en-us/library/ms178108(VS.80).aspx

To specify the Web server for a Web site in Visual Studio 2005:
  1. In Solution Explorer, right-click the name of the Web site for which you want to specify a Web server, and then click Property Pages.
  2. In the Property Pages dialog box, click the Start Options tab.
  3. Under Server, click Use custom server.
  4. In the Base URL box, type the URL that Visual Web Developer should start when running the current Web site.