通过 Node Express 访问地址中带有反斜杠的共享服务器
Accessing a Shared Server with Backslashes in the Address via Node Express
我一直在努力让 Express 与共享服务器一起工作,如下所示:
53.165.137.28\NAME,94273
我收到以下错误:
Error: Failed to connect to 53.165.137.28:undefined in 15000ms
我尝试使用双反斜杠“\\”进行转义,但它不起作用。另外,使用 %5C 也没有用。
注:
我可以通过 SQL Server Management Studio 查询这个服务器就好了。
我错过了什么?
我设法解决了。
而不是这个:
var dbCofing = {
user: 'USER',
password: 'PASS',
server: '53.165.137.28\NAME,94273',
database: 'DATABASE'
}
我使用了以下内容:
var dbCofing = {
user: 'USER',
password: 'PASS',
server: '53.165.137.28',
instanceName: 'NAME',
port: 94273,
database: 'DATABASE'
}
我一直在努力让 Express 与共享服务器一起工作,如下所示:
53.165.137.28\NAME,94273
我收到以下错误:
Error: Failed to connect to 53.165.137.28:undefined in 15000ms
我尝试使用双反斜杠“\\”进行转义,但它不起作用。另外,使用 %5C 也没有用。
注: 我可以通过 SQL Server Management Studio 查询这个服务器就好了。
我错过了什么?
我设法解决了。
而不是这个:
var dbCofing = {
user: 'USER',
password: 'PASS',
server: '53.165.137.28\NAME,94273',
database: 'DATABASE'
}
我使用了以下内容:
var dbCofing = {
user: 'USER',
password: 'PASS',
server: '53.165.137.28',
instanceName: 'NAME',
port: 94273,
database: 'DATABASE'
}