.Net Core, Web App Executes Console App [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I have a .net 2 Core web app on windows IIS. No issues with the web app. How can I successfully run:
1) a .net core console app;and
2) a regular windows executable?
The console app is needed because of the work passed to it can take several minutes - sometimes up to 10 minutes to complete. Probably too long to expect a user to keep their browser open.
I have tried using "System.Diagnostics.Process" on the windows app with much success. I figured before I started trying with the Core app, I would get some suggestions. Let me know if any additional information is needed.

Console app in .net core 2 has a lot of new features in it, explaining it in a nutshell is a little bit complicated.
I would suggest starting from this
guide
on git hub which sums it up really good.
I would also recommend looking into this post regarding Windows Executable (which is about .net core 1.0 but is more or less the same) and this article.
Those will be a good place for you to start.

I'm not sure if this will be useful, But you can try the task scheduler to call the app. Gets rid of a lot of permission problems.

Related

Does it make sense to work on a c# project, for a windows server, developing it on linux? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm a PHP/JS developer, now I have a proposition of making a project based on C#, which would then work on a Windows server.
I have no experience with either (C# or Windows server) but I was given some time to learn it, if we agree on the details.
The project is about an API (web service, RESTful).
And now I have two questions - I haven't touched Windows for about 10 years, so:
Am I right that I have to learn C# and the .NET framework? Is the .NET some sort of standard on MS servers?
Is this reasonable to work on the project using Linux machine as the work environment and then upload it to the Windows test server for testing?
BTW, right now the project is very simple, probably only a few classes. If I'll make it, I can later install Windows on my workspace, but for this very small project, where time allowed for the implementation is about one day (excluding my learning process) I would prefer to avoid it.
C# is a programming language, .NET is a framework. There is an old .NET Framework that is windows only and the newer .NET Core (the newest version is called just .NET 5), which is cross-platform.
You can develop .NET core apps on linux as well. Note that you won't be able to use Visual Studio (IDE), which is only available for Windows and Mac.

Fetch data from Google FIT API to crossplattform-App (using Xamarin,VisualStudios, C#) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I hope there is someone here who could help me:
Due to a project for the university I'm trying to implement a cross-platform app (using Xammarin&Visualstudios&C#). We want to send vitaldata (like steps, pulse, ecg, etc.) from our Smartwatches to the Google Fit App and then integrate the data from the Google Fit API into our own App. It's the first time I'm working with an API and I don't really understand how I can implement it. There are several examples on the internet and also instructions directly from Google (https://developers.google.com/fit/android/get-started), but they are not designed for Visual Studios and Xamarin. Furthermore the packages used there are not available for Xamarin.
What I have found out and implemented so far:
OAuth at the Google Console
the NuGet package is apparently called Google.Apis.Fitness.v1 (https://googleapis.dev/dotnet/Google.Apis.Fitness.v1/latest/api/Google.Apis.Fitness.v1.html)
What would be the appropriate steps to take? Do I first have to create a client and how do I do that? For example, how do I access the "steps" counter?
It would be very nice if someone could help me with the implementation.
Thanks a lot

Easiest way to expose a Framework 4.7.2 library as a Web API [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have a library created with Visual Studio 2019 and C#, that basically exposes a method that takes a textfile, doing some magic and returning a JSON. Target Framework is 4.7.2, the GUI is WPF. Now I want to expose this method as Web API.
When I started to check the .NET Framework options I totally got confused by Core 3.1, Standard 2.0 and what else. After some readings I guess it would be best to simply wait for .NET 5.0, but I want to do it now. So any suggestions what's the fastest way to get it done? I'm pretty free what to use, but I guess a .NET websomething that can access my library would be the best?
Thanks in advance,
Frank
As you said, I do believe you are confused about this whole .Net Core and .Net Standard story, please reffer to this documentation link in order to get some clarification.
As for exposing your method to be consumed as an API, you can do it using C# in the following ways:
Azure Functions will give you a serverless way to make your code available.
ASP.NET Web API 2 will give you a very MVC-like perspective on offering your code as an API.
In both ways you'll be able to consume your 4.7.2 .Net Framework library.

Developing an Asp.net MVC website : which requirements? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm about to develop an ASP.NET Mvc website for a startup. I've never done this before, so i have few architecture/infrastructure asks.
1/ Is it reasonable to develop the website in Asp.NET Core MVC ? I've read several times that the technology may not be mature for the next 1-2 years.
2/ In a first time, i'll have a low budget. Knowing this, would it be possible to use TFS ? IIS ? Sql Server ? If it is too expansive, which are the alternatives ?
3/ Should i host the website using Microsoft Azure ?
Thanks for your help.
I can share my own experience on this matter. The definite answer is yes.
Yes, it is reasonable. You have mentioned it would be a startup, so you are fortunate to try latest technologies. Microsoft has actually released .NET Core and they are offering long term support for the release. Microsoft takes LTS seriously. I am using ASP Core from early beta and although there were some problems back then, it is quite stable now.
TFS, IIS and SQL Server are different products for different purposes. Thankfully, you do not have to stick with Microsoft stack entirely. I am using PostgresSQL (with Entity Framework), Kestrel + NGINX on Linux (Ubuntu 16) and Git (gitlab). All of them are stable, open source and no worse than Microsoft solutions.
In my personal experience Azure is great but too expensive. That was the main reason I tried moving to .NET Core instead of Windows only - I wanted to host it elsewhere. Given that the ASP Core is released, you have at least two options. You can self host (what I do) get cheap VPS from Google/DigitalOcean/Amazon/..., install ASP Core (or Docker) and be happy. This way is cheap, and you are in full control, but it requires some Linux Administration skills. The other way is to find non-Azure ASP hosting, like SmarterASP (just an example, not ad) and publish your product right from the Visual Studio.
To sum up, yes it is reasonable to build your app on ASP Core.

How to run windows service on Linux or Mac OS [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I have created windows service and it is working fine on Windows OS ,but we need to run this same service on Linux or Mac OS.
It is possible ?
Linux or macOS has its own way to manage "services", via systemd or supervisor or other mechanisms. Thus, you won't be able to ship the Windows app to such platforms, but you can write a .NET Core console app based on the same logic and then put it under systemd or the desired tool on such OS.
Obviously "possible", in the worst case reprogramming from scratch. I'm guessing the winforms tag you've used suggests what you think the biggest porting headache will be. Maybe check out C# WinForms application to linux which seems to be asking that same question. An even easier approach might (emphasize "might") be to run virtualbox https://www.pcsteps.com/184-install-virtualbox-linux-mint-ubuntu/ (or see many similar pages, and many similar vm's) under linux, and then just run your service on a windows virtual machine.

Categories

Resources