Click here to Skip to main content
14,271,952 members
   

ASP.NET

 
GeneralRe: SOAP and using a Class containing two sub classes with same name problem Pin
Martin Stevens10-May-19 20:03
memberMartin Stevens10-May-19 20:03 
GeneralRe: SOAP and using a Class containing two sub classes with same name problem Pin
jkirkerx12-May-19 13:03
professionaljkirkerx12-May-19 13:03 
Questionprint sql data from vb Pin
Member 1433060825-Apr-19 1:17
memberMember 1433060825-Apr-19 1:17 
AnswerRe: print sql data from vb Pin
Afzaal Ahmad Zeeshan25-Apr-19 1:36
mveAfzaal Ahmad Zeeshan25-Apr-19 1:36 
QuestionSharing API's between multiple sites in IIS 8.5 Pin
Fred283424-Apr-19 21:39
memberFred283424-Apr-19 21:39 
AnswerRe: Sharing API's between multiple sites in IIS 8.5 Pin
Richard Deeming25-Apr-19 1:17
mveRichard Deeming25-Apr-19 1:17 
GeneralRe: Sharing API's between multiple sites in IIS 8.5 Pin
Fred283425-Apr-19 1:47
memberFred283425-Apr-19 1:47 
QuestionSo I finally got my Angular wrapped in .Net Core 2.2 app working in a Docker Container on a production server. Pin
jkirkerx16-Apr-19 11:14
professionaljkirkerx16-Apr-19 11:14 
Wow what a trip! Sort of excited that I finally got my app to work in a production environment.

Having to learn Docker like real fast, and then really having to understand how .Net Core 2.2 works. What made it worst was wrapping Angular V7 in .Net Core 2.2, making it much more complicated now. And then connecting it to MongoDB running in another container.

Working with VS2017 and Docker
VS2017 gives you the ability to run your .Net Core 2.2 app in a Docker for Windows container so you can test and debug. But after creating the container, you can't start it again unless you use VS2017 to run it again. What ends up happening is that VS2017 does 1/2 the work in the background and uses the needed components from your shared drive and you can't see it unless you look really close at the output. Now try and use release to build that app and put it in a container, still won't work because your missing the rest of the files needed to run it that are on your shared drive. When you go to peek inside a debug container, it's totally different than a release container. You have to alter your Dockerfile to copy the rest of the files needed to run isolated without a shared drive. Then when you push to Docker Hub you will have everything required.

Visual Studio 2017 will program your environment variables, but to run self contained you have to create them in your Dockerfile or docker-compose.yaml file. eg. DOTNET_RUNNING_IN_CONTAINER=true

VS2017 and Azure:
I actually got to the point where I thought that Docker support for VS2017 was locked into Azure, and that they didn't want us to host Docker containers ourselves, but that was not the case. What it boiled down to was going back to basics and building my project by command line to better understand how "dotnet" works and then build the Docker container. Once I understood the relationship between the two, I was able to go back to VS2017 and craft a better Dockerfile, and then compose it. But what works in Docker for Windows is a whole different story in Docker for Linux.

So to answer some questions that you may have:
Can you host your .Net Core 2.2 app in Docker just using Kestrel - YES
Can you program Kestrel to use SSL with an embedded PFX file - YES

Can you control Kestrel's ciphers such as TLS, no SSL - YES
Do you need a reverse proxy server such as Nginx - NO - so far I haven't had to
Will the stock Dockerfile work - NO - You have to modify it to your needs
Do the current MongoDB C# V2.8 drivers work with Docker and .Net Core 2.2 - YES - but programing the connection string is different than not being in a container. SHA256 auth errors.

Some Advice:
Learn "dotnet" command line first before learning Docker.
Carefully prepare your Programs.cs file for Docker, because if this file crashes your container startup, you won't be able to debug it. No logs, nothing. Add Logging to your Programs.cs will help isolate issues.
Don't hard code much, use json files instead.

Don't trust search engine results:
The most frustrating part is the ocean of outdated information on the internet. When I started learning Angular, all the information was outdated and for V2 and not V6. But it's been cleaned up now. It's the same for .Net Core 2.2 and Docker in which the info is outdated.

Port Numbers:
The other frustrating issue is port numbers. Why does .Net Core want to use ports like 5000, 5001?
When you develop for IIS, normally the port number is 44367 or something. I still don't have the answer for this but used ports 80,443 any ipAddress in Programs.cs and set the ip address in Docker. This took the longest to understand.

Version of Linux:
I tried 2 versions, CentOs and Ubuntu. Not being a fan of Ubuntu, I used it because of it's small footprint and builtin Docker, Docker-Compose support. The build size is so small, I think I can run this on a Raspberry. So Ubuntu Bionic Beaver V18 worked the best.

So what's next?
I'll cleanup my website content at home and run the Docker Compose production version for a couple of weeks. Then build the next server with Docker Swarm and see how that works.

Hope this helps someone looking to do the same thing.
March 16, 2019
If it ain't broke don't fix it
Discover my world at jkirkerx.com

SuggestionRe: So I finally got my Angular wrapped in .Net Core 2.2 app working in a Docker Container on a production server. Pin
Richard MacCutchan20-Apr-19 22:16
protectorRichard MacCutchan20-Apr-19 22:16 
GeneralRe: So I finally got my Angular wrapped in .Net Core 2.2 app working in a Docker Container on a production server. Pin
jkirkerx21-Apr-19 8:17
professionaljkirkerx21-Apr-19 8:17 
Questionwithout using session and querty string value pass in another form Pin
UDTWS14-Apr-19 23:39
memberUDTWS14-Apr-19 23:39 
AnswerRe: without using session and querty string value pass in another form Pin
Vinod Jangle15-Apr-19 7:44
memberVinod Jangle15-Apr-19 7:44 
QuestionExpiry date and Update Expiry Date Pin
Member 1370260513-Apr-19 1:49
memberMember 1370260513-Apr-19 1:49 
AnswerRe: Expiry date and Update Expiry Date Pin
Vinod Jangle15-Apr-19 7:55
memberVinod Jangle15-Apr-19 7:55 
GeneralMessage Closed Pin
29-Apr-19 23:47
membersakhto sazan29-Apr-19 23:47 
SuggestionRe: Expiry date and Update Expiry Date Pin
Richard Deeming15-Apr-19 8:25
mveRichard Deeming15-Apr-19 8:25 
AnswerRe: Expiry date and Update Expiry Date Pin
jkirkerx16-Apr-19 9:57
professionaljkirkerx16-Apr-19 9:57 
QuestionIn 3 tier architecture , filling textboxes with values from database table Pin
Member 1418527512-Apr-19 19:17
memberMember 1418527512-Apr-19 19:17 
AnswerRe: In 3 tier architecture , filling textboxes with values from database table Pin
Vinod Jangle15-Apr-19 7:49
memberVinod Jangle15-Apr-19 7:49 
GeneralRe: In 3 tier architecture , filling textboxes with values from database table Pin
Member 1418527515-Apr-19 8:46
memberMember 1418527515-Apr-19 8:46 
GeneralRe: In 3 tier architecture , filling textboxes with values from database table Pin
Vinod Jangle15-Apr-19 10:05
memberVinod Jangle15-Apr-19 10:05 
GeneralRe: In 3 tier architecture , filling textboxes with values from database table Pin
Member 1418527515-Apr-19 16:46
memberMember 1418527515-Apr-19 16:46 
GeneralRe: In 3 tier architecture , filling textboxes with values from database table Pin
Vinod Jangle16-Apr-19 3:18
memberVinod Jangle16-Apr-19 3:18 
GeneralRe: In 3 tier architecture , filling textboxes with values from database table Pin
Member 1418527516-Apr-19 3:51
memberMember 1418527516-Apr-19 3:51 
GeneralRe: In 3 tier architecture , filling textboxes with values from database table Pin
Vinod Jangle16-Apr-19 4:01
memberVinod Jangle16-Apr-19 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.