Showing posts with label WordPress. Show all posts
Showing posts with label WordPress. Show all posts

Tuesday, February 22, 2011

Running WordPress as Sub Domain of AspDotNetStorefront Edit Image Error

Version: ASPDotNetStorefront 9.x ML & MS

Problem:
WordPress generates an error when trying to edit an existing image in a blog.


Setup:
AspDotNetStorefront is the primary site. WordPress is a subdomain of the primary site e.g. mydomain.com/blog.  WordPress is installed on the same server.  Server is Windows 2008R2 with IIS 7.5.


Solution:
By default, a subdomain will inherit it’s parent web.config settings.  It’s not possible to use the <location path="." inheritInChildApplications="false"> tag since this will prevent all subdomains from inheriting the parent web.config and this will break admin.

Instead, include the following settings in your WordPress web.config.  Be sure to preserve any existing WordPress web.config settings and simply add the settings below.

<configuration>
    <system.web>
        <httpModules>
            <remove name="RegisterRoutes" />
            <remove name="ScriptModule" />
            <remove name="UrlRoutingModule" />
            <remove name="OnErrorHandler" />
        </httpModules>
        <httpHandlers>
            <remove verb ="*" path="execpackage.aspx" />
        </httpHandlers>
    </system.web>
    <system.webServer>
        <modules>
            <remove name="RegisterRoutes" />
            <remove name="ScriptModule" />
            <remove name="UrlRoutingModule" />
        </modules>
        <handlers>
            <remove name="HtmlPages" />
        </handlers>
    </system.webServer>
</configuration>

Saturday, December 18, 2010

WordPress on IIS7 Upload Image Permissions

Problem:
With WordPress installed on a Windows Server with IIS7, images uploaded via WordPress admin do not display on the blog.  Image files are being uploaded to the server successfully but do not have the correct permissions (and do not inherit permissions from the parent folder).

Solution:
Change the AppPool Identity to run as LocalSystem.

WordPressonIIS7UploadImagePermissions