Ошибка 0x80004005 visual studio
0x80004005 error in Microsoft Visual Studio, usually occurs while trying to start a new project or make a web service.
It might happen in all recent versions of Visual Studio, including 2010, 2012, 2013, 2015 and 2017.
Although there might be a few different reasons for this situation, the problem most commonly originates from corrupted installation of IIS (Internet Information Services).
If you’re experiencing this error under entirely different circumstances, click HERE to see the list of all possible scenarios including 0x80004005 error code.
Common descriptions for Visual Studio 0x80004005 error:
- Unable to start debugging on the web server. Operation not supported. Unknown error: 0x80004005
- Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
- A fatal error has occurred trying to apply code changes and debugging needs to be terminated. Operation not supported. Unknown error: 0x80004005.’
- The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
- An error (-5006 : 0x80004005) has occured while running the setup
- Error at Combined Job [Get data[1]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occured. Error code: 0x80004005
- Exception from HRESULT: 0xc020801C, Error at Loadstock [Connection manager “Excel Connection Manager”]: SSIS Error Code DTS_E_OLEDBERROR.
How to fix 0x80004005 unspecified error in Microsoft Visual Studio?
Depending of the source of 0x80004005 error, the different action is required to solve the problem. According to numerous user experience all across the internet, these are the most effective methods on how fix 0x80004005 error in Visual Studio:
Method 1: Reinstall or repair the IIS (Internet Information Services)
Download the installation from official Microsoft download page and do a REPAIR or even better, uninstall the IIS completely and try installing it again. Before doing anything, make sure to delete folder containing IIS configuration files located in:
Method 2: Try running Microsoft Visual Studio as administrator
As simple as it sounds, this has been proven as solution for 0x80004005 error in Microsoft Visual Studio, for a number of cases. Just right click on Visual Studio icon and choose “Run as administrator“.
Method 3: Try launching VS IDE in safe mode and restore default settings
As Microsoft claims, this is one of the best methods to try when solving any kind of problems with Visual Studio. Just open the Visual Studio command line and execute these commands:
Devenv.exe /SafeMode
Devenv.exe /ResetSettings
Method 4: Check if all files included in your Visual Studio project are available
If 0x80004005 error occurs when opening a saved project, there’s a big chance that some project files were deleted, renamed or are currently not available.
Method 5: Make sure your VS project is compatible with installed version of Visual Studio
If 0x80004005 error may also occur if you are trying to load a project created with newer version of Visual Studio, then you have installed.
I came over this because I saw a file named msdia80.dll installed in Drive C of my laptop. According to kb 927665, it turned out that the file's correct path should be in C:\Program Files\Common Files\Microsoft Shared\VC
So I clicked the link that lead to the download page of Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update.
The details of the download said that " A security issue has been identified that could allow an attacker to compromise your Windows-based system with Microsoft Visual C++ 2005 Redistributable Package Service Pack 1 and gain complete control over it. You can help protect your computer by installing this update from Microsoft."
Upon knowing that my unit could be vulnerable, I tried to download and install vcredist_x86.exe and vcredist_x64.exe as per the support page's (kb/927665) direction for resolution. I eventually installed the two executables and restarted my computer. Then I checked my Drive C but msdia80.dll was still there.
Not knowing what to do, I followed the "Workaround" which said to move the msdia80.dll file to C:\Program Files\Common Files\Microsoft Shared\VC.
To level you off, I checked the Program Files (x86) and msdia80.dll is located to where it should be. But I moved the msdia80.dll file that I found on my Drive C to the regular Program Files (without the x86 tag). Meaning there are two msdia80.dll files in my computer one that is dated on 12/1/2006 and the other one (located in Program Files x86) dated 5/14/2011. In relation to this, I have two MS Visual C++ 2005 Redistributable (not x64 but I have also 3 Visual C++ Redistributable x64) installed one is dated 1/4/2012 and has a size of 300 KB and the other one is dated 2/15/2014 and has a size 2.62 MB.
After I moved msdia80.dll to its location, I then launched command prompt to register msdia80.dll using the command line: regsvr32 driver :"C:\Program Files\Common Files\Microsoft Shared\VC\msdia80.dll".
An error message appeared: ' The Module "C:\Program Files\Common Files\Microsoft Shared\VC\msdia80.dll was loaded but the call to DllRegisterServer failed with error code 0x80004005. For more information about this problem, search online using error code as search term'.
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Unspecified error (Exception from HRESULT: 0X80004005 (E_FAIL)) has occurred: while creating new web application
Question
I have installed Visual Studio 2015 Community version. I am using Windows 7 64 bit system.
I have performed following steps to create new web application and "Unspecified Error" is thrown. I have also repaired the visual studion 2015 but the error still throwing.
1) Go to File > New > Project
Result: "Unspecified error (Exception from HRESULT: 0X80004005 (E_FAIL)) has occurred" error is thrown
Hint: I found that the "WebApplication1" folder is successfully created with App_DATA, App_Start. WebApplicaiton1.csproj folders/files. But the .sln file is not creating.
Answers
For this particular issue, I searched some solutions below, hope they will helpful:
1. Go to Control Panel -> Programs and Features -> Turn Windows Features on or off, inside that, we had to select Internet Information Services -> Web Management Tools -> IIS 6 Management Compatibility -> IIS Metabse and IIS 6 configuration compatibility.
2. Edit the web application’s project file with a text editor and change this line from True to False:
3. Grant IIS AppPool identity permissions to the %systemroot%\inetsrv\config
All replies
Does the error “0x80004005 occur” only when creating web application or when creating any other templates?
If it occurs only when creating web application, I found two solutions to solve it, you can have a try:
Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.
Devenv.exe /ResetSettings: Restores the IDE's default settings
If it occurs whatever you created, I think you need to reset your visual studio templates, please follow the steps below:
- Open Windows Explorer, and navigate to \Common7\IDE (by default is C:\Program Files \Microsoft Visual Studio 10.0\Common7\IDE);
- Delete the ItemTemplatesCache, ProjectTemplatesCache folder;
- Open Visual Studio Command Prompt under Start menu -> All Programs -> Microsoft Visual Studio -> Visual Studio Tools (run it with administrative privilege);
- Run the devenv /InstallVSTemplates switch;
- Run the devenv /Setup switch;
Hope this information is helpful.
First of all thank you so much for your valuable feedback. I am replying you all my effort as per your steps.
Yes it occurs for web applications only. It means if I go with “Windows Form” option then it works fine.
Regarding your two solutions…
1) I have reset settings but no luck
2) I downloaded your specified IIS Express. When I tap to install it shows me message regarding I already have latest one. So it seems that I have latest IIS Express.
I also extecuted both commands over “Visual Studio 14.0” path but error is still throwing on.
One more thing, today I also downloaded “Visual Studio 2013” and created web application on it. I got the same error (Unspecified Error 0x80004005…) on last step. So it seems there is common error for both VS2013 and VS2015 community versions.
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I had one project COM dll which was developed using Visual studio 2012. I was able to register the COM dll manually using regsvr32
Recently I migrated into Visual studio 2017 and after migration, I am not able to register same dll manually using regsvr32, giving following error..
dllregisterserver failed with error code 0x80004005
I am just opening CMD as Administrator then executing regsvr32 "dll name"
I tried by disabling UAC notification. Also I have full control permission the file and folder..
Can anybody suggest me the solution for this. ?
Answers
All replies
I had one project COM dll which was developed using Visual studio 2012. I was able to register the COM dll manually using regsvr32
Recently I migrated into Visual studio 2017 and after migration, I am not able to register same dll manually using regsvr32, giving following error..
dllregisterserver failed with error code 0x80004005
I am just opening CMD as Administrator then executing regsvr32 "dll name"
I tried by disabling UAC notification. Also I have full control permission the file and folder..
Can anybody suggest me the solution for this. ?
It's not clear what "dll name" represents. Does it include the fully qualified path to the COM dll?
You can debug the COM registration as follows:
In your project that builds the COM dll set the debugging options in the project properties so that it runs regsvr32.exe and pass the full path to the COM dll as a command line argument. Set a breakpoint in the source for the dll on the DllRegisterServer method. Run VS as Administrator with elevated privileges and start debugging the COM dll project. After regsvr32.exe loads your COM dll your breakpoint at DllRegisterServer should be hit. You can then step through the registration code to determine the source of the error.
yes it includes fully qualified path to the COM dll. I was trying debug but dllregisterserver is return error code 0x80004005..
yes it includes fully qualified path to the COM dll. I was trying debug but dllregisterserver is return error code 0x80004005..
Did you try debugging into the DllRegisterServer function as suggested?
BTW, 0x80004005 is E_FAIL (Unspecified Error). So it provides no insight into the problem.
Hi, I tried to debug and found that it is failing in UpdateRegistryFromResourceD..
OLESTR ( "CLASS_ID" ), szCLSID >,
OLESTR ( "PROG_ID" ), T2OLE ( pObjectInfo[ dwIdx ].GetProgID().c_str() ) >,
OLESTR ( "DESCRIPTION" ), T2OLE ( pObjectInfo[ dwIdx ].GetName().c_str() ) >,
dwIdx ].GetCLSID(), szCLSID, sizeof ( szCLSID ) / sizeof ( szCLSID[0] ) );
IDR_REGISTRY , bRegister , rmEntries );
UpdateRegistryFromResourceD fails and it is not able update the registry in VS 2017.
Can anybody suggest that why is this failing and unable to update registry.
You should step into the ATL source code while debugging to find the specific point of failure. That should enable you to determine the actual reason.
In my copy of VS2015 the ATL source code always returns E_FAIL from UpdateRegistryFromResourceD.
I suggest you update your code to use other available ATL registration macros/functions for your .rgs resources
Apparently, this change was made beginning with VS2013.
class ATL_NO_VTABLE CAtlComModuleT : public CAtlModuleT
extern CAtlComModuleT _ModuleT;
HRESULT WINAPI UpdateRegistry( DWORD dwIdx, BOOL bRegister )
USES_CONVERSION;
OLECHAR szCLSID[64];
HRESULT hr;
StringFromGUID2( pObjectInfo[dwIdx].GetCLSID(), szCLSID, sizeof( szCLSID ) / sizeof( szCLSID[0] ) );
hr = _Module.UpdateRegistryFromResourceD( IDR_REGISTRY, bRegister, rmEntries );
HKCR
%PROG_ID%.1 = s '%DESCRIPTION%'
CLSID = s '%CLASS_ID%'
>
%PROG_ID% = s '%DESCRIPTION%'
CLSID = s '%CLASS_ID%'
CurVer = s '%PROG_ID%.1'
>
NoRemove CLSID
ForceRemove %CLASS_ID% = s '%DESCRIPTION%'
ProgID = s '%PROG_ID%.1'
VersionIndependentProgID = s '%PROG_ID%'
InprocServer32 = s '%MODULE%'
val ThreadingModel = s 'Both'
>
>
>
>
UpdateRegistryFromResourceDHelper is not gettin resolved in VS 2017, I am trying to use VS 2017 or do I need to modify .rgs file..
Could you please suggest ?
If you have a typical .rgs that contains what you need for registration then you should use the DECLARE_REGISTRY_RESOURCEID macro.
If you want to use your own replaceable parameters in the .rgs file then you need to override CAtlModule::AddCommonRGSReplacements
Actually This is one component which registers multiple inproc com components. I mean that this is one COM dll but it will have multiple clsid and progid to register . So because of that reason I had to call Manually UpdateRegistryFromResourceD in UpdateRegistry function which I have implemented. I have array of _ATL_REGMAP_ENTRY rmEntries[] and trying to register one by one in a loop. UpdateRegistry is the call back function registered with WINAPI *pfnUpdateRegistry) member of _ATL_REGMAP_ENTRY .
I have mentioned .rgs file above. Do I need any modification in .rgs file.
This is working fine with Visual studio 2012. recently I have migrated to Visual Studio 2017 where UpdateRegistryFromResourceD fails with error code 0x80004005.
I tried to implement as above to simulate as Visual Studio 2012. I mean to call as VS 2012 way by following how it calls internally in VS 2012.
However UpdateRegistryFromResourceDHelper is missing in VS2017 which is called by UpdateRegistryFromResourceD in vs 2012.
if you are suggesting to override CAtlModule::AddCommonRGSReplacements then can you please point to any sample if you are aware.
Actually This is one component which registers multiple inproc com components. I mean that this is one COM dll but it will have multiple clsid and progid to register . So because of that reason I had to call Manually UpdateRegistryFromResourceD in UpdateRegistry function which I have implemented. I have array of _ATL_REGMAP_ENTRY rmEntries[] and trying to register one by one in a loop. UpdateRegistry is the call back function registered with WINAPI *pfnUpdateRegistry) member of _ATL_REGMAP_ENTRY .
I have mentioned .rgs file above. Do I need any modification in .rgs file.
This is working fine with Visual studio 2012. recently I have migrated to Visual Studio 2017 where UpdateRegistryFromResourceD fails with error code 0x80004005.
I tried to implement as above to simulate as Visual Studio 2012. I mean to call as VS 2012 way by following how it calls internally in VS 2012.
However UpdateRegistryFromResourceDHelper is missing in VS2017 which is called by UpdateRegistryFromResourceD in vs 2012.
if you are suggesting to override CAtlModule::AddCommonRGSReplacements then can you please point to any sample if you are aware.
You can download a demo project that uses replaceable parameters in an .rgs file, the DECLARE_REGISTRY_RESOURCEID macro, and an AddCommonRGSReplacements override from RegTest.zip
The demo contains -
Thanks for your reply. But in my case I need to register multiple CLSID, PROGID, .
Will it help to my scenario ? So which clsid , progid, I need to pass in below..
hr = pRegistrar -> AddReplacement ( L "PROGID" , L "TestObj.Object" );
hr = pRegistrar -> AddReplacement ( L "CLSID" , L "" );
As I said that this is one dll which will have multiple clasid, progid.. to register. So I'm storing in _ATL_REGMAP_ENTRY rmEntries[] and trying to register by calling UpdateRegistryFromResourceD ()..
Это ошибка, которая может появляться как самостоятельно, так и вместе с другими ошибками. Выглядит обычно таким образом: “Error Code 080004005. Unspecified error”. Но все они легко решаются.
Код ошибок 0x80004005 обычно происходит при доступе к общим папкам или дискам, при использовании определенных программ или при установке обновлений. Вот наиболее распространенные причины кода ошибок 0x80004005:
- Проблемы с обновлением.
- Перемещение или переименование файлов и папок. Ошибка центра обновления
Компания Microsoft по-прежнему не решила многочисленные проблемы с глобальными обновлениями «Виндовс». Пользователи компьютеров часто встречают ошибку:
- «Feature update to Windows 10, version XXXX – Error 0x80004005»
Это может быть связано с рядом причин, наиболее распространенными из них являются следующие:
- Проблемы с активацией (ваша копия Windows 10 не является законной или не активирована должным образом).
- Поврежденные системные файлы или файлы обновления.
К счастью, есть способы решения для каждого из этих сценариев.
Способ исправления проблем с активацией
Первое, что мы должны сделать – это убедиться в активации операционной системы. Для исправления ошибки 0x80004005 необходимо открыть меню «Пуск», а затем выбрать «Парраметры». В открывшемся окне выбираем пункт «Обновление и безопасность» и в появившемся списке слева нажимаем на «Устранение неполадок». Таким образом мы открыли еще одну вкладку, в которой необходимо запустить диагностику и устранить неполадку «Центра обновления». В большинстве случаев все проблемы будут решены в автоматическом режиме.
Способ исправления проблем с поврежденными файлами
Также можно попробовать полностью очистить директорию загрузки файлов обновления. Для этого запустите файловый менеджер и перейдите в папку «C:WindowsSoftwareDistributionDownload». После чего удалите все файлы и другие папки, которые увидите. Это заставит Windows 10 загрузить все файлы обновления заново.
Ошибка при попытке доступа к общим папкам и дискам
Если код 0x80004005 появляется при попытке доступа к общим папкам и дискам, то проблема может быть в реестре или в наличии скрытых виртуальных сетевых адаптеров.
Способ исправления ошибки 0x 80004005 в реестре
- Нажмите кнопки «Windows» + R. В появившемся окне введите regedit для открытия редактора реестра. Перейдите к следующему пути реестра:
- HKEY_LOCAL_MACHINESOFTWARE- MicrosoftWindowsCurrentVersion-PoliciesSystem
- Для 32-битной системы создайте новое значение DWORD под названием LocalAccountTokenFilterPolicy.
- Для 64-битной системы, сделайте QWORD (64-bit) (64-разрядный) под названием LocalAccountTokenFilterPolicy.
В обоих случаях ставим значение «1», и не забудьте нажать «ОК». Возможно, потребуется перезагрузка компьютера.
Внимание! Не удаляйте и не меняйте ничего в реестре, если вы не знаете, что делаете.
Способ исправления лишних виртуальных сетевых устройств
Нажмите кнопки «Windows» + R и введите hdwwiz.cpl. Так вы быстро попадете в диспетчер устройств. Нажмите «Вид» в меню и выберите «Показать скрытые устройства». Просмотрите список сетевых адаптеров. Если вы увидели устройство под названием Microsoft 6to4, то они, вероятнее всего, и стали причиной ошибки 80004005. Их надо удалить.
После этого перезагрузите компьютер и проверьте результат.
«E-FAIL 0x80004005» в VirtualBox
Появление 0x80004005 на VirtualBox обычно связана с ключом реестра.
Способ исправления
Нажмите кнопки «Windows» + R. В появившемся окне введите regedit для открытия редактора реестра. Перейдите к следующему пути реестра:
- HKEY_LOCAL_MACHINESOFTWARE- MicrosoftWindows NTCurrentVersionAppCompatFlagsLayers
- “C:Program FilesOracleVirtualBoxVirtualBox.exe” “DISABLEUSERCALLBACKEXCEPTION”
- Удалите свой антивирус, проверьте на ошибку, а затем переустановите его.
- Замените свой антивирус на другой, например, AVG или Eset Nod32.
Вывод
Читайте также: