Page 1 of 1

Configuration Error - all at once !! HELP (pleeeze)

Posted: Sat 28 Jun 2008 23:32
by Cody21
This is absolutely bazaar - makes no sense whatsoever. This has been running perfectly for over a year. I made absolutely NO changes to my WEB.CONFIG file in over 7 months. All at once, we are getting this Configuration Error whenever anyone accesses my site. When I delete the Web.Config file, I can access the site just fine, but of course I have no security.

I'm by no means an expert and haven't messes with this MySqlDirect.Net stuff in a looooong time ... hence why I never embarked on attempting the upgrade headaches to 4.x ...

Can someone provide me some direction as to what might be causing this all-at-once error ????? All of my users are now unable to access the site..... Thanks...



--------------------------------------------------------------------------------
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:


Line 146:
Line 147:
Line 148:
Line 149:
Line 150:


Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config Line: 148


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

Posted: Sun 29 Jun 2008 08:46
by pleb
You need to add a connection string named "LocalSqlServer".

Code: Select all


  
    
  

Probably what's happened is that someone has played with the .net settings using the IIS configuration manager? Sound like someone you know?

Also "System.Web.Security.SqlRoleProvider" is the MsSQL provider, are you using mysql? You might need to change this.

And last but not least, why not restore the web.config from a backup? You are backing up aren't you?

Regards,

Pleb

Posted: Sun 29 Jun 2008 17:37
by Cody21
Thank you so much for the fast response. I added that ConnectionString you suggested and that in fact did fix this.

What I find strange is that - as I said before - I hadn't modified my web.config file in well over 7 months. And this just popped up out of nowhere. I never had that ConnectionString in any of my web.config files.

And yes, I have backups ... none have that data.

I have no explanation except as you said, maybe they did something on my ISP side of things....????????? I certainly am not modifying IIS settings. Thanks again !!

Posted: Mon 30 Jun 2008 08:12
by pleb
Good to hear Cody21.

You should probably do a full backup of your site. This would include, the site, the configuration files, database, and anything else. Pretty much if you can't be up a going again on a new box within 1/2 hour of disaster you should probably look improving your disaster recovery procedures.

Sometimes, when the budget allows, it's good to have another box (hosting account on different server, probably different company) set-up to duplicate the primary box. I'd also suggest lowering your domain ttl down to around 30 minutes. This way you could switch very quickly to another server. I know some server admins who have set the domain ttl to sub 1 minute.

Yeah it sounds as if your host killed the configuration file. Might be nasty email time ;)

Pleb

Posted: Mon 30 Jun 2008 15:31
by Cody21
Pleb - Like I said, the configuratin file at my ISP was not changed. It perfectly matched all other copies I had - on 2 different machines. I *never* had that ConnectionString you provided me in any of my web.config files - ever.- and MySqlDirect was working perfectly for over a year wihout it... I have backups on several machines of all my files; hence why this made no sense as to why it suddenly broke after not being modified over 7 months.

Thanks ..

PS - I was just in Melbourne (looks like that's your town) ... LOVED IT !! Went to the Narooma Waterfest ... it was a blast...

Posted: Mon 30 Jun 2008 23:14
by pleb
Yeah something definitely went wrong :cry:

Melbourne is ok. I moved down to Melbourne, from Brisbane, at the start of the year because my gf is working at the Monash UNI. We have plans to move back to Brisbane at the end of the year though, and to be honest I can't wait. I find Melbourne a little too busy and a little unsafe, although I do love the Barossa valley, and have a nice stock pile of wines from there. :D