没有这样的主机已知,客户端依赖

时间:2022-10-05 20:44:32

I'm hosting my project in a test server (proyectos.legendsoft.com.ve), but since i need this project to access some cookies from another host, i had to change my host file on my local machine:

我正在一个测试服务器上托管我的项目(proyecto .legendsoft.com.ve),但是由于我需要这个项目从另一个主机访问一些cookie,所以我必须在本地机器上更改我的主机文件:

 75.125.228.200     legendsoft.batanga.com

Now this seems to cause problems with the ClientDependendy library, even if it works fine on my localhost:

现在,这似乎给ClientDependendy库带来了问题,即使它在我的本地主机上运行良好:

127.0.0.1     localhost.batanga.com

Anyone know any way to fix this or i just have to remove this library?

有人知道怎么修复这个吗?或者我需要移除这个库?

This is the complete error:

这是完全错误:

Server Error in '/Batanga' Application.
No such host is known

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: No such host is known

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 (0x2af9): No such host is known]
   System.Net.Dns.GetAddrInfo(String name) +250
   System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) +144
   System.Net.Dns.GetHostAddresses(String hostNameOrAddress) +435
   ClientDependency.Core.UriExtensions.IsLocalUri(Uri uri) +76
   ClientDependency.Core.Module.<>c__DisplayClass2.<ReplaceContent>b__1(Match m) +264
   System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat) +244
   System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator) +84
   ClientDependency.Core.Module.RogueFileFilter.ReplaceContent(String html, String namedGroup, String[] extensions, ClientDependencyType type, String regex) +143
   ClientDependency.Core.Module.RogueFileFilter.ReplaceScripts(String html) +260
   ClientDependency.Core.Module.RogueFileFilter.UpdateOutputHtml(String html) +16
   System.Func`2.Invoke(T arg) +0
   ClientDependency.Core.Module.ResponseFilterStream.OnTransformCompleteStringInternal(MemoryStream ms) +107
   ClientDependency.Core.Module.ResponseFilterStream.Flush() +109
   System.Web.HttpWriter.FilterIntegrated(Boolean finalFiltering, IIS7WorkerRequest wr) +610
   System.Web.HttpResponse.FilterOutput() +100
   System.Web.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +77
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

2 个解决方案

#1


1  

This is something ClientDependency needs to fix. You can simply turn off rogue file filtering to work around this issue though, everything else will work fine.

这是客户依赖需要解决的问题。您可以简单地关闭流氓文件过滤以解决这个问题,但是,其他的一切都可以正常工作。

I've created an issue for this, http://clientdependency.codeplex.com/workitem/13173

我为此创建了一个问题,http://clientdependency.codeplex.com/workitem/13173

#2


2  

The error the stack trace is reporting is actually from System.Net.Dns.GetAddrInfo(String name) and not from your ClientDependency library. Make sure the server you're running the application on can resolve the hostname you're passing it (try to ping the address from that machine and see if it works).

堆栈跟踪报告的错误实际上来自System.Net.Dns。GetAddrInfo(字符串名称),而不是来自您的ClientDependency库。确保正在运行应用程序的服务器可以解析正在传递的主机名(尝试从该机器上ping地址,看看它是否有效)。

#1


1  

This is something ClientDependency needs to fix. You can simply turn off rogue file filtering to work around this issue though, everything else will work fine.

这是客户依赖需要解决的问题。您可以简单地关闭流氓文件过滤以解决这个问题,但是,其他的一切都可以正常工作。

I've created an issue for this, http://clientdependency.codeplex.com/workitem/13173

我为此创建了一个问题,http://clientdependency.codeplex.com/workitem/13173

#2


2  

The error the stack trace is reporting is actually from System.Net.Dns.GetAddrInfo(String name) and not from your ClientDependency library. Make sure the server you're running the application on can resolve the hostname you're passing it (try to ping the address from that machine and see if it works).

堆栈跟踪报告的错误实际上来自System.Net.Dns。GetAddrInfo(字符串名称),而不是来自您的ClientDependency库。确保正在运行应用程序的服务器可以解析正在传递的主机名(尝试从该机器上ping地址,看看它是否有效)。