Tag Archives: IIS

Mars Edit can’t upload images to WordPress on IIS

MarsEditIcon 

Having Troubles Uploading images to WordPress hosted on IIS

If you are like me and enjoy a Mac, and WordPress, then you have probably discovered MarsEdit. We were experiencing problems uploading images to our WordPress blog.

Upload File Error
Can’t do upload file for “blog name” because the server reported an error. The server returned an unexpected response code: 413.

WordPress Upload File Permissions on IIS

You upload an image in WordPress and either you get an error or the image will upload, thumbnails would work but the actual image would not have read permissions.

If you can’t upload an image at all, it’s probably because you need to give the IUSR account Read/Write/Modify permission on your wp-content folder.  This will allow you to upload, and do the WordPress & plugin updates.

IIS WordPress File Upload Permissions

Alos, you may you need to do is give the IIS_IUSRS group Read permissions on your “C:\Windows\Temp” folder.

Make sure to notice that the two permission changes you make are not for the same user/group.   Give IUSR permissions on your wp-content folder and IIS_IUSRS permissions on your Windows temp folder.

Note: If you have edited your php.ini file and change the upload temp directory then you will need to give IIS_IUSRS group read permissions on that folder instead.

IISWordPressIIS_USERS

That should be about all that is required to fix the issue in IIS.

Adding .OFT Fonts to IIS Mime for DNN DotNetNuke

Making .OTF Font work in DotNetNuke DNN Skin

To get a DotNetNuke DNN site to correctly display .OTF fonts, it is necessary to add a MIME type to IIS.

Making this change is easy.

  • In IIS, click on the Server Name.Double Click on MIME Types

IIS 7 MIME

  • Add a New MIME Type – .otf – Font/otf

OTF MIME Type in DNN

That’s it.

For good measure you could restart IIS from a command prompt with “IISRESET”

DotNetNuke 6 running in .Net 4.0 Server Error in ‘/’ Application Version=3.5.0.0 Version=4.0.0.0

image

We had a requirement today to run a DotNetNuke Website in .Net 4.0 as some code we are using as part of the Microsoft CRM 2011 SDK require .Net 4.0.

Problem is that with many of the DotNetNuke websites, they have some references that will cause this error when you flip your website worker process to 4.0. in IIS.

image

This will give you an error that looks like this:

 

image

Generates an error:

Server Error in ‘/’ Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1703: An assembly with the same identity ‘System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ has already been imported. Try removing one of the duplicate references.
Source Error:

[No relevant source lines]

Source File: Line: 0

Show Detailed Compiler Output:

 

Interestingly too the reference to Version=4.0.0.0 initially said Version-3.5.0.0 until the second page refresh on the error.

The Problem

The problem in our case, and it may differ with others, related to an older file for Microsoft Ajax.

There is a file called: System.Web.Extensions.dll

in the \bin    folder.

We renamed this to: System.Web.Extensions.dll.bak

And our problem was fixed.

This is due to an older way that Microsoft handled Ajax vs the new way in .Net 4.0.

 

DotNetNuke Support Services

We do offer DotNetNuke support services and would be happy to assist others with this or other DNN problems that need professional support services with.

http://www.interactivewebs.com/Services/DotNetNukeSupport.aspx

Migrate from IIS 7.0 to IIS 7.5 in a new Windows 2008 R2 Server

image

Moving from one IIS 7.0 server to IIS 7.5 is relatively easy and there are a number of tools that can assist you. Probably the best is the Web Deploy tool mentioned here:

This tool can allow you to package up and migrate the entire web sites, including configuration and database files etc.

Because our IIS 7 server is almost dead, it prevented us from configuring the tool. The install files see .Net 2.0 as required, and although it was installed we were unable to get the server to see it as installed. Anyway we tried all sorts of things, and finally gave up. (Good opportunity to rag on Microsoft, but we will leave that alone).

So now we find a need to migrate without the good tools.

Migration

We shared the IIS root folder on the source server. Then pulled all the folders containing websites across from that server to the same location on the new server.

In IIS manager, you need to export the config from the already-configured server. In IIS manager, click the Server node, and go to Shared Configuration under Management.

image

We then clicked to Export – on the right.

image

Enter the path you’d like to export the config to, and set an encryption key password:

image

Note: One thing here that is a real BITCH is that they make you select a pass that is so complex you absolutely have to write it down. We never suggest writing down passwords but they are out of control in what they make you do with this.

Copy administration.config, applicationHost.config, and configEncKey.key to your new server to a temp location.

On the new server, go back to the “Shared Configuration” section and check “Enable shared configuration.” Enter the location in physical path and click “Apply.” It should prompt for the encryption password that you had set. Enter it, and reset IIS.

image

After resetting IIS (command prompt “iisreset”), go back to Shared Configuration and uncheck “Enable shared configuration.” Click apply. You should see this:

image

Click YES and it will import all of the settings from your Shared Config into the local config on your new IIS server.

At this point, all you should need to do is change your server-specific site bindings, and it should be good to go.

Bindings

How to add binding information to a site
  1. Open Internet Information Services (IIS) Manager:
    • If you are using Windows Server 2008 or Windows Server 2008 R2:
      • On the taskbar, click Start, point to Administrative Tools, and then clickInternet Information Services (IIS) Manager.
    • If you are using Windows Vista or Windows 7:
      • On the taskbar, click Start, and then click Control Panel.
      • Double-click Administrative Tools, and then double-click Internet Information Services (IIS) Manager.
  2. In the Connections pane, expand the server name, expand Sites, and then click the Web site on which you want to configure the bindings.
  3. In the Actions pane, click Bindings…
  4. In the Site Bindings dialog box, click Add..

image

 

5. In the Add Site Binding dialog box, add the binding information, and then click OK.

image