Solution: Service Unavailable after ASP.Net Publish

If you receive a “Service Unavailable” screen after publishing an ASP.Net web site, check the application pool assigned to the site. The pool you use needs to be assigned the right version of the .Net framework. For example, a .Net 2.0 site won’t work if the pool is using .Net 1.0.

Posted in .Net, ASP.Net | Leave a comment

Exception Passing DBNull.Value to a Varbinary Using Parameters.AddWithValue

In .Net it seems reasonable to try to pass a NULL to a SQL Server stored procedure using the following syntax (C#):

[sourcecode language=”csharp”]
myCommand.Parameters.AddWithValue(“@MyParameter”, DBNull.Value);
[/sourcecode]

Unfortunately, if the sproc is expecting a parameter of type Varbinary(max), the following exception will be thrown:

Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query.

This appears to be a bug in the .Net SqlDataAdapter.

The work-around is to be explicit about the type of data you are passing:

[sourcecode language=”csharp”]
myCommand.Parameters.Add(“@MyParameter”, SqlDbType.VarBinary, -1);
myCommand.Parameters[“@MyParameter”].Value = DBNull.Value;
[/sourcecode]

My thanks go to dnagelhout and Matt Neerincx for their invaluable posts on this subject.

Posted in C# | 1 Comment

BBC Micro High Scores!

Pengo 46330

Labyrinth 63870

Monsters 10620

Snapper 41820

Air Lift 70460

Zalaga 59490

Pole Position 56600

Nemesis 16290

Space Eagles 11880

Starship Command 889

Chucky Egg 235330

Snake (fast) 1016

Planetoid 115400

Mr EE 103100

Posted in BBC Micro, Retro Computing | 2 Comments

Three Distractions

There are three distractions that keep me from achieving the best of my potential.

The Desire for Possessions The Desire for Physical Pleasure The Desire for Power and Prestiege
(Pride)
Genesis 3 Pleasant to the eyes Good for food Desire to be wise
1 Jn 2:15-17 Lust of the eyes Lust of the flesh Pride of life
Matthew 13 Riches Pleasures Cares (using own power)
Matthew 4:13 Kingdoms of the World Stones to Bread Throw yourself down (you’re so important, God won’t let youu hurt yourself)
Ezekiel 16:49 fulness of bread abundance of idleness was in her and in her daughters … neither did she strengthen the hand of the poor and needy pride
Remedy Giving Fasting Prayer

Further Reading: Warfare on Three Fronts

http://www.wholeperson-counseling.org/addictions/warfare_3fronts.htmlWarfare on Three Fronts
Posted in Temptation | Leave a comment

Design Starters

Sometimes you need a theme for a web site, a game level or a poster. Here are a few ideas to get the juices flowing:

  • 80s Retro
  • Ancient Egypt
  • Animals
  • Aztec
  • Castles
  • City
  • Dinosaurs
  • Electric Pink
  • Garden
  • Monsters
  • Night Sky
  • Snow
  • Space
  • Steam Punk
  • Techno
  • Toys
  • Victorian
  • Wild West

For other ideas, think of a:

  • Country
  • Film
  • Hobby
  • Job
  • Sport
  • Type of music
Posted in Uncategorized | Tagged , , | Leave a comment

Connections

The 3 areas:

Up = God

In = Myself

Out = Others

Posted in Uncategorized | Leave a comment

Politeness

Two simple ideas:

  • Please = a sign of respect
  • Thank you = a sign of appreciation
Posted in Uncategorized | Leave a comment

Responsibility

Two thoughts:

  1. Not to take responsibility is to sign away any power to change. Respobsibility = emowerment.
  2. If everyone would sweep his own doorstep, the whole world will soon be clean.
Posted in Uncategorized | Leave a comment

ZSD: Timing for Pranyama Breathing

When I practiced Karate, I was taught the following timing for breathing excercises:

  • Meditation breaths / minute = 7.5 (naturally, breathing will be quicker during practice sessions)
  • Count 1 for in-breath, count 4 for out-breath
Posted in Uncategorized | Leave a comment

What Was That?

A dialog:

“What was that?”
“What was what?”
“That.”
“That what?”
“That noise.”
“What noise?”
“That noise back there.”
“Back where?”
“Where the noise was!”
“What do you think it was?”
“Would I be asking if I knew?”
“I don’t know, would you?”
“Why would l do that?”
“You always do things like what”
“Like what?”
“You know what! You just pretend you don ‘t.”
“I don’t know what you mean.”
“There you go again! Pretending you don’t know something just to make me look stupid!”
“How can that possibly make sense?”
“Whenever you ask me something it isn’t because you don’t know: it’s because you do know, but you want me to say that I don’t know.”
“You really think… Wait! There it was again!”
“What?”

Posted in Uncategorized | Leave a comment