Fix SQL Server 2008 Express Full Text Index Management Missing

by APIJunkie 12. July 2010 03:16

If you installed the SQL server 2008 express and you are missing the ability to manage full text indexes inside SQL server 2008 management studio. I.e. you are missing the storage folder inside management studio.

First make sure you installed SQL Server 2008 Express with Advanced Services (the version without advanced services does not support free text search functionality).

Second Try to Install SQL Server 2008 Express Edition Service Pack 1. Besides fixing some bugs it added the ability to manage full text indexes on my machine.

Hope this helps!

Tags:

PRB | Tips and Tricks | SQL Server

Creating a Self-Signed Certificate for use with IIS on Windows Server 2003

by APIJunkie 25. June 2010 23:47

This is the second time I had to find the solution to install self assigned SSL certificates on IIS so I am writing this down for posterity.

 

In many cases it is desirable to create your own SSL certificate when working with IIS.

For example when developing/testing SSL secure web sites, when using a custom web application in a local intranet or for a closed  group of users to name a few.

 

It should have been easy to create your own SSL cert and instruct IIS to use it.

Microsoft delivered a tool to do just that. It was a part of the IIS 6.0 Resource Kit and it was called SelfSSL. But alas because of a bug in the SelfSSL tool you will run into problems if you try to use multiple certificates on a server.

 

Apparently Microsoft decided not to release a patch for the resource kit but instead released another tool that can be used to create self SSL certificates called SSL Diagnostics.

 

The tool is very easy to use. There is a nice tutorial on how to use the SSL Diagnostics tool to create an SSL certificate by Revindex.

 

Another option you might want to explore is using the open source alternative called OpenSSL. There is a nice tutorial on how to use OpenSSL with IIS by Dylan Beattie.

 

Best of luck!

Tags:

How To | IIS | Tips and Tricks

Silverlight update KB982926 failure and solution

by APIJunkie 4. June 2010 23:29

I was doing the rounds and updating 2 machines, running XP Pro and 2003 Server, with Silverlight 3 run time pre installed on them. When the update was complete I couldn’t view any Silverlight based web sites with IE 8 on both machines.

 

I would only receive an install Silverlight message. It was as if Silverlight was not installed on the machines any more.

 

A quick check in the IE installed component list (Tools/Internet Options/Programs/Manage add-ons/Show all add-ons) showed me I was automatically upgraded to Silverlight 4 (Version 4.0.50524.0) which seems fine.

 

To solve the problem I did the following:

 

1. Went to http://www.microsoft.com/silverlight/.

 

2. Pressed the install Silverlight button which crashed the installer (on npctrl.dll).

 

3. Restarted the browser at which point I got a message telling me I need to restart the browser again.

 

4. Restarted the browser for the second time which made Silverlight runtime and IE happy and willing to play together again.

Tags:

KB | Silverlight | Troubleshoot

Using the free Babel Obfuscator in Silverlight projects

by APIJunkie 4. February 2010 05:24

One of the problems with Silverlight managed code is that it can easily be reverse engineered using standard .NET reflection tools.

Although no method can completely prevent reverse engineering your code there are ways to slow down and even deter all but the most persistent hackers.

Most of the tools I found that can be used to obfuscate Silverlight code are not free. But the Babel obfuscator by Alberto Ferrazzoli is an open source .NET obfuscator that can be used in Silverlight based projects.

Babel is a command line tool and it can be integrated into your build process. One way to do that is to add it to your post build events.

When you run babel on a target dll (assembly) it will generate an obfuscated version of the dll in the directory “.\BabelOut” relative to your dll output directory.

Usage Example:

"D:\Program Files \Babel\babel.exe" $(TargetPath) --noildasm --nomsil --noinvalidopcodes

Some caveats that apply to current babel version 2.0.0.1:

1.       The current version does not support obfuscating xap files directly but you can unzip the files first or integrate the babel tool into your build process.

 

2.       Not all command line parameters/options are supported in Silverlight projects. The following options work:

       --noildasm --nomsil –noinvalidopcodes

 

3.       Some assemblies (dll’s) that contain resources do not seem to obfuscate correctly (Its very easily detected they are not usable after obfuscation). If you have this problem you can always move all the sensitive code into a separate Silverlight code library and obfuscate only the code library.

Example:

Let’s assume you have one monolithic project called: “MySilverlightApp” that contains all the code and resources (xaml, images etc.) that will not obfuscate. To solve the problem:

1.       Add a new project to the solution called “MySilverlightAppCode” of type “Silverlight Class Library”.

2.       Add a reference to the new Silverlight library from the “MySilverlightApp” project.

3.       Move all the sensitive code files into the new Silverlight code library (“MySilverlightAppCode”).

4.       Obfuscate only the “MySilverlightAppCode” assembly (MySilverlightAppCode.dll).

 

Tags:

Silverlight | How To

Running multiple commands on a Visual Studio post-build event using batch files

by APIJunkie 31. January 2010 11:13

 Many times it’s more desirable to collect your post build commands into batch files. Some of the reasons include easier maintenance, portability and satisfying the “don’t repeat principle” when multiple projects are sharing the same commands. If you do decide to go down the batch road there are a couple of things you should be aware of:

1.       If you want to run multiple batch files or commands. You will need to use the “call” command to ensure that all the other commands execute. If you don’t do that only the first batch file will run. To use the call command, simply precede each batch file name with “call”.

Example:

Instead of writing:

 C:\MyBatchFile.bat

Write:

call C:\MyBatchFile.bat

 

2.       Sometimes you will need to run external programs that could be installed in different locations on different dev machines. In such cases you might find the batch “start” command very useful. Instead of specifying the path, you just use the external program name or its file associations.

Example:

Let’s say you have several developers that have installed Winrar in different locations.

Writing: “C:\XXX\Winrar.exe” in the batch will not work in cases where developers installed it on another drive or location.

But writing: “start winrar” in the batch will work if it’s installed on the developer’s machine.

 Hope this helps!

Tags:

.NET | Visual Studio | Portability

_mkdir C runtime library function might return unexpected error values

by APIJunkie 22. December 2009 08:05

mkdir is a C runtime library function that creates directories.

In contrary to what could be understood from the MSDN documentation:

“…On an error, the function returns –1 and sets errno as follows.EEXIST Directory was not created because dirname is the name of an existing file, directory, or device.ENOENT Path was not found.For more information about these and other return codes, see _doserrno, errno, _sys_errlist, and _sys_nerr.”

mkdir might return other error values. For example when calling mkdir on an existing directory the function might return EEXIST but can also return EACCES (permission denied). The function error results seem to differ according to user access permissions on the system. This has been tested on Windows 2003/Vista/7. For more information and portability issues check out this discussion about mkdir portability in Kernel trap.

·         Note that this discussion applies to Microsoft’s implementation of the C run time library.

Tags:

C++ | C | Microsoft | Portability

MFC OnTimer function does not compile when porting legacy code from 32-bit to 64-bit

by APIJunkie 22. December 2009 07:17

I was recently porting an MFC C++ application that compiled on Visual studio 2005 32-bit to VS 2008 64-bit.

It turns out there is a bug in the code generated by older versions of MFC that makes it not compile on 64 bit.

The problem is with the OnTimer function signature:

      afx_msg void OnTimer(UINT nIDEvent); 

It should be changed to ->

      afx_msg void OnTimer(UINT_PTR nIDEvent);

 

You can find Microsoft’s reaction to a similar connect bug report for VS 2005 at:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101372

Hope this helps!

 

Tags:

MFC | C++ | Win64

3XH Silverlight high score and in game achievement API is now available to developers

by APIJunkie 27. November 2009 09:19

As we mentioned before we have been busy working on our new Silverlight in-game event system, code name 3XH. You can see it in action on our featured games section on Mashooo.com. The system allows Silverlight game developers to work with high scores and user achievements without the hassle of building and maintaining the framework and the system to support them. The system was in closed beta testing until now. We were working with a limited number of developers (Jeff Weber, David Lévesque, Daniel James and Ian Tomlinson) to fine tune the system.  We are happy to announce that as of today we are opening the 3XH developers program and the services it includes. All Silverlight game developers can now start using our new Silverlight high score and in game achievement system (3XH).

3XH highlights include:

1.       Flexible system to store/retrieve high scores, achievements and other game events.

2.       Ability to use the system on any web site.

3.       Multi login support (Facebook, OpenID, AOL, Yahoo, Google and more to come.)

4.       Current player information.

5.       Integrated Reward system to reward users for their game achievements.

6.       Managed prize bearing contests.

7.       100% Silverlight from the ground up and much more.

To participate in the program or to find out more information read the 3XH developers manual.

Tags: ,

Silverlight | Games

3XH Silverlight high score and in game achievement API is now available to developers

by apijunkie 27. November 2009 03:19

As we mentioned before we have been busy working on our new Silverlight in-game event system, code name 3XH. You can see it in action on our featured games section on Mashooo.com. The system allows Silverlight game developers to work with high scores and user achievements without the hassle of building and maintaining the framework and the system to support them. The system was in closed beta testing until now. We were working with a limited number of developers (Jeff Weber, David Lévesque, Daniel James and Ian Tomlinson) to fine tune the system.  We are happy to announce that as of today we are opening the 3XH developers program and the services it includes. All Silverlight game developers can now start using our new Silverlight high score and in game achievement system (3XH).

3XH highlights include:

1.       Flexible system to store/retrieve high scores, achievements and other game events.

2.       Ability to use the system on any web site.

3.       Multi login support (Facebook, OpenID, AOL, Yahoo, Google and more to come.)

4.       Current player information.

5.       Integrated Reward system to reward users for their game achievements.

6.       Managed prize bearing contests.

7.       100% Silverlight from the ground up and much more.

To participate in the program or to find out more information read the 3XH developers manual.

Tags:

3XH Silverlight high score and in game achievement API is now available to developers

by apijunkie 27. November 2009 03:19

As we mentioned before we have been busy working on our new Silverlight in-game event system, code name 3XH. You can see it in action on our featured games section on Mashooo.com. The system allows Silverlight game developers to work with high scores and user achievements without the hassle of building and maintaining the framework and the system to support them. The system was in closed beta testing until now. We were working with a limited number of developers (Jeff Weber, David Lévesque, Daniel James and Ian Tomlinson) to fine tune the system.  We are happy to announce that as of today we are opening the 3XH developers program and the services it includes. All Silverlight game developers can now start using our new Silverlight high score and in game achievement system (3XH).

3XH highlights include:

1.       Flexible system to store/retrieve high scores, achievements and other game events.

2.       Ability to use the system on any web site.

3.       Multi login support (Facebook, OpenID, AOL, Yahoo, Google and more to come.)

4.       Current player information.

5.       Integrated Reward system to reward users for their game achievements.

6.       Managed prize bearing contests.

7.       100% Silverlight from the ground up and much more.

To participate in the program or to find out more information read the 3XH developers manual.

Tags:

About the author

Name of author

My name is Bacon…James Bacon.

I am an API wars veteran. I was wounded by x86 assembly, recovered and moved on to C. Following a long addiction to C++ and a short stint at rehab I decided to switch to a healthier addiction so I am now happily sniffing .NET and getting hooked on Silverlight.

I am mainly here to ramble about coding, various API’s, Junkies(me especially) and everything else that happens between coders and their significant other.