惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
T
Troy Hunt's Blog
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
U
Unit 42
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
IT之家
IT之家
Google Online Security Blog
Google Online Security Blog
Cloudbric
Cloudbric
月光博客
月光博客
Hacker News: Ask HN
Hacker News: Ask HN
罗磊的独立博客
N
News and Events Feed by Topic
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
Hugging Face - Blog
Hugging Face - Blog
I
Intezer
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 聂微东
P
Privacy International News Feed
有赞技术团队
有赞技术团队
博客园_首页
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
O
OpenAI News
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tor Project blog
B
Blog
量子位
T
Threatpost
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Vulnerabilities – Threatpost
酷 壳 – CoolShell
酷 壳 – CoolShell
S
SegmentFault 最新的问题
L
LangChain Blog

博客园 - Ace001

win10 频繁蓝屏特别是在微信登录后磁盘读写占用率100%更容易蓝屏的尝试解决办法 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 c# 获取cpu温度 xshell把界面转发到xming ida 操作 mstsc带用户名密码自动登录 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 nuget控制台乱码的解决办法 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 chrome打开网站突然变的很卡的解决办法(可能是*** verge导致) - Ace001 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 ros1-编译并启动仿真环境
netcore如何在启动时拿到web运行端口
Ace001 · 2026-04-30 · via 博客园 - Ace001
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    var lifetime = app.ApplicationServices
        .GetRequiredService<IHostApplicationLifetime>();

    lifetime.ApplicationStarted.Register(() =>
    {
        var addresses = app.ServerFeatures
            .Get<Microsoft.AspNetCore.Hosting.Server.Features.IServerAddressesFeature>()
            ?.Addresses;

        if (addresses != null)
        {
            foreach (var address in addresses)
            {
                Console.WriteLine($"Listening on: {address}");
            }
        }
    });
}

Listening on: http://localhost:5000

posted @ 2026-04-30 13:50  Ace001  阅读(15)  评论(0)    收藏  举报