.NET 4.8 Web应用程序启动Settings.json
我使用.NET 4.8 Web应用程序模板(OWIN)创建了一个新项目,并添加了OpenIdDict,但我似乎无法使用我
在项目中写的启动集来 使用IiseXpress运行它的方法配置身份验证的
启动
[assembly: OwinStartupAttribute(typeof(WebApp.Startup))]
namespace WebApp
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
...
部分
类
namespace WebApp
{
public partial class Startup
{
public void ConfigureAuth(IAppBuilder app)
{
...
的输出类型创建
使用
<OutputType>Library</OutputType>
的
我注意到这个项目是 我的启动集合是:
properties/lainingsettings.json
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55946/",
"sslPort": 44349
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
我是否需要在某个地方添加一些东西来告诉项目使用此启动集群?
该项目启动正确,但使用默认的IIS设置(无HTTPS,端口5000)
I created a new project using a .NET 4.8 Web Application Template (Owin), and i added OpenIddict, but i cant seem to find a way to run it with iisexpress using the launchSettings i wrote
in the project i added a Startup.cs with a partial class Startup to configure the authentication
Startup.cs
[assembly: OwinStartupAttribute(typeof(WebApp.Startup))]
namespace WebApp
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
...
where ConfigureAuth is declared in App_Start/Startup.Auth.cs
App_Start/Startup.Auth.cs
namespace WebApp
{
public partial class Startup
{
public void ConfigureAuth(IAppBuilder app)
{
...
I noticed this project was created with an output type of
WebApp.csproj
<OutputType>Library</OutputType>
so i tried to change it to Exe but it wont even build
here are my launchsettings:
Properties/launchSettings.json
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55946/",
"sslPort": 44349
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
do i need to add something somewhere to tell the project to use this launchsettings?
the project starts correctly but with the default iis settings (no https, port 5000)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论