# Storefront authorization errors with Docker

**URL:** <https://www.virtocommerce.org/t/storefront-authorization-errors-with-docker/215>\
**Category:** support\
**Tags:** docker\
**Created:** [May 19, 2020, 7:38am UTC](https://www.virtocommerce.org/t/storefront-authorization-errors-with-docker/215 "2020-05-19T07:38:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joostmeijles](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@joostmeijles](https://www.virtocommerce.org/u/joostmeijles)\
**Post date:** [May 19, 2020, 7:38am UTC](https://www.virtocommerce.org/t/storefront-authorization-errors-with-docker/215/1 "2020-05-19T07:38:33Z")

</div>

I have been trying to use [https://github.com/VirtoCommerce/vc-docker/blob/master/windows/aspnetcore/docker-compose.yml](https://github.com/VirtoCommerce/vc-docker/blob/master/windows/aspnetcore/docker-compose.yml) but get authorization errors when I visit the storefront:

```auto
vc-storefront-web_1 | fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
vc-storefront-web_1 | An unhandled exception has occurred while executing the request.
vc-storefront-web_1 | Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'Unauthorized'
vc-storefront-web_1 | at VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.StoreModule.GetStoresWithHttpMessagesAsync(Dictionary`2 customHeaders, CancellationToken cancellationToken) in S:\Builds\VirtoCommerce\vc-storefront-core\master\workspace\VirtoCommerce.Storefront\AutoRestClients\StoreModuleApi.cs:line 669
vc-storefront-web_1 | at VirtoCommerce.Storefront.AutoRestClients.StoreModuleApi.StoreModuleExtensions.GetStoresAsync(IStoreModule operations, CancellationToken cancellationToken) in S:\Builds\VirtoCommerce\vc-storefront-core\master\workspace\VirtoCommerce.Storefront\AutoRestClients\StoreModuleApi.cs:line 1946
vc-storefront-web_1 | at VirtoCommerce.Storefront.Domain.StoreService.<GetAllStoresAsync>b__7_0(MemoryCacheEntryOptions cacheEntry) in S:\Builds\VirtoCommerce\vc-storefront-core\master\workspace\VirtoCommerce.Storefront\Domain\Stores\StoreService.cs:line 53
vc-storefront-web_1 | at VirtoCommerce.Storefront.Model.Common.Caching.MemoryCacheExtensions.GetOrCreateExclusiveAsync[TItem](IMemoryCache cache, String key, Func`2 factory, Boolean cacheNullValue)
vc-storefront-web_1 | at VirtoCommerce.Storefront.Domain.StoreService.GetAllStoresAsync() in S:\Builds\VirtoCommerce\vc-storefront-core\master\workspace\VirtoCommerce.Storefront\Domain\Stores\StoreService.cs:line 48
vc-storefront-web_1 | at VirtoCommerce.Storefront.Domain.StoreWorkContextBuilderExtensions.WithStoresAsync(IWorkContextBuilder builder, String defaultStoreId) in S:\Builds\VirtoCommerce\vc-storefront-core\master\workspace\VirtoCommerce.Storefront\Domain\Stores\StoreWorkContextBuilderExtensions.cs:line 51
vc-storefront-web_1 | at VirtoCommerce.Storefront.Middleware.WorkContextBuildMiddleware.Invoke(HttpContext context) in S:\Builds\VirtoCommerce\vc-storefront-core\master\workspace\VirtoCommerce.Storefront\Middleware\WorkContextBuildMiddleware.cs:line 60
vc-storefront-web_1 | at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
vc-storefront-web_1 | at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
vc-storefront-web_1 | at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
vc-storefront-web_1 | at Microsoft.AspNetCore.ResponseCaching.ResponseCachingMiddleware.Invoke(HttpContext httpContext)
vc-storefront-web_1 | at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)

```

See also [https://github.com/VirtoCommerce/vc-docker/pull/4](https://github.com/VirtoCommerce/vc-docker/pull/4)

How to fix this?

Thanks,  
Joost

---

<div class="post-metadata">

**Author:** ![mvktsk](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/mvktsk/32/29_2.png) [@mvktsk](https://www.virtocommerce.org/u/mvktsk)\
**Post date:** [May 20, 2020, 9:46am UTC](https://www.virtocommerce.org/t/storefront-authorization-errors-with-docker/215/2 "2020-05-20T09:46:03Z")

</div>

Hi @joostmeijles,

Sorry for the long answer. It looks like sample data not installed on the platform. We need time to investigate this issue.

---

<div class="post-metadata">

**Author:** ![mvktsk](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/mvktsk/32/29_2.png) [@mvktsk](https://www.virtocommerce.org/u/mvktsk)\
**Post date:** [May 28, 2020, 3:57pm UTC](https://www.virtocommerce.org/t/storefront-authorization-errors-with-docker/215/3 "2020-05-28T15:57:43Z")

</div>

Hi @joostmeijles,

Sorry for the long answer.

I updated docker-compose file in aspnetcore folder [https://github.com/VirtoCommerce/vc-docker/tree/master/windows/aspnetcore](https://github.com/VirtoCommerce/vc-docker/tree/master/windows/aspnetcore))  
Try to use this docker-compose file.

Next, after the services are started:

1. open platform ([http://localhost:8090](http://localhost:8090)) and install modules and sample data (Electronics catalog)
2. recreate the search index  
[image|622x356](https://www.virtocommerce.org/uploads/short-url/h9fwpOYQ1IPvohMhBkW9uU1Tpkw.png)

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/virtocommerce/original/1X/0fbd0ab46a18dcde6b278e19eac6f35c86f6a79d.png)

1. open storefront ([http://localhost:8080](http://localhost:8080))
