in installing site core 9 commerce i get this error

i get an error in importing module initialize commerce error shown below


Importing Module => InitializeCommerce

[------------------------------- BootStrapCommerceServices : BootStrapCommerceServices -------------------------------]
BootStrapping Commerce Services: localhost:5005/.../Bootstrap()
Install-Site core Configuration :


IIS 10.0 Detailed Error - 500.19 - Internal Server Error

 

 

 


HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

 

Detailed Error Information:


Module   IIS Web Core
Notification   Unknown
Handler   Not yet determined
Error Code   0x8007000d
Config Error   
Config File   \\?\C:\inetpub\wwwroot\CommerceShops_Sc9\web.config

 


Requested URL   localhost:5005/.../Bootstrap()
Physical Path   
Logon Method   Not yet determined
Logon User   Not yet determined

 

 

 


Config Source:
-1:
0:

 

 

More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In
some cases, the event logs may contain more information about what caused this error.
View more information »

 

 


At C:\Program
Files\WindowsPowerShell\Modules\SitecoreInstallFramework\1.0.2\Public\Install-SitecoreConfiguration.ps1:253 char:6
+ & $entry.Task.Command @paramSet | Out-Default
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:00:00
Transcript stopped, output file is C:\MyDeploy\SIF\CommerceEngine.Initialize.171124 (15).log
Install-SitecoreConfiguration :


IIS 10.0 Detailed Error - 500.19 - Internal Server Error

 

 

 


HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

 

Detailed Error Information:


Module   IIS Web Core
Notification   Unknown
Handler   Not yet determined
Error Code   0x8007000d
Config Error   
Config File   \\?\C:\inetpub\wwwroot\CommerceShops_Sc9\web.config

 


Requested URL   localhost:5005/.../Bootstrap()
Physical Path   
Logon Method   Not yet determined
Logon User   Not yet determined

 

 

 


Config Source:
-1:
0:

 

 

More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In
some cases, the event logs may contain more information about what caused this error.
View more information »

 

 


At C:\MyDeploy\SIF\MyDeploy-Sitecore-Commerce.ps1:64 char:1
+ Install-SitecoreConfiguration @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:02:53
Transcript stopped, output file is C:\MyDeploy\SIF\Master_SingleServer.171124 (18).log
Invoke-RestMethod :


IIS 10.0 Detailed Error - 500.19 - Internal Server Error

 

 

 


HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

 

Detailed Error Information:


Module   IIS Web Core
Notification   Unknown
Handler   Not yet determined
Error Code   0x8007000d
Config Error   
Config File   \\?\C:\inetpub\wwwroot\CommerceShops_Sc9\web.config

 


Requested URL   localhost:5005/.../Bootstrap()
Physical Path   
Logon Method   Not yet determined
Logon User   Not yet determined

 

 

 


Config Source:
-1:
0:

 

 

More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In
some cases, the event logs may contain more information about what caused this error.
View more information »

 

 


At C:\MyDeploy\SIF\Modules\InitializeCommerce\InitializeCommerce.psm1:81 char:2
+ Invoke-RestMethod $UrlCommerceShopsServicesBootstrap -TimeoutSec ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
PS C:\MyDeploy\SIF>

 

  • Based on the error and the URL/port, it looks like the CommerceShop's web.config is malformed. Try confirming if the XML is formed correctly. Also, take a look at the logs under CommerceShops - this should give you more information on what's causing the error.

    As a quick note, if you see this error "System.MissingMethodException...IdentityModel.Client.DiscoveryClient.ParseUrl", re-publish the Commerce Engine and Identity Server code bases targeting the .NET Framework 4.7.1. That worked for me - hope this helps.
  • Hi. I've had the same issue. After several tries, I found my IIS doesn't have the ASP.Net Core module installed. After installing this module, everything has started working.

    https://aka.ms/dotnetcore-2-windowshosting
    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?tabs=aspnetcore2x

    Lautaro