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
Related
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.
I have a C# Web API and Web Application that is an all-in-one program. This project is going to be hosted on my company's intranet. I'm attempting to setup a mail merge process within this Web API using Microsoft.Office.Interop.Word. It works just fine when debugging. The mail merge template file is hosted at C:\inetpub\wwwroot\MailMergeTemplate\Template.docx.
However, this stops working as soon as I deploy the website to IIS. Every time I attempt to run the merge I'm met with a HTTP 500 Internal Server Error. I tried to move the template to a mapped network drive but that didn't work. I also made a different web directory for the template via IIS and put the file in there. I could browse to the folder via Chrome just fine and could see and download the template. But this didn't work either.
How should I host a mail merge template so the Web Application can see it and access it? Is this even possible?
I tried publishing a WPF application using my own Localhost as a server. But whenever I try publishing it, it says that the application was unable to find the end point web page used to display the installation instructions.
I read somewhere that there is no way to publish to a Localhost using ClickOnce. Is it true? Or is there any other way to work around this?
I found a way to copy the published files to any server and use them by downloading from there.
I opened up Command Prompt, navigated to the local path where the application is published and changed the URL of the setup.exe to the server in which we are going to place them.
For example: My application was published into C:\inetpub\wwwroot. So using Command prompt (better with administrative privileges) I navigated to
c:\cd c:\inetpub\wwwroot
c:\inetpub\wwwroot>setup.exe /URL=http://servername/test
After successful execution, we can copy all the files from C:\inetpub\wwwrooot into the servername/test folder in server and can browse the server to download and install the application from anywhere with authentication.
So I'm trying to publish my .net application using Visual Studio 2015, and every time that i upload the files to the website, and then I enter the URL to my browser, it just automatically downloads the .aspx file instead of showing it like it should? What should I do?
I am "publishing" the application by simply zipping up the entire project and unzipping it to my public html. I have tried "publishing" using the FTP, and the result is the same when I zip and unzip on the website file manager in the control panel.
I have managed to run and execute it using IIS (Internet Information Server), and it works with no flaws! Though whenever I copy the files over to my web host's control panel (cPanel via TrentaHost), the website does not work.
This has been bugging me for about 3 weeks, if anyone has some knowledge please help me out!
Here is a link of what I am working on http://www.liverytrader.com/Default.aspx
You're using cPanel:
cPanel is a Linux based web hosting control panel that provides a
graphical interface and automation tools designed to simplify the
process of hosting a web site.
It means that you're hosting on Lynux, which doesn't support ASP.NET.
You need to find ASP.NET hosting to publish ASP.NET application.
You probably need to register asp.net with iis in the command prompt by running this command:
aspnet_regiis -i
Read about it here
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.