hey, i have problem for the database setup, i create my site by visual studio 2010. there have 2 database need to upload to the host. all are in mdf format. at first, i signed on your website as basic user, so i have to backup my database to bak file and upload. but ssms cant be installed successfully on my pcs for some reason. later, i found the ultimate user is able to upload the mdf file directly. so i purchased 2nd site with ultimate usage. the question is: 1. after i upload the first database for login control and change the connectionstring in web config file, but the site remains to show me error as below Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. Source Error: [No relevant source lines] Source File: machine.config Line: 252 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 2. i have 2 database for my site, one is for login control, another is for gridview. how do i upload the 2 database to host and what changes should i make to the connectionstring in web config file? do u guys have customer service #? i really wanna contact u guys directly.
addition: here is my web config file <?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <connectionStrings> <add name="ConnectionString" connectionString= "Data Source=tcp:s04.Winhost.com;Initial Catalog=DB_21741_ccna;User ID=DB_21741_ccna_user;Password=******;Integrated Security=False;" /> </connectionStrings> <system.web> <roleManager enabled="true"/> <authentication mode="Forms"/> <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/> </system.web> </configuration>
To resolve this issue, you need to remove LocalSqlServer and then add it again. Please see the following KB article for the instructions on how to do it.
thanks for your reply, but i have 2 question. what about 2nd question? i have 2 database for my site, one is for login control, another is for gridview. how do i upload the 2 database to host and what changes should i make to the connectionstring in web config file? i already fixed the LocalSqlServer error, but database still has problem Server Error in '/' Application. Login failed for user 'DB_21741_ccna_user'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'DB_21741_ccna_user'. thanks so much for your help.
First you need to make sure that you have created 2 database's through the control panel. Next, you are going to want to create a backup of your database locally, upload it to your site, and restore it to your SQL database here at Winhost. The following KB article should help you do this. Lastly, update your connection string in your web.config to reflect the database information in the control panel. Be sure to replace the "******" section of your connection string with your actual password, this is most likely why you are getting the error you are currently receiving.
i already fixed the Login failed for user 'DB_21741_ccna_user' error but my 2nd database is not working. what changes should i do for the connectionstring? 2nd database is also contained in same page. since i may only upload one mdf file to each server, so i have 2 connectionstrings. here is my first connectionstring "Data Source=tcp:s04.Winhost.com;Initial Catalog=DB_21741_ccna;User ID=DB_21741_ccna_user;Password=******;Integrated Security=False;" 2nd one: "Data Source=tcp:s04.Winhost.com;Initial Catalog=DB_21741_ccna2;User ID=DB_21741_ccna2_user;Password=******;Integrated Security=False;" what should i do for this problem? thanks so much
thanks for your prompt reply that is my major problem, i cant get ssms 2008 successfully installed on my pcs. that is why i upgrade my account to ultimate user. that will make me skip this step, do u have the ssms install on ur pc? can u do the backup for me? i can send u everything thanks
after i log in my site, (login control is working perfect now). it shows me error message as below for my 2nd database Server Error in '/' Application. The connection name 'ConnectionString' 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. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: The connection name 'ConnectionString' was not found in the applications configuration or the connection string is empty. Source Error: Line 123: Line 124: <div id="" style="margin-left:50px;"> Line 125: <asp:SqlDataSource ID="SqlDataSource1" runat="server" Line 126: ConnectionString="<%$ ConnectionStrings:ConnectionString %>" Line 127: SelectCommand="SELECT * FROM [ccna]" Source File: E:\web\csupomon\Default.aspx Line: 125 Stack Trace:
u know, we may only have 1 connectionstring in web config file so i dnt know how to add the 2nd one for my 2nd database without using ssms. or can u guys backup my database for me? i can send u all the files this is my school assignment. i just need to make it working. i dnt care anything about the security stuffs. thx
Ok, I'm a little confused. You are talking about adding a second connection string name to your web application and you ask us to create a backup for you. These two are two totally different things. You do not use SSMS to add a second connection string to your web application you use Visual Studio. Why don't you tell us exactly what you are trying to accomplish instead of trying to find out how you can do something. Maybe we can give you a suggestion on how to proceed and accomplish it. I think you may have a slight confusion between database management and web programming.
lol, thanks ray and everyone here i gotta my site working now. i changed the connection string directly from gridview it is working now thanks again