Click here to Skip to main content
13,146,014 members (42,232 online)
Rate this:
Please Sign up or sign in to vote.
See more: , +
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

      <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"/>

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
      <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"/>

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 10:17am
Updated 24-Dec-12 10:34am

1 solution

Rate this: bad
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:[^]
Sourav Sarkar-SS2 25-Dec-12 0:09am
not at all helpful. Please suggest other way
It cannot be more useful than that. You really need to address to your provider, to get something helpful.
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...
Zoltán Zörgő 25-Dec-12 3:28am
Thank you.
Well, I am not a wizard... bad news for the OP :)
Sourav Sarkar-SS2 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 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,
Sergey Alexandrovich Kryukov 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,
Sourav Sarkar-SS2 6-Jan-13 13:32pm

Refer the question
now try to answer
if you can
Ah, that's you! :-) I'm not sure you will like that answer, but I tried, please see now...

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170915.1 | Last Updated 24 Dec 2012
Copyright © CodeProject, 1999-2017
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