Site migration from IIS 6 to IIS 7.5: controls render differently?

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
11/19/2010 3:15:09 PM
Gravatar
Total Posts 12

Site migration from IIS 6 to IIS 7.5: controls render differently?

Hi,

I have a mojoPortal 2.3.5.3 site running on Windows Server 2003 R2. I am setting up a new Windows Server 2008 R2 server. Because mojoPortal is running as an application under the root site, I have to run mojoPortal in ASP.NET v4 Integrated mode (the main site requires it).

It seems that under these conditions, some controls render differently. The biggest issue is that the SiteMenu control seems to render a <div> tag with style clear: left. That is a problem for my site design, as I also have a mojoMenu control that precedes the SiteMenu. The extra <div> tag causes the SiteMenu to be below the mojoMenu instead of besides it.

Here is my layout.Master markup:

<portal:mojoMenu ID="mojoMenu1" runat="server" Orientation="Horizontal">
<Items>
<asp:MenuItem Text="Home" NavigateUrl=http://www.somewhere.com target="_blank" />
<asp:MenuItem Text="Mobile" NavigateUrl="http://m.somewhere.com" />
</Items>
</portal:mojoMenu>
<portal:SiteMenu TopLevelOnly="true" ID="SiteMenu1" runat="server" UseTreeView="false" Direction="Horizontal" />

This is the resulting HTML when run under Windows Server 2008 R2:

<div class="AspNet-Menu-Horizontal" id="ctl01_mojoMenu1">
<ul class="AspNet-Menu">
<li class="AspNet-Menu-Leaf">
<a href="http://www.somewhere.com" class="AspNet-Menu" onclick="window.open(this.href, '_blank', ''); return false;" onkeypress="window.open(this.href, '_blank', ''); return false;">
Home</a>
</li>
<li class="AspNet-Menu-Leaf">
<a href="http://m.somewhere.com" class="AspNet-Menu">
SCOB Main</a>
</li>
</ul>

</div>
 

<div class="AspNet-Menu-Horizontal" id="ctl01_SiteMenu1_ctl00">
<ul class="AspNet-Menu">
<li class="AspNet-Menu-Leaf AspNet-Menu-SelectedLeaf">
<a href="/Portal/portal-main.aspx" class="AspNet-Menu AspNet-Menu-SelectedLeaf">
Portal Main</a>
</li>
...

Any ideas?

Thanks in advance,

SA.

11/19/2010 3:16:23 PM
Gravatar
Total Posts 12

Re: Site migration from IIS 6 to IIS 7.5: controls render differently?

Never mind this, my description of how the controls render is not accurate. By setting controlRenderingCompatibility to 3.5 in web.config, some issues are resolved, but others are still there. I need to figure out what the exact cause is first.

SA.

11/20/2010 7:30:18 AM
Gravatar
Total Posts 18439

Re: Site migration from IIS 6 to IIS 7.5: controls render differently?

Hi,

Since you are now hosted under .NET 4, you should upgrade to the latest version mojoPortal and use the package that is compiled for .NET 4, currently mojoportal-2-3-5-5-mssql-net40-deploymentfiles.zip

There are also some differences in the asp.net menu under .NET 4 that may require some tweaks to your skin as discussed in this forum thread.

Best,

Joe

12/3/2010 4:56:34 PM
Gravatar
Total Posts 12

Re: Site migration from IIS 6 to IIS 7.5: controls render differently?

Joe,

Thanks. Firefox renders fine, so...

I found out it must have something to do with the IIS settings: there is no appreciable difference between the HTML or headers sent to the browser in my old server or my new server. (I use a compare tool, the only difference in the HTML are the hyperlinks. Fiddler doesn't show any headers that would affect rendering).

IE8 renders the site in IE 7 emulation mode for some reason. I can't figure out why though. I checked any custom headers in web.config (all the way up to the machine level), in IIS manager and the DOCTYPE. When using the IE 8 developer tools and forcing the browser in IE 8 standards mode, the site renders fine.

So the real problem is, I can't figure why IE 8 is using IE 7 standards mode. It's not just mojoPortal, it's all my sites on that server, but mojoPortal is the only site that doesn't render correctly.

I worked around the problem for now by adding a custom HTTP header on the Portal application X-UA-Compatible: IE=Edge.

SA.

12/4/2010 7:29:45 AM
Gravatar
Total Posts 18439

Re: Site migration from IIS 6 to IIS 7.5: controls render differently?

You can control this from meta elements in the head in the layout.master file of your skin, probably there is already something there that makes it render as IE7 compatible.

http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.