While trying to publish one of my application in live environment, i`m getting the following error.
"The database 'E:\blabla\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 661. This server supports version 612 and earlier. A downgrade path is not supported.
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'."
The Error says you fool, you are using old version of sql instance. To run this MDF you need to update your SQL instance.
So i decide to update my SQL instance from SQL Server 2008 to SQL Server 2008 R2.
while trying to update my server, i got a another error.
"The Windows Management Instrumentation (WMI) service cannot be started.
To continue with the installation, you must troubleshoot and repair your Windows Management Instrumentation (WMI) service."
It says WMI services need to be run, before starting installation, after some of my hair plugged i find out a solution from a forum.
The solution that works for me was:
1. Copy the below code in a notepad and save it as fixwmi.cmd
2. Run through command promt e.g: type c:\fixwmi.cmd (File location \ filename)
in command promt and enter.
It takes several minutes to complete, After it is complete, you see the :END statement start the SQL server installation again and you should be fixed.
cd /d c:\temp
if not exist %windir%\system32\wbem goto TryInstall
cd /d %windir%\system32\wbem
net stop winmgmt
if exist Rep_bak rd Rep_bak /s /q
rename Repository Rep_bak
for %%i in (*.dll) do RegSvr32 -s %%i
for %%i in (*.exe) do call :FixSrv %%i
for %%i in (*.mof,*.mfl) do Mofcomp %%i
net start winmgmt
if /I (%1) == (wbemcntl.exe) goto SkipSrv
if /I (%1) == (wbemtest.exe) goto SkipSrv
if /I (%1) == (mofcomp.exe) goto SkipSrv
if not exist wmicore.exe goto End
net start winmgmt