在本地运行Web App时,没有问题可以连接到数据库,
将Web App部署到Azure之后,DB(Also Azure)连接尝试会引发以下错误:
[Win32Exception (0x80004005): No such host is known]
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server.
The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: TCP Provider, error: 0 - No such host is known.)]
Run Code Online (Sandbox Code Playgroud)
DB FW设置:允许访问Azure服务:设置为ON
关于如何解决/解决此问题的任何想法?
我想将 C# 对象或方法的代码存储在字符串中,并动态创建一个对象并从 .NET Core 中运行的父/主应用程序调用该方法。
就像是:
methodString = @"
public bool check(string input)
{
return input.Length > 10;
}";
var dynamicObject = new dynamicCode.FromString(methodString);
var result = dynamicObject.Check("TestValue");
Run Code Online (Sandbox Code Playgroud)
这样的东西如何在.net core中实现