Can Windows Application Packaging be used to package a console web app? - console-application

I have a solution that creates two applications: an ASP.NET Core Web Console App (server) and a UWP app (client). Both installers are created using Windows Application Packaging Projects using sideloading. Building and testing the client and server apps are functioning as expected. Deploying (installing) the client and server apps on desktop PCs also seem to function as expected. However, when it comes to running the apps, only the client seems to be working as expected. When launching the server (console web app) it displays a console window then disappears immediately.
Since this is a console app, I opened a command prompt and changed directory to where this application is installed (C:\Program Files\WindowsApps\AppName). I attempted to run the console app from the command line and I got the message "Access Denied". Assuming this directory is locked down by the system, I decided to to test the console app functionality by copying the directory from C:\Program Files\WindowsApps to C:\Temp. I then changed directory to C:\Temp and attempted to run the program. It runs as expected. So there seems to be nothing wrong with my console web app other than it cannot run if installed in the WindowsApp location. I tried searching for information regarding using Windows Application Packaging to package console apps but I didn't have much luck. Would it help to add and app.manifest and set the "requestedExecutionLevel" to "requireAdministrator"? Should I use a different type of packaging for the console Web App?

Related

Degugging a react native / expo app with webstorm

I can't debug my react native / expo app in WebStorm, but I can in Visual Studio Code.
I have a react native app that I can successfully run using expo. I set up the configuration according to the info on this site:
https://blog.jetbrains.com/webstorm/2018/02/webstorm-2018-1-eap-181-3263/#debugging-expo
When I click "run" or "debug" and "Debug JS Remotely" is turned off, the bundler builds a JS bundle and the app starts on my devices.
But once I turn on "Debug JS Remotely", the bundler only says:
Starting custom debugger by executing: : [my working directory] [my working directory again]
and never goes on to build the JS bundle.
After a short while, a red screen appears on the device, and it says:
Unable to connect with remote debugger
Timeout while connecting to remote debugger
onFailure
DevSupportManagerImpl.java:851
onFailure
WebsocketJavaScriptExecutor.java:83
run
WebsocketJavaScriptExecutor.java:142
handleCallback
Handler.java:790
dispatchMessage
Handler.java:99
...
The bundler doesn't say anything more than the message above.
As soon as I turn off remote debugging, the the bundler starts building again and finishes with
"Building JavaScript bundle: finished in ...ms"
as usual, but the device, again, shows the red screen with aforementioned messages, or doesn't show anything but the regular white screen with a message at the bottom saying "Downlading JavaScript bundle 100,00%". I either have to stop and restart within WebStorm or I have to close the expo app and re-open it. Either way will make the app start again on my device.
This is my first time working with javascript, react native, expo, so I am not sure, but it should be possible to debug in WebStorm directly, right? As mentioned, in Visual Studio Code everything including debugging works fine, so I don't think it's anything in the code. Maybe someone here has an idea where the problem lies?
node -v: v11.6.0
react-native -v: react-native-cli: 2.0.1, react-native: 0.57.1
Any help will be greatly appreciated! Thanks in advance!
PROOF
HOWTO
Looks like there's been an update to how you can setup Configurations since you tried.
Try changing the Bundler host to 127.0.0.1 and try again.
I just setup Webstorm v2020.2 yesterday to debug my Expo application and it is working as expected.
These instructions were all that I required: https://www.jetbrains.com/help/webstorm/react-native.html#ws_react_native_create_run_config
On the main menu, go to Run | Edit Configurations, click icons.general.add.svg and select React Native from the list. The Run/Debug Configuration: React Native opens.
Choose whether you want WebStorm to build and launch the application for you:
Select the Build and launch checkbox if you are launching your application for the first time or if you have updated its native code since the last run.
If your application uses Expo, clear the checkbox because this bundler takes care of the process itself.
If you selected the Build and launch checkbox, choose the target platform, Android or iOS. Depending on your choice, WebStorm will run the bundler with react-native run-ios or with react-native run-android.
Optionally, type the arguments to be passed to React Native, for example, specify the simulator type through the ‑‑simulator flag: ‑‑simulator="iPhone 4s".
In the Bundler host field, specify the host where the React Native bundler runs, the default value is localhost.
If you are using Expo, change the default bundler host to ensure successful connection with the debugger. This connection may fail because WebStorm by default uses localhost to start debugging while Expo expects 127.0.0.1 or an external IP address depending on what is selected in Connection field of the Metro bundler configuration. See Debugging a React Native application that uses Expo for details.
In the Bundler port field, specify the port on which the React Native bundler runs, by default 8081 is chosen, learn more from the React Native official website.
Choose the Node.js interpreter to use. This can be a local Node.js interpreter or a Node.js on Windows Subsystem for Linux.
Specify the path to react-native-cli and the working directory of the application. Optionally, type the environment variables for react-native run-android or react-native run-ios.
By default, WebStorm starts the React Native bundler automatically when you invoke the run/debug configuration. If you have already started the bundler from outside WebStorm, for example, from the command line, you can re-use it without stopping and restarting. Select your bundler in the Before Launch area and click Remove.
The issue is tracked at WEB-35719, please follow it for updates

Django Server as a Windows Service

I have a batch File that runs Django Server and it works perfect.
c:\Python27\python.exe manage.py runserver 8003
and that I am using a 3rd Party app NSSM https://nssm.cc/
Which run my Batch file as a Windows Service.
the point is the Service does not start the Server. How can I run the server using this service; the service will open the cmd and execute the command.
Should I use another 3rd party app or is there any command that I can add to my batch file and update it the serive
If you want to run django as a Windows service for development purposes (see the comment above), I have had good luck with instsrv and srvany, both Windows tools that work on all Windows platforms. See https://www.iceflatline.com/2015/12/run-a-windows-application-as-a-service-with-srvany/ for details.

Cloud Foundry Java Applications on Windows Stack using Diego

I have a windows 2012 server stack on cloud foundry.
I am trying to push a Java application(.war package) to this stack using Diego plugin.
The logs says that server started properly , but when i hit the application URL, I get a 404 error.
The same package works perfectly fine on linux stack.
Any help appreciated
At the present time, Windows support is for running Windows apps.
1.) ASP .NET MVC (12-factor ASP.NET MVC apps compiled against .NET 3.5+ were tested most extensively)
2.) Windows-compiled executables
3.) Batch scripts (with a manually specified start command)
https://github.com/cloudfoundry-incubator/diego-windows-msi/blob/master/docs/RELEASE-NOTES.md#supported-applications---known-to-work
Build packs will continue to run apps on Linux.

Install Windows Service and Console Application using a single setup and deployment

I have created a console application that works as background app in C++. I am trying to run this application through windows service to start automatically if the app crashed.
What I can't do is to create a windows service which can trigger the xxx.exe.
How can I make this windows service AND background application as a single setup file for installation ?

Windows, Mingw Qt Application Does Not Run On Deployed Computers

I have created a Qt application with Mingw. The application runs properly on the development computer after copying the required DLL's to the directory. However, when deploying on external computers, the application does not run at all.
Update:
In addition, the application uses Sqlite3 via QtSql.
It's quite likely you're still missing some dll.
Check the Windows event log for any errors after running the application. (Administrative Tools->Event Viewer).
Try launching the application from a command prompt window.
Try Dependency Walker.
Another thought is some missing configuration file or registry settings.
Double check against the Qt docs for deploying Windows Qt applications.