Saturday, February 25, 2006

LC.EXE

Q: What is LC.EXE?

A: LC.EXE (License Compiler) is a command line utility provided with .Net Framework 2.0. By default this utility is installed in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin. When executed, LC.exe will read license information from a text file and include it with .Net assembly. For more information, goto http://msdn2.microsoft.com/en-us/library/ha0k3c9f.aspx.

Recently a KB (Knowledge Base) article was published for a bug regading this utility. The License Compiler (Lc.exe) throws an exception when a .NET Framework 2.0 application consumes licensed components on a computer that is running a 64-bit operating system. For more information, see KB article 913961.

Friday, February 24, 2006

Using Shutdown.exe

Q: How can I remotely shutdown a machine in a workgroup?

A: Use the Shutdown.exe command with the –m switch. This command is found in the Windows System directory (i.e. C:\Windows\system32 for Win XP), and will allow you to specify a remote computer name to shutdown. See the following for more info

Usage: shutdown [-i -l -s -r -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]

No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without war
ning
-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)

This can be executed from a script or a .Net program.

Monday, February 20, 2006

Special Offer for a C# Class

Interested in taking a "Programming with C#" class? Due to a last minute cancelation, Solutient is in need of students for next week's class, Class 2124 for Feb 27-March 3, 2006.
This class provides students with the knowledge and skills they need to develop C# applications for the Microsoft .NET Platform. The course focuses on C# program structure, language syntax, and implementation details.

Next week's special price: $995 Learn More
If interested, please contact Steve Luc at Solutient by email (sluc@solutient.com) or by phone at 216-654-0025. Visit Solutient on the web at http://www.solutient.com.

Tuesday, February 14, 2006

Windows Defender

Microsoft Windows Anti-spyware tool has now been enhanced and renamed to Windows Defender. Currently the product is in its 2nd Beta release. To download it, go to http://www.microsoft.com/athome/security/spyware/software/default.mspx.

Friday, February 10, 2006

Microsoft Security Patches

Microsoft plans to release 7 security patches on February 14th, 2006.

  • 1 patch affecting Microsoft Windows Media Player.
  • 4 patches affecting Microsoft Windows (some will require a restart).
  • 1 patch affecting Microsoft Windows and Microsoft Office (require a restart).
  • 1 patch affecting Microsoft Office (may require a restart).

For more information, please goto http://www.microsoft.com/technet/security/bulletin/advance.mspx.

Tuesday, February 7, 2006

Detecting a ClickOnce Application

Q: How do I tell if I'm currently running in the context of a ClickOnce application?

A: You can see if a ClickOnce application is running in the current AppDomain by checking the AppDomain.CurrentDomain.ActivationContext property. If that value is non-null, then the domain is running a ClickOnce application. The ActivationContext will also get you the name of that application. There may be situations (such as choosing an isolated storage scope), where having this information is necessary and useful.

For more info, visit http://blogs.msdn.com/shawnfa/archive/2006/01/20/514411.aspx

Friday, February 3, 2006

File Upload Limit

Q: I’m using code very similar to that in this article (http://www.dotnetspider.com/technology/kbpages/568.aspx). The problem I have is when I try to upload a 9 MB file, I immediately get “Page cannot be displayed” error. Execution doesn’t even reach the PageLoad() event. The size limit for an IMAGE type in SQL Server 2000 is 2GB+, so size should not be a problem here. When I try the same function for files under 4MB, everything works as expected. What's the problem?

A: Your web application can only upload a file size of 4 MB only. To upload files more than 4mb you have to add option in the web.config file and set the maximum file size there.

In addition, if you're running IIS6, you could be hitting the limit for AspMaxRequestEntityAllowed. If the Content-Length header field of the HTTP request is larger than this limit, the page will bomb out immediately. You can increase the value in IIS6's metabase. For more info, goto
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html/99b8a8bd-f9e7-43a8-b4cf-1186e2b3e9e2.asp

Thursday, February 2, 2006

What is _vti_cnf ?

Q: What is _vti_cnf?

A: This is a special folder created by Frontpage for use with IIS. Other folders may include _vti_script, _vti_pvt, or _vti_txt. For a complete list of FrontPage special files and folders, goto http://www.rtr.com/fpsupport/SERK/a_spfile.htm. This folder is not required for an ASP.Net application so it can be deleted manually.

Tuesday, January 31, 2006

Discount training for SIG Members

Solutient is offering a wide variety of .Net classes at a discounted rate exclusively for SIG members. The complete list is posted on the SIG web site at http://www.clevelanddotnet.info/ under the "Links" section. To receive the C#/VB.Net special interest group membership preferred pricing, you must mention promotion code A16. If you have any questions, please contact Steve Luc at SLuc@solutient.com.

Friday, January 27, 2006

Setting the Default Button in ASP.Net 1.1

Q: I have an ASP.Net 1.1 search form with several buttons on it (Search, Clear, Logoff) and a search word field. Currently, if the user enters text in the "Search Word” fields, and presses ENTER, the logoff button (located on the banner at the top of the form) is activated and the user is prompted if he wants to logoff. How can I change it so the ENTER key will activate the “Search” button instead? In other words, how can I make the “Search” button, the default button?

A: In ASP.Net the enter button executes the first button on the page. So create a button that is not visible (width is set to 1 px) and placed it at the top of the page before the logoff button. Change the background color if needed and make sure it cannot be seen. Then set the click event in .aspx page to execute the search button click event. When the user presses enter, the first button is executed and it will call the search method.

Sunday, January 22, 2006

An invite to all SIG members

BRING YOUR "A" GAME. BRULANT GAME NIGHT!

You're invited to test your gaming skills against your fellow technology gurus. Join us for networking, food, drinks, and the chance to win bragging rights as the master of:
* Texas Hold 'Em
* Halo 2
* Chess
* Foozball
* Human Tic-Tac-Toe
* Madden
* CounterStrike
* and more!
Throughout the night, we'll be giving away great prizes. Feel free to suggest any other games we might consider, and bring a friend, the more the merrier!
When? Thursday, February 2nd, 5:30 p.m.-?Where? Brulant's NEW Headquarters3700 Park East Drive, Suite 300Beachwood, OH 44122To Register: Visit http://www.brulant.com/events/event.asp?id=508, and click on the "register" button for each person that plans on attending!


BRENDA M. PATTERSON
Marketing Communications Manager
216 896 8938 / direct
brenda.patterson@brulant.com

BRULANT, Inc.
3700 park east drive, suite 300
beachwood, ohio 44122
216 896 8900 / phone
216 896 8991 / fax
brulant.com

Thursday, January 12, 2006

Accessing Version Number in .Net

Q: How do I programatically access the version number of an ASP.Net application?

A: The version number, and other general information, is kept in the AssemblyInfo.vb (for VB.Net projects). All information is housed in attributes in the file, as listed below:

Assembly: AssemblyTitle("MyApp")
Assembly: AssemblyDescription("A Sample Program")
Assembly: AssemblyCompany("ABC Software Corp.")
Assembly: AssemblyProduct("")
Assembly: AssemblyCopyright("2006")
Assembly: AssemblyTrademark("")
Assembly: CLSCompliant(True)
Assembly: AssemblyVersion("2.0.*")

To access the application version through .Net code, use
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(). The value displayed will be 4 sets of numbers, separated by '.' (similar to TCP/IP address). The version information for an assembly consists of the following four values:
Major Version
Minor Version
Build Number
Revision

Monday, January 9, 2006

MSDN Beta Home Page

One of the tips I give to developers who want to stay up to date on the latest .Net information is to view MSDN web site (http://msdn.microsoft.com) regularly. It's a good idea to set it as your default home page so you can glance the headlines everytime you open a browser.

Expanding on that idea, Microsoft is now working on a Beta MSDN site (http://msdn.microsoft.com/aboutmsdn/betahomepage/default.htm) . The 2 big features of the new site are Country specific content and "My MSDN" for personalized content management.