Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I have develop a web application which is executing perfectly in my local machine.
I purchase a hosting from parallel Plesk. Where I had upload all my files.
I am using AttachDBFile [.MDF]as my database, which is store in App_Data Folder.
in the server its generating error as its is not connected.
My ConnectionString
 
<connectionStrings>
      <remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\DBASE.mdf;User Instance=true;MultipleActiveResultSets=true;" providerName="System.Data.SqlClient"/>
  </connectionStrings>
 
Error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
 
if I am using the following code
<connectionStrings>
      <remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="data source=123.123.123.123\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\DBASE.mdf;User Instance=true;MultipleActiveResultSets=true;" providerName="System.Data.SqlClient"/>
  </connectionStrings>
 

Error:
 
Invalid value for key 'attachdbfilename'.
 

 
Please help
For security reason I am not able to disclose my IP Address, I apologized for that.
 

Please help me.
Posted 24-Dec-12 11:17am
Edited 24-Dec-12 11:34am
v5

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

In case of local sql express, the syntax is correct, assuming that the server instance name is SQLEXPRESS, and all other parameters are correct. But are you sure, that those stand also for the provider also?
I suggest you consult with the service provider, to get the correct connection string, and consult the syntax gallery also: http://www.connectionstrings.com/sql-server-2005[^]
  Permalink  
Comments
Sourav Sarkar-SS2 at 25-Dec-12 0:09am
   
not at all helpful. Please suggest other way
Sergey Alexandrovich Kryukov at 25-Dec-12 0:44am
   
It cannot be more useful than that. You really need to address to your provider, to get something helpful.
—SA
Sergey Alexandrovich Kryukov at 25-Dec-12 0:46am
   
My 5, because this is a right advice. It's interesting that this OP has 5 questions so far but 4 reports for abuse on the account. It tells something...
—SA
Zoltán Zörgő at 25-Dec-12 3:28am
   
Thank you.
Well, I am not a wizard... bad news for the OP :)
Sourav Sarkar-SS2 at 27-Dec-12 10:02am
   
Thanks to you only!
my only enemy .
You are not giving any answer and commenting, downrating, report abuse
What should I do.
you only close my last question
Sergey Alexandrovich Kryukov at 27-Dec-12 11:59am
   
You are very welcome.
 
Enemy? Still playing the war? :-) Please, don't be this way...
 
I don't really remember your questions, but I'm really sorry for non-answering. You see, asking questions also requires some minimal qualification. Unfortunately, these days majority of the questions cannot be answered, because they are not qualified as such. Perhaps you are one of the many inquirers like that, I'm not sure.
When I face a question which I can answer, I usually try hard to answer, and most typically find a pretty good solution, you can see it by the feedback I have.
 
I would advise you that you consider even the down-votes and criticism as a sort of help, really useful. Didn't you notice that criticism is one of the major forces of the progress? To develop, a person needs some feedback, to know what can be improved. Also, think about it this way: if we did not down-vote the weakest posts, it would be unfair to those with excellent posts.
 
Thank you for your comment.
 
By best wishes,
—SA
Sergey Alexandrovich Kryukov at 27-Dec-12 12:14pm
   
Oh, I tool a look at the previous comments now...
 
Also, you should understand that a member can leave only one report on one item. It is impossible to have more then one vote for the item as well. So, when I say that you have 4 abuse reports only on your member account, it means that 4 different members reported you personally for the abuse.
 
I'm afraid to be mistaken here, but I can guess that was due to your aggressive behavior toward those who really tried to help. And I don't think that you are really aggressive, it might only seem so. I might be not right here...
 
Thank you,
—SA
Sourav Sarkar-SS2 at 6-Jan-13 13:32pm
   
http://www.codeproject.com/Answers/522444/Autopostbackplusisplusnotplusworkingplusbecauseplu#answer3
 
Refer the question
now try to answer
if you can
Sergey Alexandrovich Kryukov at 6-Jan-13 13:51pm
   
Ah, that's you! :-) I'm not sure you will like that answer, but I tried, please see now...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,327
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,920


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 24 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100