1

Firstly, I am aware this problem has been dealt with before here, and the solutions are always corrections to the connection string.

However, in our case, the connection string is correct, because most of the time it works fine. What happens is at some point the site 'stops' and starts logging this error. Simply recycling the app pool clears it, and everything is good again until the next time. A site might run fine for hours or days, but then it falls over and every request logs this error.

Since it is a transient error, I suspect it is somehow memory or service related? Either some kind of service that handles the connection from the ASP.NET site fails within the app pool, or there is some shortage of memory so whatever process is required to handle the connection fails.

It is not just a single server, I have seen this issue occur on various customers' servers, so I don't think it is some obscure glitch with a particular server. I have also seen sites that were running fine for a long time start to experience this issue (which suggests to me it is related to resource availability).

For the sake of completeness, this is the connection string from a site that exhibits this problem:

<add name="SQLConnection" connectionString="Data Source=localhost\sqlexpress;
Integrated Security=True;Initial Catalog=databasename"
providerName="System.Data.SqlClient" />

But like I said, this works absolutely fine for hours/days, until the problem occurs.

10
  • I found some posts elsewhere referring to problems with sites crashing more regularly when using the IIS APPOOL identity for the site. It seems this can cause problems when the admin password on the server is updated. But I've noticed a few client servers where the admin password has expired also. I've changed a couple of clients sites over to using a fixed IUSR account instead, and that seems to be more reliable. So I think this particular error message is just a symptom of that, the issue is more general - flaky db connection due to APPPOOL identity / admin pw issues. Commented Apr 23, 2014 at 15:16
  • have you found a solution to this problem? I am trying to solve the same issue, I would be very interested to know. Thanks Commented Jul 9, 2016 at 20:15
  • Not really. Few things that seem to at least mitigate/reduce the effects: 1. Set the app pool to recycle more often; this doesn't necessary avoid the issue, but at least allows the site to recover more quickly. 2. Try to identify queries that take a long time to run and fix/optimize them. 3. Turn off 'rapid fail protection' within the app pool. It seems this is supposed to protect server memory if a site is returning errors, but that can get triggered if there are slow queries and the DB generates a few timeout messages in short succession. Commented Jul 11, 2016 at 11:45
  • I am not sure if the reason of this error was the same for me but I have solved this issue by selecting "Use this Connection String at run time" in the publish Menu settings tab. I did this for every database connection the project had, the error never came back after that. But the reason you are having the issue might be different than mine. Commented Jul 11, 2016 at 14:13
  • The suggestion from when I google is that just edits your web config... is it possible there is anything in the web config on the site that differs from a normal connection string? Commented Jul 12, 2016 at 14:40

2 Answers 2

1

Just surfing with error message and got one link from Microsoft. Seems to me like your problem.

Can have a look on this.

http://social.msdn.microsoft.com/Forums/en-US/9f191038-dbf6-4306-8f66-ec211a1e933a/format-of-the-initialization-string-does-not-conform-to-specification-starting-at-index-0?forum=adodotnetdataproviders

Thanks

Sign up to request clarification or add additional context in comments.

1 Comment

I have searched this error in a search engine already (I am not completely inept!), and found plenty of references to the same error message. But did you actually read beyond that in my post? There is nothing wrong with the connection string, it works. It does not have a single quote in it. The problem is that after some time, the site falls over and generates this error. Restarting the site or recycling the app pool clears it. So that suggests an issue with memory or something else like a service failing, rather than a problem with the connection string.
0

Can you please check following points:

  1. Make sure the account has full permission (both read and write) on folder:

"C:\INETPUB\WWWROOT\BE SITE WORK(FINAL)\4SIGHT\WEBSITE\BARAMATIESTATES\BARAMATIESTATES\”

I recommend that set “C:\INETPUB” folder allow all user access and edit, at least give full administrator right to IIS account.

2 Make sure IIS account is sysadmin of SQL Server.

Setting IIS Permissions for an Object

You can set permissions for any object in IIS, including Web sites, folders, files, and scripts. To set the permissions for an object in IIS:

  1. Log on to the Web server computer as an administrator.
  2. Click Start, point to Settings, and then click Control Panel.
  3. Double-click Administrative Tools, and then double-click Internet Services Manager.
  4. Right-click the Web site that you want to configure in the left pane, and then click Properties.
  5. If you want to set the permissions for a Web site's home folder, click the Home Directory tab.
  6. If you want to set the permissions for a folder in a Web site, click the Directory tab.
  7. If you want to set the permissions for a file or a script in a folder, click the File tab.
  8. Click the corresponding permissions that you want to set for the object.
  9. To turn on script processing for a Web site or folder, click Scripts Only from the Execute permissions list.To turn off script processing, click None.
  10. Click OK.

if the issue still persist let me know :)

1 Comment

It is not a permissions issue, please see original post. Because permissions are either there, or they're not. They don't just disappear after some period, then miraculously come back again when you recycle the app pool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.