如何在asp.net中创建Web应用程序的exe [英] How to create exe of a web application in asp.net

查看:56
本文介绍了如何在asp.net中创建Web应用程序的exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用Visual Studio 2010创建在asp.net中创建的网站的exe.我不知道是否可以创建Web应用程序的exe,但是我希望我的数据库应用程序能够在另一个可以运行Visual Studio或不可以使用Visual Studio的系统上运行,并且我的代码不应该可见使用该exe或运行该项目的用户.我该如何实现?!

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?!

推荐答案

发布到旧线程,但是我遇到了这种情况并找到了解决方案.跟随Spring Boot和其他容器化解决方案的脚步,我相信现在Microsoft也已添加了此功能.

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.

我的情况:创建了一个基本的基于REST的Web应用程序并进行了构建.在Web应用程序根目录下\ bin内创建了Debug and Release文件夹.

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.

它还会创建一个exe文件.

It also creates an exe file.

只需要必要的运行时依赖项(例如,在我的情况下为.NetCore 3.1等)即可运行此exe.

You just need the necessary runtime dependencies (like .NetCore 3.1 etc in my case) to run this exe.

我将整个Web应用程序文件夹复制到Windows Server2016.最初存在一些问题,但是后来当我添加所需的依赖项(我的较早机器中存在的dotnet文件夹)时,它就像一个魅力.

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.

这篇关于如何在asp.net中创建Web应用程序的exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆