How do I fix this error: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0

You've probably just converted your vs 2005 web project with ajax to vs 2008. This is because Visual Studio 2008 has a newer, built-in version. The fix is short and sweet!  

Remove the System.Web.Extensions from references, then add them back again! That should connect you with the correct assembly. If you're uncertain how to remove the reference, check this out: http://geekswithblogs.net/AskPaula/archive/2008/09/04/124948.aspx   

 

 

Where do I add references to a project in visual studio 2008 (vs 2008)?

Let's say you've converted a vs 2005 asp .net project over to vs 2008 and you have old ajax references like System.Web.Extensions, etc. that you want to get rid of, but they don't show up under the Solution view. The way to remove those references (or add new ones) is to do the following:

  1. Right click on the solution (assuming the solution view is active)
  2. Select Property pages
  3. At the bottom of the dialog box you'll be able to Add, Remove or update.

How do I know which version of BizTalk I am running?

The quickest way is to do the following:

  1. Go to Start>Settings>Control Panel
  2. Select Add/Remove Programs
  3. Scroll unitl you find BizTalk
  4. Click on the support anchor (see screen shot below)

 Lookup BizTalk Version Info

How do I change the owner of my table in SQL Server?

Go to the ms sql server database instance that has the table object and open a new query window. Execute the system stored proc called sp_changeobjectowner. The 2 parameters it needs to run are: (1) the current owner+object name and (2) the target owner. Take a look at the example below:

exec sp_changeobjectowner 'METRO\paula.EmployeeContact', 'dbo'

When the stored proc is completed, refresh the instance. The table will then be owned by dbo. In this example, the table would display as dbo.EmployeeContact

Where can I find the IIS Logs?

The pattern in most environments is the %windows% directory, %system32% ... etc. There are other  w3 formatted directories under \LogFIles -- but primarily most folks will be looking under this directory for what they need:

C:\WINDOWS\system32\LogFiles\W3SVC1

Once you're there, the actual log files will look like:

exYYMMDD.log  (e.g. ex080802.log)

 

Why does "use db" with a hyphen throw "Incorrect syntax near '-'" ?

I think this SQL Server x.x  oddity goes back to the old Sybase 4 days!

If you want to use a database name that's been dubbed something like 'paula-objects' and type out:

use paula-objects

then execute the request, you'll get the error message:  Incorrect syntax near '-'

just type this instead:

use [paula-objects]

when you execute the request, the syntax error will clear up!

Does SQL Server have an "ALL_TAB_COLUMNS" feature?

Yes!    

For those Oracle X.Xers finding themselves working in the SQL Server 2005/2008 world these days, you'll be happy to know all you need to do is:

1. Open up a new execute query window.

2. Type the following:

use FavoriteDbInstance

SELECT
 table_name,column_name
FROM
 information_schema.columns
WHERE
  column_name LIKE
'%whateverYouWant%'

That's it!:-) Your table names with the column name you are searching for should show up!

 

 

Is there a "DUAL" database equivalent in SQL Server?

There isn't a "DUAL" exactly, but you can test things out in SQL Server in a similar way for example in Oracle to get today's date/time you would type:

SQL> SELECT sysdate from DUAL;

To do the same thing in MS SQL Server type:

SELECT getdate()

My *.chm help files are broken, how do I fix it?

You may have discovered this when you were attempting to rummage through Internet Explorer's help files, or perhaps you've just downloaded a help file from another vendor with the *.chm file type. In either case you'll see something that looks like this:

SecurityUpdateBug

This was  either caused by a Microsoft Security upgrade or by installing Microsft Windows Server 2003 SP1 which included changes to the InfoTech protocol that blocked the ability to view remote content.

To correct this, execute the following steps:

  1. Navigate to the *.chm icon.
  2. Right-click on the icon
  3. Click Properties.
  4. Click unblock.

 

How do I know if I'm running a 32-bit or 64-bit version of Windows?

The most comprehensive guide to outlining the steps on what to do to find out is provided by Microsoft, located on their website under : http://support.microsoft.com/kb/827218/?FR=1 , but here's a cheat-sheet version to keep handy!

XP or Windows Server 2003

  1. Click Start>Run
  2. Type sysdm.cpl . Click OK
  3. Click the General tab.
  4. Look at the operating system.

If the operating system has an x64 in it, then you are running a 64-bit version. If you do NOT see this, you are running the 32-bit version.

Vista

  1. Click Start. Type system in the Start Search box.
  2. Click system in the Programs list.
  3. Look at the operating system.

The System type under System value will show either 64-bit or 32-bit.

Outlook 2007 Business Contact Manager doesn't work or won't load, why?

There are several reasons why the Business Contact Manager (BCM) might not load, rather than guess, the best thing to do is to have BCM generate a log file so you can analyze the problem more methodically! How cool is that ?

Here's what you need to do to invoke logging in BCM:

  1. In Outlook, go to the Help Menu
  2. Click on About Business Contact Manager for Outlook.
  3. A window will open, in this window click on the checkbox to enable logging for BCM.
  4. The log file that get's generated is located under: c:\Users\YourName\AppData\Local\Temp\BCMLog_Vx.log

Open the file and have a look around! This should help you determine what the trouble is without a lot of guess work!

 

Outlook 2007 Business Contact Manager Fails to Initialize the Common Language Runtime, Why?

If you are seeing the message: Business Contact Manager failed to initialize the Common Language Runtime. ECall methods must be packaged into a subsystem module, BCM isn't really the trouble. You are getting this message because on or around April 11, 2008 an automatic update from Microsoft downloaded a damaged component of the Microsoft .NET Framework 2.0. 

 On the bright side, today is May 20, 2008 and a patch has already been downloaded on an automatic update. You'll just have to repair it!

To repair the damaged .NET 2.0 component, execute the following steps:

For XP:

  1. Click on Start>Settings>Control Panel
  2. Double-click on Add or Remove Programs icon
  3. Select Microsoft .NET Framework 2.0
  4. Click Change/Remove
  5. Choose Repair.
  6. Restart computer

For Vista:

.NET Framework 2.0 is completely integrated into Vista, so it can't be uninstalled/repaired the same way as it can in XP. In the case of Vista, you'll have to run sfc (system file checker).

  1. Click on Start, type cmd in the Start Search Box. [don't press enter yet]
  2. Right-click cmd.exe in Programs list in search results, click Run as Administrator
  3. In command window, type sfc/scannow  -- press enter.

If this still doesn't fix your issue, please look for .NET 2.0 SP1 on www.microsoft.com/downloads . There will be two versions out there, one for 64-b and one for 32-b. If you aren't sure which version of the operating system you're running on, follow the instructions listed by Microsoft here: http://support.microsoft.com/kb/827218/?FR=1

 

Why do EDI permissions fail in BizTalk?

I am getting the message: "Unable to set permissions on the shared documents home folder"

This is probably happening because the needed membership in the security groups for EDI/SQL roles aren't set up all the way through, it is likely some of it is set up already and some of it isn't -- so when your bts service account is trying to execute EDI, you see this sort of error.

To correct this, try these quick few steps first. If all else fails, Microsoft has an online reference: http://msdn2.microsoft.com/en-us/library/aa546733.aspx


II. Check Permissions on Receive and Send Folders (READ: not the likely cause for this particular error, but best to be sure this is setup right anyway)

1. In windows explorer, right-click on your site's EDI Receive folder location.
2. Make sure service account for bts host has FULL CONTROL permissions.
3. Make sure that the other user groups that dump files there have WRITE permissions.
4. In windows explorer, right-click on your site's EDI Send folder location.
5. Make sure the service account for bts host have WRITE permissions.
6. Make sure that the other user groups have READ permissions.


II. Check to be sure the user account which the EDI service is running with is in the BTS_HOST_USERS sql role (READ: A good candidate for resolving this particular error message)

1. Connect to the database instance your bts server points to in SQL manager.
2. Look at the BizTalkMgmtDb security settings for Roles.
3. Look under Database Roles, then right-click BTS_HOST_USERS. Click on Properties.
4. Once there, look for the EDI Subsystem. If not there, click Add and then click the EDI sub-sytem users and add it.

NOTE: If there isn't and EDI sub-system user to add, it do the following:
            a. Go to Users, click New Database user.
            b. right-click Users. click New Database User.
            c. in drop-down, select EDI subsytem users group
.

III. Check to be sure the BTS service account is in the EDI Subsystem Users Group (READ: Another good candidate, although likely to resolve a more dramatic EDI error!  )

1. Go to Active Directory. Go to Users.
2. Double click on EDI Subsystem Users group and display properties.
3. Click on Memebers.
4. If BTS service account isn't there, click on Add. Add the BTS service account user.

My USB keeps changing drive letters, why?

Unless you configure the drive from a few levels under Administrative Tools, the drive will appear to randomly select a letter.  For example, one day when you plug your USB drive in, you'll see E: and on another occassion you'll see F:.  It's not really random--its actually tied to which USB ports are available and the internal definitions of the ports by sequence. This can be troublesome should you have shortcuts on your desktop that point to programs on your USB drive. The install packages would have dubbed the starting and target destinations with whatever letter the USB drive had at the time--so when the drive letter changes, the shortcuts don't work!

To solve this heartburn, do the following:

  1. Go to Start>Control Panel>Administrative Tools>Computer Management>Storage>Disk Management
  2. Highlight the drive and select Change Drive Letter and Paths..."
  3. Click on Change.
  4. Type a higher letter (e.g. S,T,U,V..) so that if you were to get a new internal disk drive, the assignment won't conflict.

Once the save is changed, go through your desktop and your program shortcuts by right clicking on the shortcut's icon. Select Property. Reassign any icons, targets and starting destinations with the drive letter you assigned.

 

 

VS gives the error LockClrVersion, Why?

If you are getting an error message with the phrase LockClrVersion could not be located in the dynamic link library mscoree.dll  it is probably because you don't have the correct .net framework loaded. For the newer versions of C#/VB/etc.express (Visual Studio 8.0), you'll need to load the v2.0 .net framework.

If you're trying to execute Visual Studio from a location that isn't associated with your machine's installation, you'll probably move the error to some other error--at which point, a reinstall of vs will be your best bet.

My window is cut-off or truncated. Why?

truncated Microsoft WindowIf an application window, like the one to the left, keeps you from being able to enter data because it cannot be maximized or it is not enabled to scroll up or down, it is usually because the programmer made some assumptions about the display settings.

To compensate for that, you'll have to change the display settings  on your computer.

To do this, follow these steps:

  1. 1. Start>Control Panel>Display> Appearance>Color Scheme 
  2.  
  3. 2. Choose something like Desert, which displays at a smaller font.
  4. 3. Apply the change.

Your screen should refresh with the new color scheme--allowing you to be able to work within the confines of the fixed window space!

The Northwind DB is missing! What do I do?

As long as you (or your colleagues) don't have any serious test data you've been working on that needs recovering, it's pretty simple to generate a fresh instance!

First, search for the SQL Server script that builds the demo database under \Mssql\Install. The name of the script is called: instnwnd.sql .  If the script isn't found there, an alternative place to look is under the Visual Studio SDK path(s), for example:  C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Samples\Setup . If the script is still missing in action, try searching for the file. Once you have located the file, open a command window and navigate to that directory path. Once there, type:

osql -Usa -Psapassword -SMyComputerName\MyDBServerName -iinstnwnd.sql -oinstnwnd.log

(READ: -U = username, -P = password, -S = DB Server Name -i = input script -o = output log.)

To be sure that the script executed correctly, open the instnwnd.log file and review the results.

That's it!

 

Thinking Through Rules in C#

As I continue with writing the manuscript on rules engines, I've isolated my examples to be coincidental with the overall theme of engineering decision support applications. Today, I am taking a close look at the seemingly simple act of identifying and rejecting unattractive alternatives when competing projects are under review to determine whether or not a given project will warrant funding.

Some of the determining factors are well known algorithms in the financial world. Specifically I am thinking about the rate of return on investment (roi), present worth (pw), annual cost (euac), annual benefit (euab), benefit-cost ratio (bc), net present worth (npw).  Overall, these calculations can quickly help decide whether the minimum level of economic attractiveness is met by a project. I will elaborate on each of these later. For now, any of the methods may be used independently or collectively to ultimately reject a candidate project.

Before we translate this decision process to a specific rule engine implementation, Let's look at a class stub I wrote to think it through:

using System;
using System.Collections.Generic;
using System.Text;

namespace CapitalExpendProjProp
{
    public class ProjectProposal
    {
        // MARR = minimum attractive rate of return
        public int ProjectReview(string Project, string[] alternative, int MARR)
        {
            int roi, pwb, pwc, euac, euab, bc, npw, rejTally = 0;

            foreach(string alt in alternative)
            {
                roi = rateOfReturn();
                if (roi < MARR)
                { rejTally = rejTally + 1; } // REJECT

                pwb = presentWorthBenefits();
                pwc = presentWorthCosts();

                if (pwb < pwc)
                { rejTally = rejTally + 1; } //REJECT

                euac = AnnualCost();
                euab = AnnualBenefit();

                if (euac > euab)
                { rejTally = rejTally + 1; } //REJECT

                bc = BenefitCostRatio();

                if (bc < 1)
                { rejTally = rejTally + 1; } //REJECT

                npw = NetPresentWorth();
                if (npw < 0)
                { rejTally = rejTally + 1; } //REJECT
            }

            return rejTally;
        }
    }
}

 

 

What is a BizTalk "Host Instance"?

To answer this question, a more basic question to ask would be what is a BizTalk host, since a host must exist before an instance of it can exisit!    This distinction may be confusing to BizTalk newcomers because when navigating through the BizTalk Admin Console, hosts and host  instances are viewed separately.

In mid-90's techno-speak, (READ: about the time-frame where the development of the BizTalk/Commerce Server got its start) the host would have been thought of as a container for related adapter handlers, pipelines, receive locations and orchestrations. Since an enterprise's BizTalk configuration or implementation can span over multiple physical servers, grouping logical units of work tied to an abstract host allows instances of defined work to span servers. So, think of a host instance as the physical implementation of the logical grouping of work. For example, if a multi-national retail chain wanted to process its outgoing purchase orders, a likely BizTalk implementation would include instantiating multiple instances of a defined purchasing host across several physcial servers.

To read more about hosts and host instances, check these links out!

http://msdn2.microsoft.com/en-us/library/aa561042.aspx

http://geekswithblogs.net/toddu/archive/2004/10/02/12050.aspx

 

What is an "event storm"?

Loosely stated, an event storm is a large number of warming, informational and error class occurrances on a given node (or array of nodes) over a relatively short period of time. Since these events  must be detected and addressed to improve the health and reliability of any given system, a whole science and collection of supporting applications exist to best manage these occurrances.

The best academic abstract/whitepaper I've seen on the topic comes from Mouayad Albaghdadi, Bruce Briley and Martha Evens, titled Event Storm Detection and Identification in Communication Systems.

http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6V4T-4GGWG9B-2&_user=10&_rdoc=1&_fmt=&_orig=search&_sort=d&view=c&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=f0c21894956067e205019af5285b5b14

In the Windows Server 200x world, event storms are represented by the number of events that fill the box's event log--visible to administrators) through Event Viewer. Events will fall under general classes; Application, Security and System. Within these classes, events are typed under Information, Error and Warning. A fast and furious collection of them across any category, under any type is considered an event storm.

If you have access to the Microsoft Operations Management (MOM) server in your NT/Windows Server 200x environment, connect to the OnePoint database instance, look under views. An important view is dbo.SDKEventView. You'll see columns like: EventGUID, ComputerName, GeneratedAlert, Message, NTEventID, TimeGenerated, TimeStarted, TimeStored, etc.

Let's say you're interested in determining which boxes on your network have been generating the highest count of events. Type and execute this query:

SELECT ComputerName, COUNT(*) AS myTally
  FROM dbo.SDKEventView
   WHERE (TimeGenerated BETWEEN convert(datetime,'02/04/2008 05:00:00 AM',101) AND convert(datetime,'02/04/2008 05:00:00 PM',101 ))
    GROUP BY ComputerName
     ORDER BY myTally DESC

What you'll see as a result from this query is a listing of each node/server with a tally of events generated for the past 12 hours. Granted, not all the events that tally may be of dire interest to you (e.g. common, or expected IIS related-errors) however it is an acid-test to help determine which nodes on your network are generating a lot of  tagged activity. To dig deeper into MOM event managment and reporting, please visit Justin Harter's web site: http://www.momresources.org . This is an AWESOME resource for developers and admins alike from all levels experience!

Why do I get a "load file or assembly" error?

If you are getting an error when attempting to access your ASP .NET application that looks like:

Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

You are probably missing AJAX v1.0!  

 


What is a "splitter pattern" in BizTalk?

Overall, when an incoming XML message contains multiple potential single messages, the extraction process needed to separate the messages out is thought of as "splitting " or "shredding" the message. The splitter pattern then, is a reliable, uniform way to address splitting/shredding throughout your applications.

An example for why your application might need to split messages would be something like a single input XML message with multple pension fund benefits for multiple persons which require multiple output XML messages with each pension benefit grouped for each person in a single transformed XML message.

There are alternative ways to successfully shred the message, but the pattern I like best can be tested by:

  • Developing an orchestration test harness that picks up the messge "as is"
  • Developing  the mappings for the splitting off of the single messages
  • Identifying which element under which node contains what will demarcate a single message. (e.g. social security number, beneficiary id, etc.)
  • Developing an xsl map isolating only the unique identifiers
  • Creating a new map, with a scripting functoid--under the properties,choose the inline xsl template. Cut and paste the xsl you created earler and dump it in.
  • Cycling through the unique identifiers by looking at the xpath info while iterating within a loop shape.
  • Adding an expression shape to build the single messages
  • Outputting the resultant single messages to a send port

Matt Meleski has a very good example of how to actually implement this pattern using a map and an orchestration.

http://objectsharp.com/cs/blogs/matt/archive/2005/04/12/1703.aspx

Of course, I may like this pattern best because Matt has done such an exemplary job sharing his implementation!

Darren Jefford also has a way cool pattern for splitting messages which relies on the schema element of the envelope and you guessed it... xpath!    .  Check out his blog:

http://blogs.msdn.com/darrenj/archive/2004/08/30/222614.aspx

 

 

 

 

What is a "jar" file?


Simply, JAR stands for Java ARchive. It's like a ZIP (Windows) or TAR (Unix/Linux) file with multiple other files contained within it. So, in the case of the *.jar files--what you're compressing are classes that your application/framework needs.

...now...that was the very short version... if you're looking for a much richer explanation...
jump over to Behrouz Fallahi's page... (http://www.devx.com/tips/Tip/13397)  

What is "Hungarian Notation" ?

During the heyday of Microsoft's Visual C++ development (read: late 80's - early 90's) this naming convention was talked about a lot. In essence the naming convention prefixes each variable name with letters that denote the data type + a shortened description name -- with each word of the description beginning with a capital letter. Let's say you needed to create a variable that would contain the string value of a book title. You might choose a name like: strBookTitle or maybe just strTitle.

Today, there's a whole lot less talk about the convention--mainly because new standards derived from the Java world and from the .NET world have eclipsed it. However, if for some reason you find yourself delving into a legacy code conversion project written in VC++, you will undoubtedly find yourself immersed in Hungarian Notation!:-)

I almost forgot the key as to why the naming convention is called "Hungarian Notation".  The reason is Hungarian born Dr. Charles Simonyi of Microsoft invented it!:-) As an aside, he was a tourist in space on board Soyuz TMA-10 -- arriving @the International Space Station (ISS) in April, 2007. How cool is that?   

For the record, here's a list of the notation's prefixes:

  • by - byte
  • c - character (single)
  • d - double
  • dw - DWORD (unsigned long)
  • fn - function pointer
  • g_ - global type
  • h - handle
  • hdc - handle to a windows device context
  • hwnd - windows handle
  • i - integer
  • I - interface
  • l - long
  • lp - long pointer
  • lpstr - long pointer to a string
  • m_ - class member
  • n - number or integer
  • p - pointer
  • str - string
  • sz - pointer to 1st character of a "0" terminated string
  • ui - unsigned integer
  • v - void
  • w - WORD  (unsigned short)
  • X - Nested class
  • x - instantiation of a nested class

Why do I get: System.Byte[] for a String?

There are several circumstances which will display this output (or exception in some cases) in .NET, however the primary reason is because there is a mismatch between the expected format and the casting taking place in your application.  An example would be attributes which are bound to LDAP that do not readily cast to string.

Here is a quick solution (that has its roots in vc++) for successfully casting this datatype to string:

byte[] myByteArray = (byte[])result.Properties["memberOf"][counter];
string myString = "";
foreach (byte b in myByteArray)
{
    char singleChar = Convert.ToChar(b);
    myString += singleChar.ToString();
}

I just received some feedback from Joe. He was kind enough to offer alternative code:

                  byte [] bytes = Encoding.ASCII.GetBytes("This is a test");
                  String s = Encoding.ASCII.GetString(bytes);

«September»
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011