Use Fiddler to monitor IIS request

by Viktor 11. November 2010 10:40

I often use Fiddler to debug or just see what is sent between the browser and server but today I needed a tool to see what EPiServer sent to a remote site and received back.
After an hour of searching and not finding anything I liked I come upon a blog post (using-fiddler-with-iis) that solved everything for me, just set the application pool to run as your user and all requests from your code to external servers will show up in Fiddler!

Tags: , ,

blog comments powered by Disqus

Move content to another language in EPiServer

by Viktor 1. November 2010 10:25

In the latest project I was involved in we created a site that would be in Norwegian, during the development we did all texts in English and as the site would not be globalized we did no changes in in EPiServer, just a standard installation. When we then received the Norwegian translations we noticed that we had made the site for the English language branch and was not able to get the Norwegian translations to show up on the site.

With the help of this blog post, http://andrewgunn.blogspot.com/2008/01/change-page-language-in-episerver.html, we ware able to solve the problem.
The first thing we did was enable Norwegian in Admin mode.
Then we ran the following SQL script in the EPiServer database,

DECLARE @PageID INT
DECLARE @RowNum INT 
DECLARE PageList CURSOR FOR
	SELECT pkID FROM tblPage
OPEN PageList
FETCH NEXT FROM PageList INTO @PageID
WHILE @@FETCH_STATUS = 0
BEGIN
	DECLARE @OriginalLanguageBranchID INT
	DECLARE @NewLanguageBranchID INT
	DECLARE @NewLanguageID NVARCHAR(3)
		 
	SET @OriginalLanguageBranchID = Y
	SET @NewLanguageBranchID = Z
	SET @NewLanguageID = 'NO'
		 
	UPDATE tblPageLanguage
	SET fkLanguageBranchID = @NewLanguageBranchID, fkLanguageID = @NewLanguageID
	WHERE fkPageID = @PageID
		 
	UPDATE tblPage
	SET fkMasterLanguageBranchID = @NewLanguageBranchID, fkLanguageID = @NewLanguageID
	WHERE pkID = @PageID 
		 
	UPDATE tblProperty
	SET fkLanguageBranchID = @NewLanguageBranchID
	WHERE fkPageID = @PageID and fkLanguageBranchID = @OriginalLanguageBranchID
		 
	EXEC editPageVersionList @PageID = @PageID, @SID = NULL

	FETCH NEXT FROM PageList INTO @PageID
END
CLOSE PageList
DEALLOCATE PageList
The importent parts here are
SET @OriginalLanguageBranchID = Y
SET @NewLanguageBranchID = Z
SET @NewLanguageID = 'NO'

Here you set the id of the language you want to change from, the id of the language you want to change to and the new language id, in this case 'NO'.
Run this script in your EPiServer database to move all content from the old language to the new language.
All information you need can be found in the table tblLanguageBranch,

SELECT pkID, LanguageID FROM tblLanguageBranch

When this is done you will get a warning in EPiServer telling you that the page is not available in your current language, to into Admin mode and turn on Globalization, in the edit mode select the root page and language options for this page, change the default language to your new language, turn off Globalaization.

Finished! The site had now been transformed from a English site to a Norwegian one.

Tags: ,

Development

blog comments powered by Disqus

Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 2.5 Sweden License.


Welcome to the Dropit blog!

Here we, the people that work at Dropit, will write about stuff that interests us. For example web development, especially with .NET and EPiServer - but we'll also talk about other techniques that interest us, marketing on the web, social phenomenons, pop culture, games and software development in general.