Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Tobias Nilsson
Jan 21, 2011
(1 votes)

Initialize Community 4.0 without IIS


Sometimes you want to initialize EPiServer Community without involving the IIS.  For example when you decide not to use IIS for servicing your web pages or when you want to do unit testing.

Command line program

I've therefore created a little command line program that does this. It initializes Community (and also search) and fetches the first blog post made (ID = 1). You can then use this code as a base for doing your own programs that need access to the Community API.

To use it just compile it and place it amongs a web.config (for a community site) and a connectionstrings.config along with every dll the web.config wants plus the dll's the project needs.





Thanks to Kristoffer @ dev for giving me the inspiration and the file this program was heavily based on!

Jan 21, 2011


Vincent van Ederen
Vincent van Ederen Jan 21, 2011 07:51 PM

Thank you Thomas, this was exactly what I was looking for!

Jarle Friestad
Jarle Friestad Jan 21, 2011 10:30 PM

Very cool Tobias. ;-) This is a much smoother way than the hack including reflection that was needed in Community 3.x.

Jan 24, 2011 04:24 AM

Nice post Tobias!

Jarle Friestad
Jarle Friestad Jan 24, 2011 02:31 PM

This code seems only to handle single site installations. It crashes when Initialize(null) is called on SiteMappingConfiguration if episerver.config contains multiple sites. To solve this i just changed the following

new SiteMappingConfiguration().Initialize(null);
SiteMappingConfiguration.Instance.SiteId = "MyRelateSite";

SiteMappingConfiguration.CurrentHostNameResolver = delegate { return ""; };
new SiteMappingConfiguration().Initialize(null);

Please login to comment.
Latest blogs
Update related content

In this article, I will show simple code that allow to replace linked content with other content selected by the Editor. When deleting content whos...

Grzegorz Wiecheć | Dec 8, 2023 | Syndicated blog

Getting Started with Optimizely SaaS Core and Next.js Integration: Content Areas and Blocks

The blog guide elaborates on improving content rendering by exploring content areas and blocks within the Optimizely CMS. It walks through setting ...

Francisco Quintanilla | Dec 8, 2023 | Syndicated blog

Maximize performance by uploading your external data to Optimizely Graph

Learn to integrate external data into Optimizely Graph for improved performance, covering data preparation, synchronization, and effective querying.

Surjit Bharath | Dec 6, 2023 | Syndicated blog

Google Read Aloud Reload Problems

Inclusive web experiences greatly benefit from accessibility features such as Google Read Aloud. This tool, which converts text into speech, enable...

Luc Gosso (MVP) | Dec 4, 2023 | Syndicated blog