aspnet/DataProtection

Issue Running Powershell Script when Deploying ASP.NET Core 1.1 App to IIS

Closed this issue · 4 comments

Hello,

I have opened the following issue dotnet/aspnetcore#1863 in the aspnet forum about deploying a ASP.NET Core 1.1 app to a Windows 2008 R2 SP1 server. I got some feedback and based on the feedback I tried to run the PowerShell script from here: https://docs.microsoft.com/en-us/aspnet/core/publishing/iis#create-a-data-protection-registry-hive

When I run it, I am getting the following error:

Unable to find type [Microsoft.Win32.RegistryView]: make sure that the assembly containing this type is loaded.
At C:\Users\russ\Downloads\scripts\Provision-AutoGenKeys.ps1:27 char:50
+         $regView = [Microsoft.Win32.RegistryView] <<<< ::Registry32;
    + CategoryInfo          : InvalidOperation: (Microsoft.Win32.RegistryView:String) [], ParentContainsErrorRecordExc
   eption
    + FullyQualifiedErrorId : TypeNotFound

Any ideas as to what could be causing this error?

I think it's the issue with version of powershell you are using. Try installing https://www.microsoft.com/en-us/download/details.aspx?id=40855 and see if it still reproes.

I have the same issue, updated powershell and the script ran ok.
The .net core app still not running. any ideas on where I can find useful error messages or what to try next?

@mredman There is general troubleshooting advice in the Troubleshooting section of the Publish to IIS doc. If you want chat help, ping the devs on Slack: http://tattoocoder.com/aspnet-slack-sign-up/