
我在本地机器上做了一个Visual Studio2019的ASP.NET核心应用程序,然后在为我的文件系统部署后,我将文件复制到服务器上。同时,我在服务器(Windows Server)上创建了一个新的IIS站点,指出了我想要的设置,包括使用https。
但是,当我试图访问该站点时,出现了一个错误,显然IIS无法访问程序文件夹…
当我尝试在IIS中导航网站设置并单击以查看连接字符串时,IIS在图片中显示错误。事实上,这条路径似乎存在问题。\\?\C:\mydir\web.config是什么意思?
有人能给我解决这个错误的帮助吗?我确信我指出了通向IIS的正确路径。
发布于 2020-01-30 17:56:15
我已经安装了.NET托管捆绑包,上面的问题已经解决了。然而,现在,我仍然无法访问我创建的网站。浏览器显示错误DNS_PROBE_FINISHED_NXDOMAIN。
这是我的web.config文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\MVF2.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 99f7528d-8954-427a-86a5-7124668717df-->Program.cs文件为:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace MVF2
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseKestrel(options =>
{
options.Listen(IPAddress.Loopback, 8088, listenOptions =>
{
listenOptions.UseHttps("mycertificate.crt");
});
});
}
}https://stackoverflow.com/questions/59951393
复制相似问题