diff --git a/_docker/rabbitmq/Dockerfile.nanowin b/_docker/rabbitmq/Dockerfile.nanowin
new file mode 100644
index 000000000..26474c235
--- /dev/null
+++ b/_docker/rabbitmq/Dockerfile.nanowin
@@ -0,0 +1,29 @@
+#https://github.com/spring2/dockerfiles/tree/master/rabbitmq
+
+FROM microsoft/windowsservercore
+
+SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
+
+ENV chocolateyUseWindowsCompression false
+
+RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \
+ choco install -y curl;
+
+RUN choco install -y erlang
+ENV ERLANG_SERVICE_MANAGER_PATH="C:\Program Files\erl8.2\erts-8.2\bin"
+RUN choco install -y rabbitmq
+ENV RABBITMQ_SERVER="C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5"
+
+ENV RABBITMQ_CONFIG_FILE="c:\rabbitmq"
+COPY rabbitmq.config C:/
+COPY rabbitmq.config C:/Users/ContainerAdministrator/AppData/Roaming/RabbitMQ/
+COPY enabled_plugins C:/Users/ContainerAdministrator/AppData/Roaming/RabbitMQ/
+
+
+EXPOSE 4369
+EXPOSE 5672
+EXPOSE 5671
+EXPOSE 15672
+
+WORKDIR C:/Program\ Files/RabbitMQ\ Server/rabbitmq_server-3.6.5/sbin
+CMD .\rabbitmq-server.bat
\ No newline at end of file
diff --git a/_docker/rabbitmq/enabled_plugins b/_docker/rabbitmq/enabled_plugins
new file mode 100644
index 000000000..9eafc419b
--- /dev/null
+++ b/_docker/rabbitmq/enabled_plugins
@@ -0,0 +1 @@
+[rabbitmq_amqp1_0,rabbitmq_management].
diff --git a/_docker/rabbitmq/rabbitmq.config b/_docker/rabbitmq/rabbitmq.config
new file mode 100644
index 000000000..f7837f213
--- /dev/null
+++ b/_docker/rabbitmq/rabbitmq.config
@@ -0,0 +1 @@
+[{rabbit, [{loopback_users, []}]}].
\ No newline at end of file
diff --git a/_docker/redis/Dockerfile.nanowin b/_docker/redis/Dockerfile.nanowin
new file mode 100644
index 000000000..a08bcb0b6
--- /dev/null
+++ b/_docker/redis/Dockerfile.nanowin
@@ -0,0 +1,30 @@
+# The MSI installs a service which is hard to override, so let's use a zip file.
+
+FROM microsoft/windowsservercore
+MAINTAINER alexellis2@gmail.com
+
+SHELL ["powershell"]
+RUN $ErrorActionPreference = 'Stop'; \
+ wget https://github.com/MSOpenTech/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.zip -OutFile Redis-x64-3.2.100.zip ; \
+ Expand-Archive Redis-x64-3.2.100.zip -dest 'C:\\Program Files\\Redis\\' ; \
+ Remove-Item Redis-x64-3.2.100.zip -Force
+
+RUN setx PATH '%PATH%;C:\\Program Files\\Redis\\'
+WORKDIR 'C:\\Program Files\\Redis\\'
+
+
+
+RUN Get-Content redis.windows.conf | Where { $_ -notmatch 'bind 127.0.0.1' } | Set-Content redis.openport.conf ; \
+ Get-Content redis.openport.conf | Where { $_ -notmatch 'protected-mode yes' } | Set-Content redis.unprotected.conf ; \
+ Add-Content redis.unprotected.conf 'protected-mode no' ; \
+ Add-Content redis.unprotected.conf 'bind 0.0.0.0' ; \
+ Get-Content redis.unprotected.conf
+
+EXPOSE 6379
+
+RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
+
+# Define our command to be run when launching the container
+CMD .\\redis-server.exe .\\redis.unprotected.conf --port 6379 ; \
+ Write-Host Redis Started... ; \
+ while ($true) { Start-Sleep -Seconds 3600 }
diff --git a/docker-compose-windows.override.yml b/docker-compose-windows.override.yml
new file mode 100644
index 000000000..c85864d72
--- /dev/null
+++ b/docker-compose-windows.override.yml
@@ -0,0 +1,79 @@
+version: '2.1'
+
+# The default docker-compose.override file can use the "localhost" as the external name for testing web apps within the same dev machine.
+# The ESHOP_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
+# ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost
+# but values present in the environment vars at runtime will always override those defined inside the .env file
+# An external IP or DNS name has to be used (instead localhost and the 10.0.75.1 IP) when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance.
+
+services:
+
+ basket.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Development
+ - ASPNETCORE_URLS=http://0.0.0.0:5103
+ - ConnectionString=basket.data
+ - identityUrl=http://identity.api:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
+ - EventBusConnection=rabbitmq
+ ports:
+ - "5103:5103"
+
+ catalog.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Development
+ - ASPNETCORE_URLS=http://0.0.0.0:5101
+ - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
+ - ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
+ - EventBusConnection=rabbitmq
+ ports:
+ - "5101:5101"
+
+ identity.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Development
+ - ASPNETCORE_URLS=http://0.0.0.0:5105
+ - SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104
+ - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
+ - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105.
+ ports:
+ - "5105:5105"
+
+ ordering.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Development
+ - ASPNETCORE_URLS=http://0.0.0.0:5102
+ - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
+ - identityUrl=http://identity.api:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
+ - EventBusConnection=rabbitmq
+ ports:
+ - "5102:5102"
+
+ webspa:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Development
+ - ASPNETCORE_URLS=http://0.0.0.0:5104
+ - CatalogUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101
+ - OrderingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
+ - IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
+ - BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
+ ports:
+ - "5104:5104"
+
+ webmvc:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Development
+ - ASPNETCORE_URLS=http://0.0.0.0:5100
+ - CatalogUrl=http://catalog.api:5101
+ - OrderingUrl=http://ordering.api:5102
+ - BasketUrl=http://basket.api:5103
+ - IdentityUrl=http://10.0.75.1:5105 #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser.
+ #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
+ ports:
+ - "5100:5100"
+
+ sql.data:
+ environment:
+ - SA_PASSWORD=Pass@word
+ - ACCEPT_EULA=Y
+ ports:
+ - "5433:1433"
\ No newline at end of file
diff --git a/docker-compose-windows.prod.yml b/docker-compose-windows.prod.yml
new file mode 100644
index 000000000..8d00df4ca
--- /dev/null
+++ b/docker-compose-windows.prod.yml
@@ -0,0 +1,80 @@
+version: '2.1'
+
+# The Production docker-compose file has to have the external/real IPs or DNS names for the services
+# The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
+# ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=192.168.88.248
+# but values present in the environment vars at runtime will always override those defined inside the .env file
+# An external IP or DNS name has to be used when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance.
+#
+# Set ASPNETCORE_ENVIRONMENT=Development to get errors while testing.
+#
+# You need to start it with the following CLI command:
+# docker-compose -f docker-compose-windows.yml -f docker-compose-windows.prod.yml up -d
+
+services:
+
+ basket.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:5103
+ - ConnectionString=basket.data
+ - identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
+ ports:
+ - "5103:5103"
+
+ catalog.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:5101
+ - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
+ - ExternalCatalogBaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
+ ports:
+ - "5101:5101"
+
+ identity.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:5105
+ - SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104
+ - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
+ - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your host's firewall at range 5100-5105.
+ ports:
+ - "5105:5105"
+
+ ordering.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:5102
+ - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
+ - identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
+ ports:
+ - "5102:5102"
+
+ webspa:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:5104
+ - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101
+ - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
+ - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
+ - BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
+ ports:
+ - "5104:5104"
+
+ webmvc:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:5100
+ - CatalogUrl=http://catalog.api:5101
+ - OrderingUrl=http://ordering.api:5102
+ - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
+ - BasketUrl=http://basket.api:5103
+ ports:
+ - "5100:5100"
+
+ sql.data:
+ environment:
+ - SA_PASSWORD=Pass@word
+ - ACCEPT_EULA=Y
+ ports:
+ - "5433:1433"
\ No newline at end of file
diff --git a/docker-compose-windows.yml b/docker-compose-windows.yml
new file mode 100644
index 000000000..b8eaabfc8
--- /dev/null
+++ b/docker-compose-windows.yml
@@ -0,0 +1,80 @@
+version: '2.1'
+
+services:
+ basket.api:
+ image: eshop/basket.api
+ build:
+ context: ./src/Services/Basket/Basket.API
+ dockerfile: Dockerfile.nanowin
+ depends_on:
+ - basket.data
+ - identity.api
+
+ catalog.api:
+ image: eshop/catalog.api
+ build:
+ context: ./src/Services/Catalog/Catalog.API
+ dockerfile: Dockerfile.nanowin
+ depends_on:
+ - sql.data
+
+ identity.api:
+ image: eshop/identity.api
+ build:
+ context: ./src/Services/Identity/Identity.API
+ dockerfile: Dockerfile.nanowin
+ depends_on:
+ - sql.data
+
+ ordering.api:
+ image: eshop/ordering.api
+ build:
+ context: ./src/Services/Ordering/Ordering.API
+ dockerfile: Dockerfile.nanowin
+ depends_on:
+ - sql.data
+
+ webspa:
+ image: eshop/webspa
+ build:
+ context: ./src/Web/WebSPA
+ dockerfile: Dockerfile.nanowin
+ depends_on:
+ - identity.api
+ - basket.api
+
+ webmvc:
+ image: eshop/webmvc
+ build:
+ context: ./src/Web/WebMVC
+ dockerfile: Dockerfile.nanowin
+ depends_on:
+ - catalog.api
+ - ordering.api
+ - identity.api
+ - basket.api
+
+ sql.data:
+ image: microsoft/mssql-server-windows
+
+ basket.data:
+ image: redis
+ build:
+ context: ./_docker/redis
+ dockerfile: Dockerfile.nanowin
+ ports:
+ - "6379:6379"
+
+ rabbitmq:
+ image: rabbitmq
+ build:
+ context: ./_docker/rabbitmq
+ dockerfile: Dockerfile.nanowin
+ ports:
+ - "5672:5672"
+
+networks:
+ default:
+ external:
+ name: nat
+
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
index 14d8114ea..e760fed47 100644
--- a/docker-compose.prod.yml
+++ b/docker-compose.prod.yml
@@ -8,7 +8,7 @@ version: '2'
#
# Set ASPNETCORE_ENVIRONMENT=Development to get errors while testing.
#
-# You need to start it with the following CLI command:
+# You need to start it with the following CLI command:
# docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
services:
diff --git a/src/Services/Basket/Basket.API/Dockerfile.nanowin b/src/Services/Basket/Basket.API/Dockerfile.nanowin
new file mode 100644
index 000000000..9c664f4e4
--- /dev/null
+++ b/src/Services/Basket/Basket.API/Dockerfile.nanowin
@@ -0,0 +1,8 @@
+FROM microsoft/dotnet:1.1-runtime-nanoserver
+SHELL ["powershell"]
+ARG source
+WORKDIR /app
+RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
+EXPOSE 80
+COPY ${source:-obj/Docker/publish} .
+ENTRYPOINT ["dotnet", "Basket.API.dll"]
diff --git a/src/Services/Catalog/Catalog.API/Dockerfile.nanowin b/src/Services/Catalog/Catalog.API/Dockerfile.nanowin
new file mode 100644
index 000000000..193ddaef6
--- /dev/null
+++ b/src/Services/Catalog/Catalog.API/Dockerfile.nanowin
@@ -0,0 +1,8 @@
+FROM microsoft/dotnet:1.1-runtime-nanoserver
+SHELL ["powershell"]
+ARG source
+WORKDIR /app
+RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
+EXPOSE 80
+COPY ${source:-obj/Docker/publish} .
+ENTRYPOINT ["dotnet", "Catalog.API.dll"]
diff --git a/src/Services/Identity/Identity.API/Dockerfile.nanowin b/src/Services/Identity/Identity.API/Dockerfile.nanowin
new file mode 100644
index 000000000..9d24ccf1a
--- /dev/null
+++ b/src/Services/Identity/Identity.API/Dockerfile.nanowin
@@ -0,0 +1,8 @@
+FROM microsoft/dotnet:1.1-runtime-nanoserver
+SHELL ["powershell"]
+ARG source
+WORKDIR /app
+RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
+EXPOSE 80
+COPY ${source:-obj/Docker/publish} .
+ENTRYPOINT ["dotnet", "Identity.API.dll"]
diff --git a/src/Services/Ordering/Ordering.API/Dockerfile.nanowin b/src/Services/Ordering/Ordering.API/Dockerfile.nanowin
new file mode 100644
index 000000000..653531d0f
--- /dev/null
+++ b/src/Services/Ordering/Ordering.API/Dockerfile.nanowin
@@ -0,0 +1,8 @@
+FROM microsoft/dotnet:1.1-runtime-nanoserver
+SHELL ["powershell"]
+ARG source
+WORKDIR /app
+RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
+EXPOSE 80
+COPY ${source:-obj/Docker/publish} .
+ENTRYPOINT ["dotnet", "Ordering.API.dll"]
diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj b/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj
new file mode 100644
index 000000000..391983c31
--- /dev/null
+++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj
@@ -0,0 +1,305 @@
+
+
+
+
+
+
+ Debug
+ AnyCPU
+
+
+ 2.0
+ {07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}
+ {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ Microsoft.eShopOnContainers.Catalog.WebForms
+ Catalog.WebForms
+ v4.5.2
+ true
+
+
+
+
+
+
+
+
+
+ true
+ full
+ false
+ bin\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ true
+ pdbonly
+ true
+ bin\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Autofac.4.3.0\lib\net45\Autofac.dll
+
+
+ ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
+
+
+ ..\packages\AspNet.ScriptManager.bootstrap.3.0.0\lib\net45\AspNet.ScriptManager.bootstrap.dll
+
+
+ ..\packages\AspNet.ScriptManager.jQuery.1.10.2\lib\net45\AspNet.ScriptManager.jQuery.dll
+
+
+ ..\packages\Microsoft.AspNet.ScriptManager.MSAjax.5.0.0\lib\net45\Microsoft.ScriptManager.MSAjax.dll
+
+
+ ..\packages\Microsoft.AspNet.ScriptManager.WebForms.5.0.0\lib\net45\Microsoft.ScriptManager.WebForms.dll
+
+
+ ..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll
+
+
+ True
+ ..\packages\WebGrease.1.5.2\lib\WebGrease.dll
+
+
+ True
+ ..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll
+
+
+ True
+ ..\packages\Microsoft.AspNet.Web.Optimization.WebForms.1.1.3\lib\net45\Microsoft.AspNet.Web.Optimization.WebForms.dll
+
+
+ ..\packages\Microsoft.AspNet.FriendlyUrls.Core.1.0.2\lib\net45\Microsoft.AspNet.FriendlyUrls.dll
+
+
+
+
+ ..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+
+
+ ..\packages\Microsoft.ApplicationInsights.2.2.0\lib\net45\Microsoft.ApplicationInsights.dll
+
+
+ ..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.0.6\lib\net45\Microsoft.AI.Agent.Intercept.dll
+
+
+ ..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.2.0\lib\net45\Microsoft.AI.DependencyCollector.dll
+
+
+ ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0\lib\net45\Microsoft.AI.PerfCounterCollector.dll
+
+
+ ..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll
+
+
+ ..\packages\Microsoft.ApplicationInsights.WindowsServer.2.2.0\lib\net45\Microsoft.AI.WindowsServer.dll
+
+
+ ..\packages\Microsoft.ApplicationInsights.Web.2.2.0\lib\net45\Microsoft.AI.Web.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+ Dockerfile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ About.aspx
+ ASPXCodeBehind
+
+
+ About.aspx
+
+
+
+ Contact.aspx
+ ASPXCodeBehind
+
+
+ Contact.aspx
+
+
+ Default.aspx
+ ASPXCodeBehind
+
+
+ Default.aspx
+
+
+
+ Global.asax
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Site.Master
+ ASPXCodeBehind
+
+
+ Site.Master
+
+
+ Site.Mobile.Master
+ ASPXCodeBehind
+
+
+ Site.Mobile.Master
+
+
+ ViewSwitcher.ascx
+ ASPXCodeBehind
+
+
+ ViewSwitcher.ascx
+
+
+
+
+
+
+
+
+
+ Web.config
+
+
+ Web.config
+
+
+
+ 10.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+
+
+
+
+
+ True
+ True
+ 58178
+ /
+ http://localhost:58178/
+ False
+ False
+
+
+ False
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs b/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs
new file mode 100644
index 000000000..29aa6f831
--- /dev/null
+++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs
@@ -0,0 +1,45 @@
+using Autofac;
+using Autofac.Core;
+using eShopOnContainers.Core.Models.Catalog;
+using eShopOnContainers.Core.Services.Catalog;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace Microsoft.eShopOnContainers.Catalog.WebForms
+{
+ public partial class _Default : Page
+ {
+ private ICatalogService catalog;
+
+ protected _Default() { }
+
+ public _Default(ICatalogService catalog)
+ {
+ this.catalog = catalog;
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ RegisterAsyncTask(new PageAsyncTask(LoadCatalogDataAsync));
+
+ base.OnLoad(e);
+ }
+
+ private async Task LoadCatalogDataAsync()
+ {
+ var collection = await catalog?.GetCatalogAsync();
+ catalogList.DataSource = collection;
+ catalogList.DataBind();
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Global.asax.cs b/src/Web/Catalog.WebForms/Catalog.WebForms/Global.asax.cs
new file mode 100644
index 000000000..f0e204417
--- /dev/null
+++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Global.asax.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Web;
+using System.Web.Optimization;
+using System.Web.Routing;
+
+namespace Microsoft.eShopOnContainers.Catalog.WebForms
+{
+ public class Global : HttpApplication
+ {
+
+ void Application_Start(object sender, EventArgs e)
+ {
+ // Code that runs on application startup
+ RouteConfig.RegisterRoutes(RouteTable.Routes);
+ BundleConfig.RegisterBundles(BundleTable.Bundles);
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Modules/AutoFacHttpModule.cs b/src/Web/Catalog.WebForms/Catalog.WebForms/Modules/AutoFacHttpModule.cs
new file mode 100644
index 000000000..dae6493dc
--- /dev/null
+++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Modules/AutoFacHttpModule.cs
@@ -0,0 +1,83 @@
+using Autofac;
+using eShopOnContainers.Core.Services.Catalog;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Configuration;
+using System.Web.UI;
+
+namespace Microsoft.eShopOnContainers.Catalog.WebForms.Modules
+{
+ // Using DI with WebForms is not yet implemented.
+ // This implementation has been adapted from this post:
+ // https://blogs.msdn.microsoft.com/webdev/2016/10/19/modern-asp-net-web-forms-development-dependency-injection/
+
+ public class AutoFacHttpModule : IHttpModule
+ {
+ private static IContainer Container => lazyContainer.Value;
+
+ private static Lazy lazyContainer = new Lazy(() => CreateContainer());
+
+ private static IContainer CreateContainer()
+ {
+ // Configure AutoFac:
+ // Register Containers:
+ var settings = WebConfigurationManager.AppSettings;
+ var useFake = settings["usefake"];
+ bool fake = useFake == "true";
+ var builder = new ContainerBuilder();
+ if (fake)
+ {
+ builder.RegisterType()
+ .As();
+ }
+ else
+ {
+ builder.RegisterType()
+ .As();
+ }
+ var container = builder.Build();
+ return container;
+ }
+
+ public void Dispose()
+ {
+ Container.Dispose();
+ }
+
+ public void Init(HttpApplication context)
+ {
+ context.PreRequestHandlerExecute += (_, __) => InjectDependencies();
+ }
+
+ private void InjectDependencies()
+ {
+ if (HttpContext.Current.CurrentHandler is Page page)
+ {
+ // Get the code-behind class that we may have written
+ var pageType = page.GetType().BaseType;
+
+ // Determine if there is a constructor to inject, and grab it
+ var ctor = (from c in pageType.GetConstructors()
+ where c.GetParameters().Length > 0
+ select c).FirstOrDefault();
+
+ if (ctor != null)
+ {
+ // Resolve the parameters for the constructor
+ var args = (from parm in ctor.GetParameters()
+ select Container.Resolve(parm.ParameterType))
+ .ToArray();
+
+ // Execute the constructor method with the arguments resolved
+ ctor.Invoke(page, args);
+ }
+
+ // Use the Autofac method to inject any properties that can be filled by Autofac
+ Container.InjectProperties(page);
+
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config b/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config
new file mode 100644
index 000000000..0c98f5b70
--- /dev/null
+++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/packages.config b/src/Web/Catalog.WebForms/Catalog.WebForms/packages.config
new file mode 100644
index 000000000..756f567ce
--- /dev/null
+++ b/src/Web/Catalog.WebForms/Catalog.WebForms/packages.config
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Web/WebMVC/Dockerfile.nanowin b/src/Web/WebMVC/Dockerfile.nanowin
new file mode 100644
index 000000000..4eaad3b22
--- /dev/null
+++ b/src/Web/WebMVC/Dockerfile.nanowin
@@ -0,0 +1,8 @@
+FROM microsoft/dotnet:1.1-runtime-nanoserver
+SHELL ["powershell"]
+ARG source
+WORKDIR /app
+RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
+EXPOSE 80
+COPY ${source:-obj/Docker/publish} .
+ENTRYPOINT ["dotnet", "WebMVC.dll"]
diff --git a/src/Web/WebMVC/wwwroot/css/site.min.css b/src/Web/WebMVC/wwwroot/css/site.min.css
index f95f6d90e..4d03fa783 100644
--- a/src/Web/WebMVC/wwwroot/css/site.min.css
+++ b/src/Web/WebMVC/wwwroot/css/site.min.css
@@ -1 +1 @@
-.esh-app-footer{background-color:#000;border-top:1px solid #eee;margin-top:2.5rem;padding-bottom:2.5rem;padding-top:2.5rem;width:100%}.esh-app-footer-brand{height:50px;width:230px}.esh-app-footer-text{color:#83d01b;line-height:50px;text-align:right;width:100%}@font-face{font-family:Montserrat;font-weight:400;src:url("../fonts/Montserrat-Regular.eot?") format("eot"),url("../fonts/Montserrat-Regular.woff") format("woff"),url("../fonts/Montserrat-Regular.ttf") format("truetype"),url("../fonts/Montserrat-Regular.svg#Montserrat") format("svg")}@font-face{font-family:Montserrat;font-weight:700;src:url("../fonts/Montserrat-Bold.eot?") format("eot"),url("../fonts/Montserrat-Bold.woff") format("woff"),url("../fonts/Montserrat-Bold.ttf") format("truetype"),url("../fonts/Montserrat-Bold.svg#Montserrat") format("svg")}html,body{font-family:Montserrat,sans-serif;font-size:16px;font-weight:400;z-index:10}*,*::after,*::before{box-sizing:border-box}.preloading{color:#00a69c;display:block;font-size:1.5rem;left:50%;position:fixed;top:50%;transform:translate(-50%,-50%)}select::-ms-expand{display:none}@media screen and (min-width:992px){.form-input{max-width:360px;width:360px}}.form-input{border-radius:0;height:45px;padding:10px}.form-input-small{max-width:100px !important}.form-input-medium{width:150px !important}.alert{padding-left:0}.alert-danger{background-color:transparent;border:0;color:#fb0d0d;font-size:12px}a,a:active,a:hover,a:visited{color:#000;text-decoration:none;transition:color .35s}a:hover,a:active{color:#75b918;transition:color .35s}.esh-pager-wrapper{padding-top:1rem;text-align:center}.esh-pager-item{margin:0 5vw}.esh-pager-item--navigable{display:inline-block;cursor:pointer}.esh-pager-item--navigable.is-disabled{opacity:0;pointer-events:none}.esh-pager-item--navigable:hover{color:#83d01b}@media screen and (max-width:1280px){.esh-pager-item{font-size:.85rem}}@media screen and (max-width:1024px){.esh-pager-item{margin:0 4vw}}.esh-identity{line-height:3rem;position:relative;text-align:right}.esh-identity-section{display:inline-block;width:100%}.esh-identity-name{display:inline-block}.esh-identity-name--upper{text-transform:uppercase}@media screen and (max-width:768px){.esh-identity-name{font-size:.85rem}}.esh-identity-image{display:inline-block}.esh-identity-drop{background:#fff;height:0;min-width:14rem;right:0;overflow:hidden;padding:.5rem;position:absolute;top:2.5rem;transition:height .35s}.esh-identity:hover .esh-identity-drop{border:1px solid #eee;height:7rem;transition:height .35s}.esh-identity-item{cursor:pointer;display:block;transition:color .35s}.esh-identity-item:hover{color:#75b918;transition:color .35s}.esh-header{background-color:#00a69c;height:4rem}.esh-header-back{color:rgba(255,255,255,.5) !important;line-height:4rem;text-transform:uppercase;text-decoration:none;transition:color .35s}.esh-header-back:hover{color:#fff !important;transition:color .35s}.esh-orders{min-height:80vh;overflow-x:hidden}.esh-orders-header{background-color:#00a69c;height:4rem}.esh-orders-back{color:rgba(255,255,255,.4);line-height:4rem;text-transform:uppercase;text-decoration:none;transition:color .35s}.esh-orders-back:hover{color:#fff;transition:color .35s}.esh-orders-titles{padding-bottom:1rem;padding-top:2rem}.esh-orders-title{text-transform:uppercase}.esh-orders-items{height:2rem;line-height:2rem;position:relative}.esh-orders-items:nth-of-type(2n+1):before{background-color:#eef;content:'';height:100%;left:0;margin-left:-100vw;position:absolute;top:0;width:200vw;z-index:-1}.esh-orders-item{font-weight:300}.esh-orders-item--hover{opacity:0;pointer-events:none}.esh-orders-items:hover .esh-orders-item--hover{opacity:1;pointer-events:all}.esh-orders-link{color:#83d01b;text-decoration:none;transition:color .35s}.esh-orders-link:hover{color:#75b918;transition:color .35s}.esh-orders_new{min-height:80vh}.esh-orders_new-header{background-color:#00a69c;height:4rem}.esh-orders_new-back{color:rgba(255,255,255,.4);line-height:4rem;text-decoration:none;text-transform:uppercase;transition:color .35s}.esh-orders_new-back:hover{color:#fff;transition:color .35s}.esh-orders_new-section{padding:1rem 0}.esh-orders_new-section--right{text-align:right}.esh-orders_new-placeOrder{background-color:#83d01b;border:0;border-radius:0;color:#fff;display:inline-block;font-size:1rem;font-weight:400;margin-top:1rem;padding:1rem 1.5rem;text-align:center;text-transform:uppercase;transition:all .35s}.esh-orders_new-placeOrder:hover{background-color:#4a760f;transition:all .35s}.esh-orders_new-titles{padding-bottom:1rem;padding-top:2rem}.esh-orders_new-title{font-size:1.25rem;text-transform:uppercase}.esh-orders_new-items--border{border-bottom:1px solid #eee;padding:.5rem 0}.esh-orders_new-items--border:last-of-type{border-color:transparent}.esh-orders_new-item{font-size:1rem;font-weight:300}.esh-orders_new-item--middle{line-height:8rem}@media screen and (max-width:768px){.esh-orders_new-item--middle{line-height:1rem}}.esh-orders_new-item--mark{color:#83d01b}.esh-orders_new-image{height:8rem}.esh-orders_detail{min-height:80vh}.esh-orders_detail-section{padding:1rem 0}.esh-orders_detail-section--right{text-align:right}.esh-orders_detail-titles{padding-bottom:1rem;padding-top:2rem}.esh-orders_detail-title{text-transform:uppercase}.esh-orders_detail-items--border{border-bottom:1px solid #eee;padding:.5rem 0}.esh-orders_detail-items--border:last-of-type{border-color:transparent}.esh-orders_detail-item{font-size:1rem;font-weight:300}.esh-orders_detail-item--middle{line-height:8rem}@media screen and (max-width:768px){.esh-orders_detail-item--middle{line-height:1rem}}.esh-orders_detail-item--mark{color:#83d01b}.esh-orders_detail-image{height:8rem}.esh-catalog-hero{background-image:url("../images/main_banner.png");background-size:cover;height:260px;width:100%}.esh-catalog-title{position:relative;top:74.28571px}.esh-catalog-filters{background-color:#00a69c;height:65px}.esh-catalog-filter{background-color:transparent;border-color:#00d9cc;color:#fff;cursor:pointer;margin-right:1rem;margin-top:.5rem;outline-color:#83d01b;padding-bottom:0;padding-left:.5rem;padding-right:.5rem;padding-top:1.5rem;min-width:140px;-webkit-appearance:none}.esh-catalog-filter option{background-color:#00a69c}.esh-catalog-label{display:inline-block;position:relative;z-index:0}.esh-catalog-label::before{color:rgba(255,255,255,.5);content:attr(data-title);font-size:.65rem;margin-top:.65rem;margin-left:.5rem;position:absolute;text-transform:uppercase;z-index:1}.esh-catalog-label::after{background-image:url("../images/arrow-down.png");height:7px;content:'';position:absolute;right:1.5rem;top:2.5rem;width:10px;z-index:1}.esh-catalog-send{background-color:#83d01b;color:#fff;cursor:pointer;font-size:1rem;transform:translateY(.5rem);padding:.5rem;transition:all .35s}.esh-catalog-send:hover{background-color:#4a760f;transition:all .35s}.esh-catalog-items{margin-top:1rem}.esh-catalog-item{text-align:center;margin-bottom:1.5rem;width:33%;display:inline-block;float:none !important}@media screen and (max-width:1024px){.esh-catalog-item{width:50%}}@media screen and (max-width:768px){.esh-catalog-item{width:100%}}.esh-catalog-thumbnail{max-width:370px;width:100%}.esh-catalog-button{background-color:#83d01b;border:none;color:#fff;cursor:pointer;font-size:1rem;height:3rem;margin-top:1rem;transition:all .35s;width:80%}.esh-catalog-button.is-disabled{opacity:.5;pointer-events:none}.esh-catalog-button:hover{background-color:#4a760f;transition:all .35s}.esh-catalog-name{font-size:1rem;font-weight:300;margin-top:.5rem;text-align:center;text-transform:uppercase}.esh-catalog-price{text-align:center;font-weight:900;font-size:28px}.esh-catalog-price::before{content:'$'}.esh-basket{min-height:80vh}.esh-basket-titles{padding-bottom:1rem;padding-top:2rem}.esh-basket-titles--clean{padding-bottom:0;padding-top:0}.esh-basket-title{text-transform:uppercase}.esh-basket-items--border{border-bottom:1px solid #eee;padding:.5rem 0}.esh-basket-items--border:last-of-type{border-color:transparent}.esh-basket-item{font-size:1rem;font-weight:300}.esh-basket-item--middle{line-height:8rem}@media screen and (max-width:1024px){.esh-basket-item--middle{line-height:1rem}}.esh-basket-item--mark{color:#00a69c}.esh-basket-image{height:8rem}.esh-basket-input{line-height:1rem;width:100%}.esh-basket-checkout{border:none;border-radius:0;background-color:#83d01b;color:#fff;display:inline-block;font-size:1rem;font-weight:400;margin-top:1rem;padding:1rem 1.5rem;text-align:center;text-transform:uppercase;transition:all .35s}.esh-basket-checkout:hover{background-color:#4a760f;transition:all .35s}.esh-basketstatus{cursor:pointer;display:inline-block;float:right;position:relative;transition:all .35s}.esh-basketstatus.is-disabled{opacity:.5;pointer-events:none}.esh-basketstatus-image{height:36px;margin-top:.5rem}.esh-basketstatus-badge{background-color:#83d01b;border-radius:50%;color:#fff;display:block;height:1.5rem;left:50%;position:absolute;text-align:center;top:0;transform:translateX(-38%);transition:all .35s;width:1.5rem}.esh-basketstatus:hover .esh-basketstatus-badge{background-color:transparent;color:#75b918;transition:all .35s}
\ No newline at end of file
+.esh-app-footer{background-color:#000;border-top:1px solid #eee;margin-top:2.5rem;padding-bottom:2.5rem;padding-top:2.5rem;width:100%}.esh-app-footer-brand{height:50px;width:230px}.esh-app-footer-text{color:#83d01b;line-height:50px;text-align:right;width:100%}@font-face{font-family:Montserrat;font-weight:400;src:url("../fonts/Montserrat-Regular.eot?") format("eot"),url("../fonts/Montserrat-Regular.woff") format("woff"),url("../fonts/Montserrat-Regular.ttf") format("truetype"),url("../fonts/Montserrat-Regular.svg#Montserrat") format("svg")}@font-face{font-family:Montserrat;font-weight:700;src:url("../fonts/Montserrat-Bold.eot?") format("eot"),url("../fonts/Montserrat-Bold.woff") format("woff"),url("../fonts/Montserrat-Bold.ttf") format("truetype"),url("../fonts/Montserrat-Bold.svg#Montserrat") format("svg")}html,body{font-family:Montserrat,sans-serif;font-size:16px;font-weight:400;z-index:10}*,*::after,*::before{box-sizing:border-box}.preloading{color:#00a69c;display:block;font-size:1.5rem;left:50%;position:fixed;top:50%;transform:translate(-50%,-50%)}select::-ms-expand{display:none}@media screen and (min-width:992px){.form-input{max-width:360px;width:360px}}.form-input{border-radius:0;height:45px;padding:10px}.form-input-small{max-width:100px !important}.form-input-medium{width:150px !important}.alert{padding-left:0}.alert-danger{background-color:transparent;border:0;color:#fb0d0d;font-size:12px}a,a:active,a:hover,a:visited{color:#000;text-decoration:none;transition:color .35s}a:hover,a:active{color:#75b918;transition:color .35s}.esh-basket{min-height:80vh}.esh-basket-titles{padding-bottom:1rem;padding-top:2rem}.esh-basket-titles--clean{padding-bottom:0;padding-top:0}.esh-basket-title{text-transform:uppercase}.esh-basket-items--border{border-bottom:1px solid #eee;padding:.5rem 0}.esh-basket-items--border:last-of-type{border-color:transparent}.esh-basket-item{font-size:1rem;font-weight:300}.esh-basket-item--middle{line-height:8rem}@media screen and (max-width:1024px){.esh-basket-item--middle{line-height:1rem}}.esh-basket-item--mark{color:#00a69c}.esh-basket-image{height:8rem}.esh-basket-input{line-height:1rem;width:100%}.esh-basket-checkout{border:none;border-radius:0;background-color:#83d01b;color:#fff;display:inline-block;font-size:1rem;font-weight:400;margin-top:1rem;padding:1rem 1.5rem;text-align:center;text-transform:uppercase;transition:all .35s}.esh-basket-checkout:hover{background-color:#4a760f;transition:all .35s}.esh-basket-margin12{margin-left:12px}.esh-basketstatus{cursor:pointer;display:inline-block;float:right;position:relative;transition:all .35s}.esh-basketstatus.is-disabled{opacity:.5;pointer-events:none}.esh-basketstatus-image{height:36px;margin-top:.5rem}.esh-basketstatus-badge{background-color:#83d01b;border-radius:50%;color:#fff;display:block;height:1.5rem;left:50%;position:absolute;text-align:center;top:0;transform:translateX(-38%);transition:all .35s;width:1.5rem}.esh-basketstatus:hover .esh-basketstatus-badge{background-color:transparent;color:#75b918;transition:all .35s}.esh-catalog-hero{background-image:url("../images/main_banner.png");background-size:cover;height:260px;width:100%}.esh-catalog-title{position:relative;top:74.28571px}.esh-catalog-filters{background-color:#00a69c;height:65px}.esh-catalog-filter{background-color:transparent;border-color:#00d9cc;color:#fff;cursor:pointer;margin-right:1rem;margin-top:.5rem;outline-color:#83d01b;padding-bottom:0;padding-left:.5rem;padding-right:.5rem;padding-top:1.5rem;min-width:140px;-webkit-appearance:none}.esh-catalog-filter option{background-color:#00a69c}.esh-catalog-label{display:inline-block;position:relative;z-index:0}.esh-catalog-label::before{color:rgba(255,255,255,.5);content:attr(data-title);font-size:.65rem;margin-top:.65rem;margin-left:.5rem;position:absolute;text-transform:uppercase;z-index:1}.esh-catalog-label::after{background-image:url("../images/arrow-down.png");height:7px;content:'';position:absolute;right:1.5rem;top:2.5rem;width:10px;z-index:1}.esh-catalog-send{background-color:#83d01b;color:#fff;cursor:pointer;font-size:1rem;transform:translateY(.5rem);padding:.5rem;transition:all .35s}.esh-catalog-send:hover{background-color:#4a760f;transition:all .35s}.esh-catalog-items{margin-top:1rem}.esh-catalog-item{text-align:center;margin-bottom:1.5rem;width:33%;display:inline-block;float:none !important}@media screen and (max-width:1024px){.esh-catalog-item{width:50%}}@media screen and (max-width:768px){.esh-catalog-item{width:100%}}.esh-catalog-thumbnail{max-width:370px;width:100%}.esh-catalog-button{background-color:#83d01b;border:none;color:#fff;cursor:pointer;font-size:1rem;height:3rem;margin-top:1rem;transition:all .35s;width:80%}.esh-catalog-button.is-disabled{opacity:.5;pointer-events:none}.esh-catalog-button:hover{background-color:#4a760f;transition:all .35s}.esh-catalog-name{font-size:1rem;font-weight:300;margin-top:.5rem;text-align:center;text-transform:uppercase}.esh-catalog-price{text-align:center;font-weight:900;font-size:28px}.esh-catalog-price::before{content:'$'}.esh-orders{min-height:80vh;overflow-x:hidden}.esh-orders-header{background-color:#00a69c;height:4rem}.esh-orders-back{color:rgba(255,255,255,.4);line-height:4rem;text-transform:uppercase;text-decoration:none;transition:color .35s}.esh-orders-back:hover{color:#fff;transition:color .35s}.esh-orders-titles{padding-bottom:1rem;padding-top:2rem}.esh-orders-title{text-transform:uppercase}.esh-orders-items{height:2rem;line-height:2rem;position:relative}.esh-orders-items:nth-of-type(2n+1):before{background-color:#eef;content:'';height:100%;left:0;margin-left:-100vw;position:absolute;top:0;width:200vw;z-index:-1}.esh-orders-item{font-weight:300}.esh-orders-item--hover{opacity:0;pointer-events:none}.esh-orders-items:hover .esh-orders-item--hover{opacity:1;pointer-events:all}.esh-orders-link{color:#83d01b;text-decoration:none;transition:color .35s}.esh-orders-link:hover{color:#75b918;transition:color .35s}.esh-orders_detail{min-height:80vh}.esh-orders_detail-section{padding:1rem 0}.esh-orders_detail-section--right{text-align:right}.esh-orders_detail-titles{padding-bottom:1rem;padding-top:2rem}.esh-orders_detail-title{text-transform:uppercase}.esh-orders_detail-items--border{border-bottom:1px solid #eee;padding:.5rem 0}.esh-orders_detail-items--border:last-of-type{border-color:transparent}.esh-orders_detail-item{font-size:1rem;font-weight:300}.esh-orders_detail-item--middle{line-height:8rem}@media screen and (max-width:768px){.esh-orders_detail-item--middle{line-height:1rem}}.esh-orders_detail-item--mark{color:#83d01b}.esh-orders_detail-image{height:8rem}.esh-orders_new{min-height:80vh}.esh-orders_new-header{background-color:#00a69c;height:4rem}.esh-orders_new-back{color:rgba(255,255,255,.4);line-height:4rem;text-decoration:none;text-transform:uppercase;transition:color .35s}.esh-orders_new-back:hover{color:#fff;transition:color .35s}.esh-orders_new-section{padding:1rem 0}.esh-orders_new-section--right{text-align:right}.esh-orders_new-placeOrder{background-color:#83d01b;border:0;border-radius:0;color:#fff;display:inline-block;font-size:1rem;font-weight:400;margin-top:1rem;padding:1rem 1.5rem;text-align:center;text-transform:uppercase;transition:all .35s}.esh-orders_new-placeOrder:hover{background-color:#4a760f;transition:all .35s}.esh-orders_new-titles{padding-bottom:1rem;padding-top:2rem}.esh-orders_new-title{font-size:1.25rem;text-transform:uppercase}.esh-orders_new-items--border{border-bottom:1px solid #eee;padding:.5rem 0}.esh-orders_new-items--border:last-of-type{border-color:transparent}.esh-orders_new-item{font-size:1rem;font-weight:300}.esh-orders_new-item--middle{line-height:8rem}@media screen and (max-width:768px){.esh-orders_new-item--middle{line-height:1rem}}.esh-orders_new-item--mark{color:#83d01b}.esh-orders_new-image{height:8rem}.esh-header{background-color:#00a69c;height:4rem}.esh-header-back{color:rgba(255,255,255,.5) !important;line-height:4rem;text-transform:uppercase;text-decoration:none;transition:color .35s}.esh-header-back:hover{color:#fff !important;transition:color .35s}.esh-identity{line-height:3rem;position:relative;text-align:right}.esh-identity-section{display:inline-block;width:100%}.esh-identity-name{display:inline-block}.esh-identity-name--upper{text-transform:uppercase}@media screen and (max-width:768px){.esh-identity-name{font-size:.85rem}}.esh-identity-image{display:inline-block}.esh-identity-drop{background:#fff;height:0;min-width:14rem;right:0;overflow:hidden;padding:.5rem;position:absolute;top:2.5rem;transition:height .35s}.esh-identity:hover .esh-identity-drop{border:1px solid #eee;height:7rem;transition:height .35s}.esh-identity-item{cursor:pointer;display:block;transition:color .35s}.esh-identity-item:hover{color:#75b918;transition:color .35s}.esh-pager-wrapper{padding-top:1rem;text-align:center}.esh-pager-item{margin:0 5vw}.esh-pager-item--navigable{display:inline-block;cursor:pointer}.esh-pager-item--navigable.is-disabled{opacity:0;pointer-events:none}.esh-pager-item--navigable:hover{color:#83d01b}@media screen and (max-width:1280px){.esh-pager-item{font-size:.85rem}}@media screen and (max-width:1024px){.esh-pager-item{margin:0 4vw}}
\ No newline at end of file
diff --git a/src/Web/WebSPA/Dockerfile.nanowin b/src/Web/WebSPA/Dockerfile.nanowin
new file mode 100644
index 000000000..700c23391
--- /dev/null
+++ b/src/Web/WebSPA/Dockerfile.nanowin
@@ -0,0 +1,8 @@
+FROM microsoft/dotnet:1.1-runtime-nanoserver
+SHELL ["powershell"]
+ARG source
+WORKDIR /app
+RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
+EXPOSE 80
+COPY ${source:-obj/Docker/publish} .
+ENTRYPOINT ["dotnet", "WebSPA.dll"]
diff --git a/test/Services/FunctionalTests/Extensions/HttpClientExtensions.cs b/test/Services/FunctionalTests/Extensions/HttpClientExtensions.cs
new file mode 100644
index 000000000..a41ffd3a2
--- /dev/null
+++ b/test/Services/FunctionalTests/Extensions/HttpClientExtensions.cs
@@ -0,0 +1,18 @@
+using Microsoft.AspNetCore.TestHost;
+using System;
+using System.Collections.Generic;
+using System.Net.Http;
+using System.Text;
+
+namespace FunctionalTests.Extensions
+{
+ static class HttpClientExtensions
+ {
+ public static HttpClient CreateIdempotentClient(this TestServer server)
+ {
+ var client = server.CreateClient();
+ client.DefaultRequestHeaders.Add("x-requestid", Guid.NewGuid().ToString());
+ return client;
+ }
+ }
+}
diff --git a/test/Services/FunctionalTests/Services/Ordering/OrderingScenarios.cs b/test/Services/FunctionalTests/Services/Ordering/OrderingScenarios.cs
index 756bbed2a..5f52e1771 100644
--- a/test/Services/FunctionalTests/Services/Ordering/OrderingScenarios.cs
+++ b/test/Services/FunctionalTests/Services/Ordering/OrderingScenarios.cs
@@ -1,4 +1,5 @@
-using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
+using FunctionalTests.Extensions;
+using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
using Newtonsoft.Json;
using System;
@@ -19,7 +20,7 @@ namespace FunctionalTests.Services.Ordering
{
using (var server = CreateServer())
{
- var client = server.CreateClient();
+ var client = server.CreateIdempotentClient();
// GIVEN an order is created
await client.PostAsync(Post.AddNewOrder, new StringContent(BuildOrder(), UTF8Encoding.UTF8, "application/json"));
@@ -62,7 +63,7 @@ namespace FunctionalTests.Services.Ordering
order.AddOrderItem(new OrderItemDTO()
{
ProductId = 1,
- Discount = 12M,
+ Discount = 8M,
UnitPrice = 10,
Units = 1,
ProductName = "Some name"
diff --git a/test/Services/IntegrationTests/Services/Extensions/HttpClientExtensions.cs b/test/Services/IntegrationTests/Services/Extensions/HttpClientExtensions.cs
new file mode 100644
index 000000000..00ed918b6
--- /dev/null
+++ b/test/Services/IntegrationTests/Services/Extensions/HttpClientExtensions.cs
@@ -0,0 +1,18 @@
+using Microsoft.AspNetCore.TestHost;
+using System;
+using System.Collections.Generic;
+using System.Net.Http;
+using System.Text;
+
+namespace IntegrationTests.Services.Extensions
+{
+ static class HttpClientExtensions
+ {
+ public static HttpClient CreateIdempotentClient(this TestServer server)
+ {
+ var client = server.CreateClient();
+ client.DefaultRequestHeaders.Add("x-requestid", Guid.NewGuid().ToString());
+ return client;
+ }
+ }
+}
diff --git a/test/Services/IntegrationTests/Services/Ordering/OrderingScenarios.cs b/test/Services/IntegrationTests/Services/Ordering/OrderingScenarios.cs
index ba77a3e7c..3e2350c9d 100644
--- a/test/Services/IntegrationTests/Services/Ordering/OrderingScenarios.cs
+++ b/test/Services/IntegrationTests/Services/Ordering/OrderingScenarios.cs
@@ -1,5 +1,7 @@
namespace IntegrationTests.Services.Ordering
{
+ using IntegrationTests.Services.Extensions;
+ using Microsoft.AspNetCore.TestHost;
using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
using Newtonsoft.Json;
using System;
@@ -28,9 +30,9 @@
public async Task AddNewOrder_add_new_order_and_response_ok_status_code()
{
using (var server = CreateServer())
- {
+ {
var content = new StringContent(BuildOrder(), UTF8Encoding.UTF8, "application/json");
- var response = await server.CreateClient()
+ var response = await server.CreateIdempotentClient()
.PostAsync(Post.AddNewOrder, content);
response.EnsureSuccessStatusCode();
@@ -44,7 +46,7 @@
{
var content = new StringContent(BuildOrderWithInvalidExperationTime(), UTF8Encoding.UTF8, "application/json");
- var response = await server.CreateClient()
+ var response = await server.CreateIdempotentClient()
.PostAsync(Post.AddNewOrder, content);
Assert.True(response.StatusCode == System.Net.HttpStatusCode.BadRequest);
@@ -102,5 +104,5 @@
return JsonConvert.SerializeObject(order);
}
- }
+ }
}