Rizo's

Tag: Episerver

Workaround for = EPiServer:Property renders an extra Div

by on feb.27, 2009, under Developing

It’s comfortable to just use properties directly in the page. i.e
[sourcecode language=’html’]

[/sourcecode]
Problem with this, is that it will render an extra div which feels really unnecessary. I’ve tried to look around for a setting of some sort to turn this off but not wanting to waste too much of my time, I just did a simple workaround. Well I didn’t do a workaround, I just render my text in another way.

Front:
[sourcecode language=’html’]

[/sourcecode]
Back:
[sourcecode language=’vb’]
txtMainBody.Text = CurrentPage.Property(”MainBody”);
[/sourcecode]
This will render out exactly whats in MainBody and nothing extra.
Remember to check for nulls 😉

26 Comments :, more...

ClassFactoryException: ClassFactory not initialized After EPiServer 5 Migration

by on feb.11, 2009, under Developing

This is a common error to get after migration to EPiServer 5 and happens when you do the migration itself on a machine running IIS7, because the migration will make your web.config configured for IIS7, then when you take it to your developing machine that is running IIS6 you’ll get this error. What you need to do is take away the IIS7 settings and implement the IIS6 ones. Biggest difference is that IIS6 uses <system.web>(Integrated mode)  and IIS6 uses <system.webserver>(Classic mode).

IIS6 Example:

[sourcecode language=’xml’]








[/sourcecode]

IIS7 example

[sourcecode language=’xml’]








[/sourcecode]

The examples are taken from the EPiServer documentation and you can read more about this issue there.

Easy fix:

Easiest way for you to fix this is to simply install a new EPiServer 5 solution on your machine that is running IIS6, copy the web.config and add your specific changes to that web.config.

49 Comments :, more...

Episerver Migration 4.62 to CMS5 r2 on SQL Server 2008

by on feb.06, 2009, under Developing

I wish that I had great things to say regarding running a migration using SQL Server 2008 but I don’t.

Strike One: I couldn’t run a simple EPiServer CMS5 installation to the sql server. I kept getting this error:

Error – User ’dbo’ does not have permission to run DBCC TRACEON

After some searching I came to the conclussion that the only thing one could do to override this is to give my user sysadmin rights. Something that not many customers fancy giving away.  But it did actually work and the insallation was successful.

Strike Two: With a fresh epi5 site installed and my original site upgraded to 4.62b and ready to rock, I started to run the migration tool. The Result? ”Migrating Data…” And nothing else. It didn’t really start the job and just died there. I even gaved it 12 hours (over the night) and nothing happened. I still had sysadmin rights so that wasn’t it.

Strike Three: With not much patience left I tried to do a workaround, i.e to backup the Databases and restored them on a 2005 machine, then do the migration and then back to the 2008 machine. The problem is that SQL Server doesn’t have backward compatibility 🙁

So basicly I’m going to reproduce everything on the 2005 machine and work from that one. Once done, I’ll do a backup and then restore that to the sql server 2008 and have the final product running on that one. Not the best solution.

I’ve a case open @ EPiServer and who knows, maybe they have a solution for this. I’ll be sure to post it once I get it.

*EDIT*
Well, once I was doing all the work on the SQL Server 2005 machine, I encountered an error doing the migration itself. It was complaining about DTC transactions. Then it hit me, that the same thing might be whats wrong with the migration to the SQL Server2008. So I added the following settings and voilá! it worked!

I did notice that they had info about this on their Migration tool info page but the error itself never came up when doing the migration, except when I tried to run it against SQL Server 2005.

Hope this helps someone out 😛

24 Comments :, , , more...

Episerver Convert Form to Xform error

by on feb.05, 2009, under Developing

while upgrading to CMS5 you need to convert your Forms to XForms. But trying to do so, I encountered an error. It dies a bit after  the EPiServer.Admin.ConvertFormToXform.ConvertForm2Xform method and its during System.Xml.XmlTextReaderImpl.ParseQName. The problem was that some of the fields started off with an integer. That is ”1. question” and so on. Simply changing the names of the fields to something else like ”Question 1” was enough to make it work.

Not the prettiest fix, but it will do the job

21 Comments :, more...

Failed to register ASP.NET client scripts on this site. Episerver upgrade

by on feb.03, 2009, under Developing

The error named on the heading might look something like this:

aspnet_fail1

And you’ll get it when you try to upgrade any kind of Episerver 4.x to 4.62b which is most likely to be done due an upgrade to Episerver CMS5.

Anyway, this error will appear because the installer can’t find the right .net framework that is installed in the machine. I’m sure that there are plenty of fix for this, but the easiest and fastest of them is to simply remove the 3.0 and 3.5 folders from the framework folder (most likely to be C:WINDOWSMicrosoft.NETFramework). Just drag them to the Desktop or something. Then run the Upgrade again and Voilá! Just remember to put the 3.0 and 3.5 folders back in the framework folder.

24 Comments :, , more...

User Migration From EPiServer 4.x to CMS5(R2)

by on jan.21, 2009, under Developing

The new version of EPiServers migration tool is supposed to support user personalization migration to the new enviroment. The good news is that it does migrate all users and generates a new password. The bad news is that it forgets which pages they subscribed too and the interval.

On this project, we also use SubscriptionCategories which basicly sends a newsletter everytime a page is created under that category which of course didn’t get migrated to the new enviroment.

What you need to know is open up a connection to the old database and fill up a datatable with info from tblUserProperty, tblSID and tblUser. You need to bring up the username, email (we use the email as username for all subscribers), interval, categories and which pages they subscribe too. I had to make three different queries to bring up what I needed though, one for the categories, one for the interval and one for the pages. I’m sure that an SQL genius can make it in one call.

Once you’ve filled up your datatable, bind it to a repeater and just print it all out. Might be nice to see it work before you do a full migration atempt. Once in the repeater, I call for the method I made to update the subscription information.

[sourcecode language=’csharp’]
private void UpdateUserSubscription(string user, int page, string categories)
{
EPiServerProfile profile = EPiServerProfile.Get(user);
profile[”SubscribeCategories”] = categories;
profile.SubscriptionInfo.Interval = CheckUserInterval(user);
profile.SubscriptionInfo.SubscribeTo(new PageReference(page));
profile.Save();
}

[/sourcecode]

Basicly, you need to load up the profile you wish to alter and then fill it up with whatever information you need. SubscribeCategories is the custom part of our subscription and the rest is interval and page to subscribe to. Just dont forget to save your profile, otherwise it wont save it to the database. The only time you don’t need to save the profile is if you’re altering the currentuser which is logged in. Then you can call on the methods you like and they will work without save. But when altering users that are not logged in, you’ll always need to save.

20 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!