开发者

SQL/ASP connection error

Line 10: 
Line 11:      <asp:SqlDataSource ID="ac210db6" runat="server" 
Line 12:      ConnectionString="<%$ ConnectionStrings:ac210db6ConnectionString %>" 
Line 13: 开发者_运维技巧     SelectCommand="SELECT [cid] FROM [customers]"></asp:SqlDataSource><br />

The connection name ac210db6ConnectionString was not found in the applications configuration or the connection string is empty. Description: An unhandled exception occurred during the execution of the current web request.

Exception Details:

System.InvalidOperationException: The connection name 'ac210db6ConnectionString' was not found in the applications configuration or the connection string is empty.

Any ideas?


You should have something like this in your web.config file.

<connectionStrings>
  <add name="ac210db6ConnectionString" connectionString="server={YOUR-SERVER-NAME-OR-IP};database={DATABASE-NAME};Integrated Security=True;"/>
</connectionStrings>

Go here for a full reference on your connection string.

http://connectionstrings.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜