Problem, wrapping the ASP.NET project incl. N2 in a default.htm

Topics: Developer Forum, Project Management Forum, User Forum
Apr 10, 2012 at 6:26 PM

Hi all,

hope anyone has an Idea what to do - my problem is as follows:

With an earlier version of N2 I created a website starting form a normal default.htm file containing an iFrame element working as the display area for the pages, created within the NS CMS wich I called via simple links targeting the iFrame. This worked fine all the time.

Now I have created another website project with the same concept but using the actual N2 version 2.2.1 and with another hosting provider. The web.config files are nearly the same except the connection string, some few changes concerning the N2 version changes and the fact, that the new provider uses IIS 7.5 while the earlier provider used IIS 6. The defaultdocument in both web.config files points to the only entry "default.htm".

After uploading the new project to the website and visiting it with a browser, the startpage from N2 is displayed (instead of default.htm). I figured out that default.htm will be only displayed if I remove the line

                   <add name="n2.initializer" type="N2.Web.InitializerModule, N2" />

from the <modules> section in the web.config file, but this disables N2 completely so that I can't refer to any of the N2-created pages. Seems N2 captures the web requests completely and ignores the default.htm.

Is this concept not longer supported by current N2 CMS or is there any option to toggle this behaviour?

Regards,
Gotan

Coordinator
Apr 11, 2012 at 8:15 AM

Try this config switch:

<host> <web ignoreExistingFiles="false" /> </host>

Apr 11, 2012 at 6:50 PM

Thanks again libardo - that did the trick!

But now there's a new problem: opening the website from a browser now correctly shows the default.htm that contains a link to the first CMS page (startpage). Clicking the link always shows a message, that the ressource /start,aspx couldn't be found (same if trying to access the startpage directly via url).

If I login to the CMS I can see and edit that page without any errors. The URI name of that page is "start" and the web.config contains an attribute that makes "aspx" the default file extension:

    <host rootID="1" startPageID="2">
      <web extension=".aspx" ignoreExistingFiles="false" />
    </host>

If I remove the  attribue

     ignoreExistingFiles="false"

the website starts with the start page instead of default.htm - so what is going wrong when the website starts with the html page?

Regards,
Frank

Coordinator
Apr 11, 2012 at 9:46 PM

Could you create another page named start below your start page?

Apr 11, 2012 at 10:47 PM

Yes I can...and there the extension aspx is shown but not at the start page above.

What is my problem?

Coordinator
Apr 12, 2012 at 8:17 AM

I think the problem is that you expect the startpage to appear on /start.aspx while N2 only servers it from / (and possibly /default.aspx). I suggested that you leave the startpage blank and put your startpage content in another page /start.aspx which you reference from the frame. Why are you using frames by the way?

Apr 12, 2012 at 4:50 PM

Hmmm...I tried to change the link to Default.aspx instead of start.aspx - doesn't work either (shows an error message to turn on custom error messages to see details).

Why frames? Well....I created the website last year in pure HTML. This year we ported the site to a new hosting provider and I thought it would be a good idea to add CMS for easier changes to the the simple contents. But the site shall start with an intro page where user may change the language and that plays a sound. After choosing the language, the visitor will see the contents and sound can be stopped/restarted here only (the sound shouldn't stop/start everytime, the visitor goes to a new page). Also the site contains a freeware image gallery that is driven by javascript and the displayed images shall cover the whole display space (not only the current page from where it is started). It seemed a lot of work to me, porting all this to ASP.NET so I decided to make it simple and integrate the CMS pages only in a frame that replaces the former static page contents.