DNN Event ID 1310 after moving website to new server Exception message: Unsecured Passwords Format Detected

IIS throwing Event ID 1310 Exception message: Unsecured Passwords Format Detected

1310

The Error Message

Exception information: Exception type: ConfigurationErrorsException Exception message: Unsecured Passwords Format Detected. The Membership Provider that contains the unsecure passwords format is: AspNetSqlMembershipProvider. The obsoleted password format is: Encrypted. For more information, see https://go.microsoft.com/fwlink/?linkid=834784.

Request information: Request URL: Request path: User host address: User: Is authenticated: False Authentication Type: Thread account name: IIS APPPOOL\DefaultAppPool

The Problem was actually simple and a “user error”

We tried to connect the website up to the wrong database. i.e. When we copied the database and moved it, we inadvertently copied the wrong database. This caused the above error due to the fact that the machinekey data in the web.config file was wrong for the database.

This caused the error 1310 to be thrown and the Application Pool associated with the new incorrectly setup site to stop.

The fix. 

Connect to the correct database!

Adding Application Pool Identity in IIS to a Folder

 

Skip to end of metadata

 

Go to start of metadata

 

Whenever a new application pool is created, IIS creates a security identifier (SID) that represents the name of the application pool itself. For example, if you create an application pool with the name “Smartcrypt,” a security identifier with the name “Smartcrypt” is created in Windows. Resources can be secured by using this identity. However, the identity is not a real user account and will not show up as a user in the Windows User Management Console.

This can be configured by selecting a folder in Windows Explorer and adding the “Smartcrypt” identity to the folder’s Access Control List (ACL).

  1. Open Windows Explorer
  2. Select the directory the Smartcrypt Manager is installed under (eg: c:\web\mds)
  3. Right click the directory and select Properties
  4. Select the Security tab
  5. Click the Edit button and then Add button
  6. Click the Locations button and make sure that you select your computer.
  7. Enter IIS AppPool\<myappoolname> (eg: IIS AppPool\smartcrypt) in the Enter the object names to select: text box.
  8. Click the Check Names button and click OK.
  9. Check Modify under the Allow column, and click OK, and OK.

By doing this, the file or directory you selected will now also allow the Smartcrypt identity access.

 

You can do this via the command-line by using the ICACLS tool. The following example gives modify access to the Smartcrypt identity to the folder C:\web\mds and all contents.

ICACLS "C:\web\mds" /grant "IIS AppPool\Smartcrypt":M /t
 

alphassl the requested property value is empty Exception for HRESULT 0x80094004

alphassl the requested property value is empty Exception for HRESULT 0x80094004

Problem

When completing an Alphassl certificate install on IIS using the “Complete Certificate Request” you receive the error:

There was an error while performing this operation.

Details:

The requested property value is empty. (Exception from HRESULT: 0x80094004)

Exception for HRESULT 0x80094004

Now this is a Typical Microsoft Error in that it really only has meaning to the person who created the error. For us end users stuck in this weird Microsoft world, the error message is trying to tell us that the Certificate you pointed to for the “Complete Certificate Request function in IIS

IIS Complete Certificate Request

is pointing to a .CER file that is not valid as a certificate for import.

So at this point it is time to check what certificate you placed in the .CER file that you are trying to import.

Solution

In particular with Alphassl certificates, the process of completing a new certificate request is completed by email. The end of the process involves receiving an email with instructions on how to complete the process of import.

Screenshot 2018 03 14 13 12 32

Now if you are anything like me, and you think you know what you are doing having completed this process a few times. You tend to work fast and read instructions later (like an IKEA assembly job). And on several of my certificate install jobs I have made the same error. That being that I read to point 2 above. Click the link which if I read it is obviously to the Root Certificate Install. Then proceed to copy and paste the SHA-256 Certificate into the process and save is as a .cer file, then try to complete the process with that hash. 

Screenshot 2018 03 14 13 16 13

So basically this is all wrong. The certificate Hash is actually included in the bottom of the email received from Alphassl and that hash from the bottom fo the email is the correct hash to copy and paste to your IIS server and save as a .cer file. It is then this file that you use to complete the process with your IIS “Complete Certificate Request” function. Not the above Root certificate.

RTFM.

 

 

There was an error while performing this operation.

Details:

The requested property value is empty. (Exception from HRESULT: 0x80094004)

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