asp.net - System.Net.NetworkInformation.NetworkInformationException:系统找不到指定的文件
问题描述
我的网站在本地工作。但是,当我在 azure 上启动它时,出现如下错误。
我使用了图形 api 和 OwinStartup。
使用微软.Owin;使用欧文;
[程序集:OwinStartup(typeof(graph_tutorial.Startup))]
namespace graph_tutorial { public partial class Startup { public void Configuration(IAppBuilder app) { ConfigureAuth(app); } } }
我该如何解决?
请帮帮我。
The system cannot find the file specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.NetworkInformation.NetworkInformationException: The system cannot find the file specified
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NetworkInformationException (0x2): The system cannot find the file specified]
System.Net.NetworkInformation.SystemIPGlobalProperties.GetFixedInfo() +6885092
System.Net.NetworkInformation.SystemIPGlobalProperties.get_FixedInfo() +94
System.Net.NetworkInformation.SystemIPGlobalProperties.get_DomainName() +131
System.Net.CookieContainer..ctor() +102
System.Net.Http.HttpClientHandler..ctor() +248
System.Net.Http.WebRequestHandler..ctor() +18
Microsoft.Owin.Security.OpenIdConnect.OpenIdConnectAuthenticationMiddleware.ResolveHttpMessageHandler(OpenIdConnectAuthenticationOptions options) +37
Microsoft.Owin.Security.OpenIdConnect.OpenIdConnectAuthenticationMiddleware..ctor(OwinMiddleware next, IAppBuilder app, OpenIdConnectAuthenticationOptions options) +547
lambda_method(Closure , OwinMiddleware , IAppBuilder , OpenIdConnectAuthenticationOptions ) +55
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +168
System.Delegate.DynamicInvokeImpl(Object[] args) +124
Microsoft.Owin.Builder.AppBuilder.BuildInternal(Type signature) +222
Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) +465
Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +40
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +70
System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +119
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +91
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +552
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +181
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +228
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +314
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10080656
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263
解决方案
推荐阅读
- nativescript - nativescript 未检测到版本 7
- ios - 在 aws-IOS 设备令牌中出现错误在某些 ios 设备中必须不超过 400 个十六进制字符
- linux - 本地网络上的 WEBRTC,Linux 上没有网关
- google-analytics - Google Analytics - 如何在表格中显示所有主要维度
- c++ - C++ 编译器可以引入 vector.reserve 调用吗?
- python-3.x - Web3 读取合约 Python
- bash - 匹配文件中的文本并在匹配另一个模式的上方打印文本
- html - 为什么ios14以下无法加载网站图片?
- python - 我可以在过滤 numpy 数组方面做得更好吗
- android - 从广播接收器更改 Activity 中的 TextView