Category: .NET Core
-
Configure Angular Environment(local and remote) and CORS for .NET Core – part 43
I want to be capable to run Angular with data obtained from local .NET project in development – and from remote website in production. One of the techniques is detailed here https://angular.io/guide/build Generated service : ng g s banks Now I want to see that every modification of the Bankservice will re-compile. Tried in Docker…
-
Adding Angular to WebAPI site-part 41
First,I want to add an index.html file – to see the result. For this,I add to the startup: public void Configure(IApplicationBuilder app,IWebHostEnvironment env) //more code app.UseDefaultFiles(); app.UseStaticFiles(); I also add an index.html into a wwwroot folder ( also created into the root) You can see the modifications here: https://github.com/ignatandrei/InfoValutar/commit/4deb32528aee7b667f22a38c8e96899052cbfd4c Now I want to compile the…
-
Last Commit info–GitHub and AzureDevOps–part 39
I was thinking that I need to see the date of last CD – who done what. For this,I need 2 things: to have a controller/gui to show the info and the CD process,via GitHub/AzureDevOps,to take care of that. For the part with code,the problem was pretty simple: What about the CD process…
-
Exchange rates–what I have done in 37 hours–part 38
What I have create for now in 37 hours : A source control – https://github.com/ignatandrei/InfoValutar A plugin based software – you can use to load any kind of exchange rates,for anywhere,provided that you implement the interface – see implementation Tests for some of the code Deployment: An Azure WebAPP WebAPI deployment – https://infovalutar.azurewebsites.net/swagger/index.html A Docker…
-
Azure functions – final–part 37
So,I said,now just retrieve data – and put on database: try { log.Info(“trying to save”); ISave save = new SaveSqlServer(null); await save.Save(data.ToArray()); } catch(Exception ex) { log.Error($”ERROR !! {ex.Message}”); } This gives me a new whole error: ERROR !! Could not load type ‘System.IAsyncDisposable’ from assembly ‘netstandard,Version=2.1.0.0,Culture=neutral,PublicKeyToken=cc7b13ffcd2ddd51’. Ok. Coming from start: What I want ?…
-
IAsyncEnumerable transformed to IEnumerable and making Azure Functions works- part 36
Last time I have had problems because of IAsyncEnumerable not be loaded from SystemRuntime. Decided to modify code to use instead Task<Ienumerable> The code modifications were interesting await foreach (var e in nbr.GetActualRates()) //versus foreach (var e in await nbr.GetActualRates()) yield return exch; //versus adding to a list and return the list ret.Add(exch); var data…
-
Azure function–solving my own code problems–part 35
1. My fault – the plugins does not exists in output this should be added to the output in order to the plugins to be copied to the output directory <ItemGroup> <None Remove=”plugins\” /> <Content Include=”plugins\**\*.dll” CopyToOutputDirectory=”Always” /> </ItemGroup> 2. Deploying,I should see what it is convenient: context.FunctionDirectory OR context.FunctionAppDirectory log.LogInformation($”!!! C# Timer trigger function…
-
Loading data regularly–deploy plugins–Azure Function–part 34
Now I have broken the build. Why ?Because of the docker file – to be optimized on local,I copy ecah csproj one by one and the I do dotnet restore. (If docker had a glob patttern! ) . So each time that I put a new project,the build will fail! Trying now from the Azure…
-
Loading data at regular intervals–Azure function –part 33
I need to load data at scheduled intervals – it is normal that the exchange rates are published every day. So what options we have in Azure? WebJobs Worker Roles Azure functions After reading a lot,I decide on Azure Functions – it is the new kid on the block and battle tested. More,it has something…
-
Try Dot Net–again–part 32
I wanted to put my project on the .NET try – it is a wonderful tool that makes magic for .NET . However,I wanted to be in a docker container. I have open a issue here: https://github.com/dotnet/try/issues/590 It was resolved – now I can specify the port But the problem now it is that cannot…