如何在自己的服务器中自托管ASP.NET [英] How to self-host ASP.NET in own server

查看:64
本文介绍了如何在自己的服务器中自托管ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个问题 - 如何在自己的服务器中自我托管ASP.NET?我搜索过但无法理解这些例子。也许有人可以发布一个好的教程(初学者)或源代码。我已经安装了nuget包

Hi,

I've a question - how to self-host ASP.NET in own server? I've searched but can't understand those examples. Maybe somebody can post a good tutorial (for beginners) or source code. I've already installed nuget package

Microsoft.AspNet.WebApi.SelfHost



如何使用它?我需要做些什么来让它主持一些asp(x)页。





希望你理解,

谢谢!


How to use this? what I have to do to make it host some asp(x) pages.


Hope You understood,
Thanks!

推荐答案

请仔细阅读以下文章。



教程

自托管Web API(C#) [ ^ ]。



示例代码

[MSDN] ASP.NET Web API自助主机 [ ^ ]。
Please go through the below articles.

Tutorial
Self-Host a Web API (C#)[^].

Sample Code
[MSDN] ASP.NET Web API Self-Host[^].


请访问此链接

HTTP://www.c-sharpcorner .com / UploadFile / 2b481f / self-hosting-in-Asp-Net-web-api / [ ^ ]
please Visit this link
http://www.c-sharpcorner.com/UploadFile/2b481f/self-hosting-in-Asp-Net-web-api/[^]


您是否尝试使用IIS托管网站?如果未安装IIS,则可以从添加删除Windows组件中安装它。通过创建Web应用程序/虚拟目录在IIS上托管您的网站,并使用localhost / YourWebAppName在浏览器中打开。



请参阅链接 [ ^ ]了解更多详情。
Have you tried to host website using IIS? If IIS not installed then you can install it from Add Remove Windows Components. Host your website on IIS by creating Web Application/Virtual Directory and open in Browser using localhost/YourWebAppName.

Refer link [^] for more details.


这篇关于如何在自己的服务器中自托管ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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