I've developed a machine control application that needs a technician panel - local and remote (internal local network). I thought a good way to avoid duplicate coding is use Blazor Web Assembly application, launch it locally in a WebView2 control or externally on the technician laptop and communicate with the system using gRPC.
All is well but one issue - I don't have and do not want to run a web server on the machine's computer.
Is there a way I can launch a web assembly application (Blazor) directly from a local file?
One thing you could try is launching it as a desktop application using Electron or WebWindow.
WebWindow is experimental, but a lot lighter than Electron. (See https://github.com/SteveSandersonMS/WebWindow)
Here is an article about using Electron and blazor WASM. https://medium.com/cloudnimble/bringing-your-blazor-apps-to-the-desktop-with-electronnet-blazor-67701bff82f7
You could also compile it to static html files and use a mini Python HTTP server to serve up the files. If you use Python 3 you can run the python -m http.server [port] command from the publish\wwwroot directory to serve up the files locally. You then just navigate to localhost:[port]to access your app.
Hopefully at least one of these approaches helps you.
Related
I am trying to learn how to use the ASP.NET framework; I'm already familiar with C# having already used it for desktop utilities a couple of times.
I have a hosted VPS that I want to host a project on, which I then want to work on from my local machine. I have tried using VSCode on my MacBook to work on the files before re-uploading them to the web server with SFTP, and then running the project server-side with dotnet run. This doesn't work, however, because it doesn't open port 5000 externally so I'm unable to view the project.
This probably just comes down to how much of a novice I am when it comes to ASP.NET. How do you or your organisation go about working on a project based on a server? Do I need to install the core on my local machine and run it locally before uploading changes back to the server with SFTP, or is there something I'm missing?
I have to create an exe of an website created in asp.net using visual studio 2010.
I don't known whether exe of web application can be created or not, but I want that my application with database will be able to run on another system where visual studio will or will not be there.And my code should not to be visible to the users using that exe or running that project.
How can I achieve it?!
you can't make a exe for web application but you can do one thing to solve your problem
1)make a window project in this project make a code for run iis and open browser with your web application url and make your window application form hide
2) now make exe of your window application project
You cannot create an executable file in asp.net.
All you can do is create a website using visual studio. once done, publish your website. Deploy it to IIS or host it to a paid web hosting company so you can have your domain. Once done, other users can see your beautiful and elegant website.
You don't create exe of a web application. It is hosted on IIS. So first of all you have to publish your website and then you can host it. For more information you can refer to this one:http://msdn.microsoft.com/en-us/library/20yh9f1b%28v=vs.100%29.aspx Or google for more articles.
Posting to an old thread, but I came across this situation and found the solution.
Following footsteps of Spring Boot and other containerized solutions, I believe now Microsoft also has added this feature.
My scenario: Created a basic REST based Web application and built it.
This created Debug and Release folder within \bin within the root directory of Web application.
It also creates an exe file.
You just need the necessary runtime dependencies (like .NetCore 3.1 etc in my case) to run this exe.
I copied the entire Web application folder to a Windows Server 2016. There were some issues initially, however later when I added the required dependencies (dotnet folder which was present in my earlier machine), it worked like a charm.
I have an unlimited Windows Hosting package on a Windows Server 2012. I wish to run a game server of some game which can run on windows hosts by executing an EXE file (that opens a Console, CMD-like window) - that means, if you want to run a server on your local computer you can simply run this application and use your internet's IP. I want to use my web address as an IP but however my question is: Can a Windows Server (2012) execute files?
Yes. With many *BUT*s and *IF*s. First of all nearly all hosting packages differs for purposes. If your hosting not game hosting hosting firm will not allow you using their processing power.
What I am trying to do:
I have a bat file that I want to execute via a button on the web page. This web page will then execute the command responses while the process is running.
I have managed successfully to get the bat file to run on my button click and output the responses on the page on my localhost, however I am sure I will encounter permission issues when I deploy my app onto qa,staging,production server. The reason being because the bat file is outside the web folder and I'm sure the error will be something like Access Denied
The web application is run using form authentication on a win2003 running IIS6.
The bat file is outside the web root as it sits under a application we deploy via a wix that includes a suite that has services, libraries, etc under it.
I thought about using impersonation but when looking on the web all the examples I found were for Windows authentication so I'm guessing I can rule this option out.
Any advice will be much appreciated
Kind Regards
Zal
I am using VS2008 C# and testing on my local XP Pro PC with local IIS, I have wrote a web service to call a third party software .exe file to use svn checkout commands to insert data into a folder, which use System.Diagnostics.Process.Start . The same codes did work when I use VS2008 build-in ASP.NET Development Server(http://localhost:2999/MyServices/MyServices.asmx). but when I use IIS normal URL(http://developer/MyServices/MyServices.asmx) to run Process.Start on the web service, it just haunlted and not doing anything.plz send one sample program.
This is most likely down to the user being used to run the code. When using the built-in server, it is running as the same user as Visual Studio is running as. When in IIS, it will be running as the MACHINENAME\ASPNET user.
If the process you are starting cannot execute as the MACHINENAME\ASPNET user, it will not work when hosted in IIS unless you change your configuration to change the user it runs as. See this page for more info on what users are used for what in IIS.