Access Denied (0X80070005) when installing/deploying Orchard Cms to hosting that uses Plesk

After having worked several years with wordpress, I am really thinking about moving to another blogging engine. Up until now, I didn’t find anything that interesting, but I heard a lot of positive stories on orchard CMS. Therefore I tried it out on my machine, by installing it with web platform installer.  It worked great and showed me a lot of potential, therefore I decided it to test if it worked on my Hosting, which is working with the Plesk control panel.

The procedure that I used to upload the engine to my hosting is the easiest on the book (FTP). Now, when I did this for wordpress, everything worked at once and a setup was started, unfortunately this was not the case for Orchard CMS. As you can see below, the following error manifested itself and gave problems. (I had to turn off custom errors to get to the actual error that is shown)

image

The most important part is the title and this part:

HibernateException: Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework, Version=1.3.10.0, Culture=neutral, PublicKeyToken=null.]

It was obvious that this error was due to permissions that were not granted correctly, so this helped me to limit the scope a little. After some poking, I found here that it is due to Plesk Control Panel not giving enough privileges to some directories in the Orchard CMS  solution.

After giving Read and Execute rights on the bin directory (and its kiddo’s) to the “Plesk IIS WP User”  everything worked fine and I was good to go.

Have fun exploring

Free Windows Phone E-Book

If you  are interested in doing something with windows phone development:

I found a free a-book that was released a little over 2 weeks ago that covers all that you need to know to get started with windows phone development.

http://www.windowsphonegeek.com/WPToolkitBook2nd

It covers a wide variety of controls, that are available in the windows phone toolkit, this combined with decent examples. To get you up and running even faster, the source code is also available as a download from the same website.

Have Fun!

Starting PowerShell in the current directory

Suppose that you are using windows explorer to manipulate some files, but at some point feel the need to extend your actions into PowerShell. I have encountered this situation a lot lately and I was looking for a way to get to the same location in PowerShell without having to “cd” myself to the correct location.

In windows, you can extend your context menu by holding the shift button. It will for example add the possibility to open the command prompt on the same location. As this is rather useful, I was looking for the same for PowerShell…

At first I thought, let’s change the registry, to add the item manually But since I work on a lot of different machines, that is not really a flexible solution. After looking around a bit on the net, I found out you can open PowerShell in the current directory by typing “PowerShell” in the address bar.

image

After hitting enter, PowerShell opens up in the correct directory and is at your disposal…

Have Fun!

EDIT: this also applies if you want to open a cmd window instead of a PowerShell one: just type cmd instead of PowerShell

Get access to your event log through PowerShell

Do you know the feeling that something crashes, but that you do not have the time to wait for the event viewer to open up and to find out about the problem?

For the last few weeks, I have been in exactly that situation. Because I have PowerShell opened most of the time, I hoped to find a fast solution in that through that “window”

Suppose you want to find out about the errors your application log has available, you just have to type

Get-eventLog –LogName application

The problem is that it will list all the entries it has available, therefore it is better to add an indication of the number of items that you want to see:

Get-eventLog –LogName application –Newest 10

This gives you the 10 most recent entries in the list. If you only want to know about the error messages in the list, you can add something about that too:

Get-EventLog -LogName application -Newest 10  -EntryType error

This list is not that informative since most interesting info is cropped, therefore I advise you to add some formatting to the output. That is something that you can do with a pipe to a format operator and the result will look like this:

Get-EventLog -LogName application -Newest 10  -EntryType error | Format-List *

As you can see, there are plenty of options, but what is more important, you can use this to get a fast look at issues without having to wait for the  UI. Another benefit is that you can use this for example to extract fast info of multiple systems to check that no issues exist in the application that you are creating

WordPress: Double index.php in a page link

Today, I discovered the fact that some url’s in my blog contained double “index.php” segments

image

The result was that the location it referred to, was not existing and several parts of my blog were inaccessible:

image

This meant that somewhere, something went wrong. I could have taken the time to find it out, but chose to come up with a remedy. I decided to replace the double index.php, with a single one. It would save me some time that I could spend on other things…

Somewhere in the “wp_includes” directory of wordpress, you will find a file named “formatting.php”. It contains a function “esc_url” that cleans up any url that will be used in a page. Adding a line that “cleans up the double “index.php” solves the problem

    $url = str_replace(‘index.php/Index.php’,'index.php’,$url);

The result is a correct link:

image

PowerShell ISE

For those that are working with PowerShell, there is some feature that ships with windows that you MUST use when working with PowerShell. It is called PowerShell ISE and gives you the ability to work on scripts and to execute them directly from within the same window.

image

At this point, I do not have to work with PowerShell on a regular basis, but  towards the future, that will change and at that moment I will be very happy that I have such a tool at my disposal.

If you want it too, There are 3 ways to get it:

1. For users of windows 7: It is included in the installation, just type PowerShell in the start menu and you should have it at your disposal

2. it ships as a feature with  Windows Server 2008 R2. You have to activate the feature though through the add/remove features pane in windows:

Hit start, type “Turn Windows features on or off” and it should be in the control panel section in the list:

image

When you open it, you will have a menu where you will find “Windows PowerShell Integrated Scripting Environment (ISE).” Somewhere in the list, check it and click OK

3. For other installations of windows: there is a download available here

File cannot be loaded because the execution of scripts is disabled on this system error in PowerShell

This morning, I tried to run a self-made PowerShell script on my windows 7 machine, I ran into an error which is described in the title.

image

This is apparently a default setting that helps you and your machine against unknown variables. (scammers et al.) You will not be able to run any script.If you are sure that you need  this, you can change the setting with a simple command, but first let me tell you something about the possibilities:

There are 4 levels:

1. Restricted: You will not be able to run a script at all
2. All Signed: Only a signed script (made locally or on another machine)
3. Remote signed: You trust what you write yourself, but still have problems with scripts from out in the open … (Your best option if you are experimenting) (Still have to be careful though, I do not know what you are experimenting with)
4. Unrestricted: What are you thinking, this is exactly what they (Microsoft) want to save you from! Don’t use this unless there is a real urgent and well chosen reason for it. + It is best that you know what you execute!

To change the Execution Policy to Remote Signed, (to run your own scripts):

Set-ExecutionPolicy RemoteSigned

To change the Execution Policy to Unrestricted, type the following command in Powershell

Set-ExecutionPolicy Unrestricted

Happy scripting!

Bing Local Scout on Mango

Yesterday I saw some screens of something new in the latest release of windows phone Mango that I didn’t know of it even existed. (The chances that I ignored are realistic though) It is called Bing Local Scout and at first I could not find it on my phone, as I do not live in the US… After some searching, I discovered what you have to do to get it working. I will explain that later, bit first give you a quick explanation of what it really is, like that you can decide on whether you are willing to do the required steps…

Bong local scout basically integrates an extensive search functionality of local events/places/etc. into your Windows phone maps functionality. In maps you will have an extra icon in the bottom that will do the necessary searches for you when clicked. The only requirement is that your phone is able to determine a location. The screen below (which I found on the Microsoft website) gives you an idea of what it does:

Picture of Local Scout

If you are intrigued and want it on your own phone, the only thing you have to do is to change the search language in your browser to English(United states) (Phone Settings > Region + language > Browser & search language (at the bottom). Your search results will be in English, but for me it is not really an issue. I hope it isn’t either for you.

When that is done, navigate to maps and you will find the extra button at the bottom, click it and you will be good to go…(make sure your GPS is turned on)

Installing WP7.5 on a Samsung Omnia that gives error 80004005 during update

A colleague of mine has a gotten himself recently a samsung omnia. He has gotten the notification that an update was available (Mango), but for some reason it allways failed in the last step with the error code that is mentioned in the title. Fortunately, I could take some time to figure it out and got the solution that can be found below…

The problem can basically be described as a firmware issue. Samsung made apparently a modification to the firmware and this causes the update to fail. If you are in the same situation, please take the following steps to get your update. Be aware that you will have to back-up your data as it will all be gone…

1. Download Samsung USB Driver (Windows 7 can’t find it for me) and install it.
http://mirror.batteryboss.org/SAMSUNG_USB_Driver_for_Mobile_Phones.exe

2. The firmware that you need, added with the flashing tool can be found on the XDA-dev forums: http://forum.xda-developers.com/showthread.php?t=973420

2. follow the steps that are described there, they are best in accordance with the current version of the tool…( I can give you screens of what I saw, but that won’t help you at all.)

3. After that is done, you should be having an empty phone, nothing on it but the OS with build 7004.

4. you will be getting the Getting Started screen. Now if you check settings you will see OS version is 7004. And now follow the regular update process.( it is important to set the time correctly, if you don’t the update process won’t even start.

5. as of that point you should be able to start updating your phone to the latest version. A force might be required. If you don’t know how to do that, please take a look at my earlier post

Have Fun!

Printing an A1 (big) document on a set of A4(small) pages

Suppose you want to print a big page on a set of A4’s (because you for example don’t have a plotter (rather expensive))

Then there is a way to do so, open the document, and open the print dialog. and do the following in the page handling section: set page scaling to “tile large pages” or ”tile pages” and you should be ready to go.

image

Have Fun!

T