SocketException(0x2afc):请求的名称有效,但未找到所请求类型的数据

时间:2015-11-25 07:39:36

标签: model-view-controller socketexception

我刚刚将我的一个客户从我们软件的旧版本升级到最新版本。虽然该软件的Windows应用程序端正在运行,但新的MVC应用程序正在获得上述错误。 Windows和Web应用程序都使用.NET Remoting连接到服务器组件。

我在网上搜索了这个错误,但我找到的只是DNS相关问题(这也反映在发布的堆栈跟踪中)所以我的似乎与DNS问题无关。此外,在这种情况下,Web应用程序与应用程序连接的服务器组件位于同一服务器上,而我的Windows和Web应用程序使用完全相同的配置文件。 Windows应用程序可以通过服务器自身和VPN连接工作。

这是我的堆栈跟踪:

Server Error in '/MyApp' Application.

The requested name is valid, but no data of the requested type was found

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.Sockets.SocketException: The requested name is valid, but no data of the requested type was found

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: 

[SocketException (0x2afc): The requested name is valid, but no data of the requested type was found]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +14799926
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +622
MyApp.Common.ServerInterfaces.IGeneral.GetStartupData(String CurrentVersion, Boolean CompressResults, ProgramModuleEnum Caller) +0
MyApp.Web.Infrastructure.BaseController.GetAppData(Boolean ForceRefresh) +388
ASP._Page_Views_Security_Login_vbhtml.Execute() +228
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
System.Web.WebPages.StartPage.ExecutePageHierarchy() +143
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +110
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +109
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +97
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +241
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +19
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

这是一个既定的应用程序,我第一次收到此错误(仅限此特定客户端)。服务器仍然在.NET 4.0上,所以我升级到.NET 4.5.1(我的应用程序的最新版本需要)并重新启动服务器,这导致我的Windows应用程序工作,但网络仍然没有。

1 个答案:

答案 0 :(得分:0)

好的,不知道发生了什么。周末之后,我再次尝试了Web应用程序,它只是起作用了。根本没有服务器重新启动或更新服务器。 (虽然我在安装.NET 4.5.1之后上周重新启动了服务器,但这并没有解决问题。)

很抱歉,但似乎这可能无法帮助其他有类似错误的人。