小编Alf*_*ace的帖子

Azure App Service Deploy返回(403)受IP限制禁止

在Azure中,我为以下项启用了IP限制:

  • Web App(网络>访问限制)
  • SQL Server(防火墙和虚拟网络>添加客户端IP)
  • SQL数据库(设置服务器设置)

该解决方案仍在本地和DevOps(也称为Team Foundation Server)中构建。

但是,Azure App Service部署现在失败:

##[error]Failed to deploy App Service.
##[error]Error Code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
More Information: Could not connect to the remote computer 
("MYSITENAME.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.
Error: The remote server returned an error: (403) Forbidden.
Error count: 1.
Run Code Online (Sandbox Code Playgroud)

如何通过防火墙进行部署?

我是否需要虚拟网络将Azure资源隐藏在列入白名单的IP后面?

azure

4
推荐指数
2
解决办法
1320
查看次数

更有效的格式化货币值的方法

我想decimal在HTML页面中将数字显示为USD货币.例如,显示1209.27为$ 1,209 27.

[DataType(DataType.Currency)]我没有在模型中使用,而是直接在视图中格式化每个数字:

@Html.Raw(Regex.Replace(Regex.Replace(String.Format("{0:C}", Model.Price), "(?<=\\.)([^.]*$)", "<sup>&nbsp;$1</sup>"), "\\.<sup>", "<sup>"))
Run Code Online (Sandbox Code Playgroud)

有没有更有效的方法来实现这种格式而不是重复这一点?

c# asp.net model-view-controller razor

2
推荐指数
1
解决办法
78
查看次数

标签 统计

asp.net ×1

azure ×1

c# ×1

model-view-controller ×1

razor ×1