Rizo's

Author Archive

Visual Studio 2008 System Runtime InteropServices COMException

by on sep.07, 2009, under Developing

I had to make a clean Vista install on my machine and all of a sudden I was getting System.Runtime.InteropServices.COMException when opening old solutions. The error says very little to the user but what it really want’s to say is:

Install IIS 6 WMI Compatibility by going to Control Panel, Programs, Turn windows features on and off and select as the picture below showswindowsfeatures

15 Comments : more...

Boot camp 2.1 wont install

by on sep.02, 2009, under Applications

I’ve been working with VMWare running WinXP for a year now but now it’s feeling a bit too slow so I’ve decided to run vista native on my macbook pro.  (will upgrade to vista7 later on).

First problem was that Boot Camp assistant couldn’t create a partition for windows since it couldn’t move some of the files. The ”best” solution seems to be to run time machine and recover. That way it will defrag the harddrive and let you create the partition.

Second problem was the drivers. I’ve installed Vista SP2 and boot camp2.0 didn’t really work as intended. Neither the trackpad nor fn button was working properly, so I had to install 2.1 as soon as possible. Problem is that the installation just pops up and nothing happens.

I’ve runned into two solutions for this problem.

One:

Try the following:

1) run: regedit.exe

2) search for: Boot Camp Services
the key should be: ProductName

3) change in the same path, the Language key to: 1033

4) run the installer again

I didn’t really try this one out at though but most people say it works.

Second way:

Change your region to English(US)
Uninstall Boot camp 2.0
Restart
Install Boot camp 2.0
Restart
Install Boot camp 2.1

Yes, it’s annoying. Yes, it takes time. But now it’s done and finally I’m running Boot camp 2.1. (restarting as I’m typing this). Just hope that trackpad and fn key will work now 😛

6 Comments :, , more...

EPiServer CMS5 Softlinks. How to find a documents linking pages

by on jun.25, 2009, under Developing

Using EPiServers softlink can really come in handy in different situations.  Mostly of course when you need to gather information from the linked pages of a document.

Here’s an example on how to use this:

Example in VB.Net

[sourcecode language=’vb.net’]

Dim f As EPiServer.Web.Hosting.UnifiedFile = TryCast(System.Web.Hosting.HostingEnvironment.VirtualPathProvider.GetFile(filename), EPiServer.Web.Hosting.UnifiedFile)

Dim filecollection As EPiServer.DataAbstraction.SoftLinkCollection = EPiServer.DataAbstraction.SoftLink.Load(f)

For Each file As EPiServer.DataAbstraction.SoftLink In filecollection
Dim ref As New PageReference
ref = file.OwnerPageLink
’now you can work your magic
Next

[/sourcecode]

Example in C#:

[sourcecode language=’c#’]

EPiServer.Web.Hosting.UnifiedFile f = System.Web.Hosting.HostingEnvironment.VirtualPathProvider.GetFile(filename) as EPiServer.Web.Hosting.UnifiedFile;

EPiServer.DataAbstraction.SoftLinkCollection filecollection = EPiServer.DataAbstraction.SoftLink.Load(f);

foreach (EPiServer.DataAbstraction.SoftLink file in filecollection) {
PageReference ref = new PageReference();
ref = file.OwnerPageLink;
//now you can work your magic
}

[/sourcecode]

So what you need to do is pretty much to load up the file reference into a softlink and fill a softlinkcollection with that. Then just run a for each on the collection (since a document can have several linking pages). Once you get your reference, you can just do a getpage on the ref and grab whatever you need from the linking page.

3 Comments :, , more...

EPiServer CMS5 Categories Dissapearing when saving

by on jun.05, 2009, under Uncategorized

One of our customers found a little annoying bug when publishing news to their page.

The bug goes as following:

News page type contains a few categories as well as an extra date field to point out the news date (in case you don’t want to use the publishing date and want to use your own) and it’s required as well.

You forget to fill out the news date,  but fill everything else up, including choosing which categories the news should belong too and then hit Save and Publish.

EPiServer will do a postback and warn you about not filling in the news date. If you at this moment check the categories, you’ll see that they are still clicked in, you fill in the date and hit save and publish once more.

The news will be posted but without the categories as EPiServer will lose the values on the postback but still show them as checked.

This is a verified bug from EPiServer and hopefully to be fixed in an upcoming version.

10 Comments :, , , more...

Justin Timberlake – SNL – Mother Lover, finally a watchable video

by on maj.28, 2009, under Fun

NBC and youtube aint best friends, that’s no suprise. After Youtube posted some NBC videos they deleted their youtube channels and you will find it hard to find any NBC videos on youtube. Quite a shame since its free commercial for NBC but that’s not the point with this post.

Have you watch ”Dick in a box”? if not, then click here and go watch it first. Justin and Adam went and made a second video and this one is as funny as it gets 🙂 Only problem is that it’s quite hard to find a watchable video since NBC is killing it on youtube and their site requires you to be a US citizen. But Sevenload has saved the day. So enjoy!

Link: Mother Lover Justin Timberlake-Saturday Night Live

8 Comments :, , more...

* % & : Special Characters in URL and files causing HTTP 400 Bad Request

by on maj.27, 2009, under Developing

One of our customers have a lot of PDF that are linked to their site. Some of these PDF files have % in the filename and this causes a HTTP 400 Bad Request and yes they are encoded correctly. The same error happened with other characters such &, * and :

Finally, the solution was found @ dirk.net with an article regarding 400 bad request in IIS7 (But IIS6 also has the same problem and the solution will work there too). You can read about it here.

12 Comments :, , more...

SQL converting datetime to shortdate

by on apr.20, 2009, under Developing

I’ve a table where I need to select the posts with the latest date. Problem is that when you get the latest date it also gets it by the hour, meaning that it will try to fetch everything older or equal to the date + time, which is nothing. There for, I need to make it a shortdate so I can fetch everything that was posted on that day.

The following code will set the variabel to the latest date on the table.
[sourcecode language=’sql’]
DECLARE @latestDate as datetime
SET @latestDate = (SELECT postDate from table where postDate = (Select max(postDate) from table))
[/sourcecode]
This will return Jan 20 2009 6:45PM

Then all I need to add to my SELECT is
[sourcecode language=’sql’]
CONVERT(VARCHAR(10), @latestDate, 101)
[/sourcecode]
This will return 01/20/2009

7 Comments : more...

Fifa09 Ultimate Team Search Engine

by on apr.17, 2009, under Gaming

Here’s a simple search engine to help you find players you need in Fifa09 Ultimate Team.
e.g if you need a right back that plays 4-4-2 but don’t really know which players that plays in that position, just make a search and you’ll get the name, team and nationality, which will make it easier for you to search within the Fifa09 Ultimate Team search by defining Gold, Position, Nationality and Team. Hopefully you’ll get the players you were searching for instead of a huge list to browse.

I will be filling the database sporadicly and if someone would like to help me, I would appreciate it. I’ve an admin page to fill the database up so all you need is your x360, a computer and time :)

At the moment there are players for:
Formation: 4-4-2

Enjoy!

http://www.from-rizo.se/fifa09-ultimate-team-search-engine/

4 Comments :, , more...

Tip of the day: Typography

by on apr.17, 2009, under Design

Sweet site that lets you search for fonts that fits your likeness. Could be a color or shape. Check it out

8 Comments : more...

IE7 CSS Background not showing

by on apr.15, 2009, under Design

Sometimes backgrounds will be visible using firefox but not IE7 which makes you wonder…. why?

The reason is pretty simple. CSS needs to be perfect for IE to understand them.

A perfect example would be.

[sourcecode lang=’css’]
body{

background:#fff url(picture.jpg)no-repeat;

}
[/sourcecode]

That piece of CSS will work on Firefox but not on IE7 (funny thing is that it MIGHT work on IE7 but it wont most of the time)

[sourcecode lang=’css’]
body{

Background-image:url(’image.jpg’);
Background-repeat:no-repeat;
Background-color:#fff;

}
[/sourcecode]

This will on the other hand work. As you can see, they have the same content, just a different layout.

You can of course put it in one row but make sure to have the right format, otherwise you’ll still have the same problem.

[sourcecode lang=’css’]
body{

background:#fff url(picture.jpg) no-repeat;

}
[/sourcecode]

As you can see, the only difference is the space between ”.jpg)” and ”no-repeat”

Try this page with both Firefox and IE7 and you’ll see that IE7 won’t show the background, but Firefox will.

24 Comments :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!