New web.config entries caused me issues

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.
12/29/2011 12:00:09 PM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

New web.config entries caused me issues

Joe,

Last night I upgraded my mojoPortal instance to 2.3.7.6. After ftping the files up to the server I attempted to run Setup, but all I would get back is Internal Server Error. My host is Arvixe, so I logged into the control panel and did some digging and on the Web Site Properties page if was provided the following error:

Stack Trace: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Runtime.InteropServices.COMException: Filename: \\?\C:\HostingSpaces\xxxxxxxxx\doan.me\wwwroot\web.config
Line number: 1122
Error: Cannot add duplicate collection entry of type 'mimeMap' with unique key attribute 'fileExtension' set to '.mp4'

at Microsoft.Web.Administration.Interop.AppHostWritableAdminManager.GetAdminSection(String bstrSectionName, String bstrSectionPath)
at Microsoft.Web.Administration.Configuration.GetSectionInternal(ConfigurationSection section, String sectionPath, String locationPath)
at WebsitePanel.Providers.Web.MimeTypes.MimeTypesModuleService.GetMimeMaps(WebVirtualDirectory virtualDir)
at WebsitePanel.Providers.Web.IIs70.FillVirtualDirectoryRestFromIISObject(WebVirtualDirectory virtualDir)
at WebsitePanel.Providers.Web.IIs70.GetSite(String siteId)
at WebsitePanel.Server.WebServer.GetSite(String siteId)
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at WebsitePanel.Providers.Web.WebServer.GetSite(String siteId)
at WebsitePanel.EnterpriseServer.WebServerController.GetWebSite(Int32 siteItemId)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at WebsitePanel.EnterpriseServer.esWebServers.GetWebSite(Int32 siteItemId)
at WebsitePanel.Portal.WebSitesEditSite.BindWebSite()

So I went to the web.config and commented out line 1122: '<mimeMap fileExtension=".mp4" mimeType="video/mp4" />' and then tried to access my site again. Still got an internal server error and in the Control Panel I got the same error except this time for 'm4v' and line 1123, so I went back and commented that one out too. Finally my site started working and I was able to run Setup successfully.

Upon further investigation I realized these Mime type elements in the web.config were new for this release (did not see them in the web.config file for last release). All fine, but leads me to some questions...

Are these new entries dependent upon host web server configuration?
Is this a section of the web.config that I will have to modify each upgrade or is there a way to have a separate config file to set those values?

As always, any insight would be greatly appreciated.

Thanks!

Kerry 

12/29/2011 12:20:59 PM
Gravatar
Total Posts 18439

Re: New web.config entries caused me issues

Hi Kerry,

I got errors when I first integrated your new media players and tried to upload the example files from the jplayer site.

So I found this post about adding the newer mime types via web.config

Can you try putting it back like this and see if that solves the error?

<staticContent>
<!--
<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" />
-->
<remove fileExtension=".mp4"/>
<remove fileExtension=".m4v"/>
<remove fileExtension=".ogg"/>
<remove fileExtension=".ogv"/>
<remove fileExtension=".webm"/>
<remove fileExtension=".oga"/>
<remove fileExtension=".spx"/>
<remove fileExtension=".eot" />
<remove fileExtension=".otf" />
<remove fileExtension=".woff" />

<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".m4v" mimeType="video/m4v" />
<mimeMap fileExtension=".ogg" mimeType="video/ogg" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
<mimeMap fileExtension=".spx" mimeType="audio/ogg" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<mimeMap fileExtension=".otf" mimeType="font/otf" />
<mimeMap fileExtension=".woff" mimeType="font/x-woff" />
</staticContent>

If that works then I'll update the release packages. The problem I guess is that some servers already have these mime types configured in IIS but if they are not it also causes errors so I'm hoping by removing them first it will work in both cases.

Thanks,

Joe

12/29/2011 12:29:26 PM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: New web.config entries caused me issues

Joe,

That works. It even now shows those two as entries in the MIME Types tab of the Web Site Properties page of the Arvixe Control Panel where it did not before.

Thanks!

Kerry

12/29/2011 12:31:26 PM
Gravatar
Total Posts 18439

Re: New web.config entries caused me issues

Thanks Kerry!

That is good to know. I'll update the web.config file in the release packages accordingly so that at least people who download after I update it won't encounter any error.

Best,

Joe

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