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/
精彩评论