真爱无限的知识驿站

学习积累技术经验,提升自身能力

[转载]vs项目发布时提示类似Default-Web.config Connection String”参数不能为 Null 或空的报错问题

参考地址:

http://stackoverflow.com/questions/28996604/the-defaultconnection-web-config-connection-string-argument-cannot-be-null-or


Create a Parameters.xml file in the Project root with the following content:

<?xml version="1.0" encoding="utf-8" ?>
<parameters>
  <parameter name="DefaultConnection-Web.config Connection String"
      description="DefaultConnection"
      defaultValue="Server=tcp:x.database.windows.net,1433;Database=x_db;User ID=x@y;Password=z;Trusted_Connection=False;etc." tags="" />
</parameters>


意思就是在项目的要目录下,创建一个 Parameters.xml 名称的文件,内容就是上面的xml。

改成自己的名称:


然后发布就不会报错了,我也不知道这是怎么回事,应该是用来更新服务器上的连接串的,也可以选择不更新。



发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-BlogPHP 1.7.3

Copyright 2024-2027 pukuimin Rights Reserved.
粤ICP备17100155号