오류-IIS 메타베이스에 액세스 할 수 없습니다.
Visual Studio 2012를 설치하고 솔루션을 열면 다음과 같은 형식으로 일련의 오류가 발생합니다.
웹 응용 프로그램 프로젝트 Foo는 IIS를 사용하도록 구성됩니다.
IIS 메타베이스에 액세스 할 수 없습니다. 컴퓨터의 IIS 웹 사이트에 액세스 할 수있는 권한이 없습니다.
각 웹 애플리케이션에 대해이 정보를 얻습니다. 내가 시도한 것 :
- 관리자로 Visual Studio 실행
- aspnet_regiis.exe -ga MyUserName 실행
- aspnet_regiis.exe -i 실행
이것들은이 문제에 대한 일반적인 해결책 인 것 같지만 성공하지 못했습니다. 내가 할 수있는 다른 일이 있습니까?
에 윈도우 8 프로 :
%systemroot%\inetsrv\config
에 Windows 7 및 8.1 10
%systemroot%\System32\inetsrv\config
( %systemroot%
일반적으로 어디 C:\Windows
)
Windows 탐색기에서 위의 적절한 위치로 이동합니다. 다음과 같은 팝업이 표시되면서 액세스가 차단됩니다.
"이 폴더에 대한 액세스 권한이 없습니다.이 폴더에 영구적으로 액세스하려면 계속을 클릭하십시오."
이 폴더에 대해 '계속'을 클릭하고 그 아래에 내보내기 폴더를 클릭합니다. 바로 가기를 "나로 실행"(도메인 및 로컬 관리자의 구성원)으로 다시 변경하고 솔루션을 열고 배포 할 수있었습니다.
관리자 권한으로 Visual Studio를 실행하지 않는 것 같습니다. 보세요 :
http://bloggingabout.net/blogs/rick/archive/2012/10/04/unable-to-access-the-iis-metabase.aspx
인용하다
이에 대한 해결책은 간단합니다. "관리자 권한으로 실행"을 사용하여 Visual Studio를 시작합니다. 바로 가기를 마우스 오른쪽 단추로 클릭하고 "관리자 권한으로 실행"을 선택하면됩니다.
직장에서 비슷한 문제가 발생했다고 생각합니다. 우리에게 해결책은 제어판-> 프로그램 및 기능-> Windows 기능 켜기 또는 끄기로 이동하는 것이 었습니다. 그 안에서 인터넷 정보 서비스-> 웹 관리 도구-> IIS 6 관리 호환성->을 선택해야했습니다. IIS 메타베이스 및 IIS 6 구성 호환성.
시도해보고 도움이되는지 알려주세요!
참고 : 우리는 Visual Studio 2005와 2010을 모두 사용하여 Windows 7에서 IIS 7.5를 실행하고 있으며 매우 오래된 웹 서비스 (.asmx)로 작업을 수행하고 있습니다.
IIS AppPool ID 권한을 부여하여이 문제를 해결했습니다. %systemroot%\inetsrv\config
IIS를 사용할 필요가없는 프로젝트에서 작업하는 경우이 오류가있는 프로젝트를 여는 해결 방법은 언로드 된 프로젝트를 마우스 오른쪽 단추로 클릭하고 편집을 클릭하고 다음을 검색하는 것입니다.
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="">
<WebProjectProperties>
<UseIIS>True</UseIIS>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
USEIIS를 false로 설정하십시오.
<UseIIS>False</UseIIS>
reload the project by right clicking on it after saving changes.
I have had two seperate types of problem lead to this error, and thought I'd share...
1. The directory was on an network share and due to UAC restrictions, was
unable to be accessed -- even when running as an admin.
2. The directory was on a drive that didn't exist...
Both of these stem from an unfortunate (imo) choice by MS to put things in the Documents or My Document directory, combinee with really lousy error messages. In both of the above cases the fundamental problem was that the IISExpress Config file goes in My Documents, and it either didn't exist or couldn't be accessed.
Thank you to everyone that answered. Since this was closed for a long time I couldn't provide much feedback, but I did eventually fix my problem. I tried many of these other solutions and they didn't fix my issue, but I'm sure they help when the root cause is different.
My Solution
I solved this problem by turning off the IIS and .Net Framework features within Windows 7 and then turning them back on. It seems like this re-installation is what fixed my issue. I still don't know what caused the problem, but at least one other developer on my team had the same issue.
On a windows 81, from an admin command prompt, use:
icacls "C:\Windows\System32\inetsrv\config" /t /grant "IIS AppPool\DefaultAppPool":(R)
Then go back in VS, right click on the failed project, choose Reload.
Credit to: IIS7 Permissions Overview - ApplicationPoolIdentity
I had this problem - the symptoms were the same, but the issue I had was that I had set the "My Documents" folder to be on a network share, and the share was not accessible.
The root problem was that the IIS config files located at %USERPROFILE%\Documents are not accessible. Once I changed the "My Documents" folder location (I modified the reg value), it started working again.
I know that this may not be a common scenario that you might run into, but I've posted it here because it gives the same symptoms.
Navigating to folder: %systemroot%\System32\inetsrv\config
presents a security dialog. Click continue and this may resolve the issue. This has worked on two separate Win 10/VS 2017/IIS machines.
I came across this today and fixed the problem by removing the IISUrl from the Project file:
- Right click project
- Click Edit
Delete the following line:
<IISUrl>http://localhost:xxxxx </IISUrl>
Reload project
- Now add a new IIS virtual directory by right clicking Project > Properties > Web and selecting Use Local IIS Web Server (Uncheck Use IIS Express) and clicking the Create Virtual Directory button.
You might run across this problem and have same problem as me. I "solved" it before and then power outage and computer crashed, not sure why a registry setting reverted but it is the SOURCE of my problem.
- I tried all the running as adminstrator
- All the IIS / IIS express re-installs.
- Various "hacks"
Came down to having to fix the registry again.
Could not as administrator even open regedit (Need to access registry since problem is not with gpedit.msc admin template )
UnHookExec.inf on desktop
Just save UnHookExec.inf and install it by right clicking and selecting install. Installing the file will not show any popup or notice box. http://www.tweakandtrick.com/2011/04/enable-regedit-registry-editor.html
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal pointing to non-existant fileshare. Changing that to local path solved this problem for me. – Pasi Savolainen Jul 14 '14 at 8:41
(changed from \\cs2data\home\stickelt\my documents
to c:\dev
)
Now ALL is good and Visual Studio opened solution with 15 projects and connects to IIS and does not complain about not being able to access iis metadata
I had never ran into this before, as nobody at current job had this problem ( many have been here a long time, some got clones of other machines that "worked" and many are on another domain etc.. )
I just had this issue today and I found that I didn't open VS as 'Run as Administrator'. After doing this, I was able to publish the Service.
If you have administrator permissions, Right Click to Visual Studio icon > properties and then advanced, "Run as administrator" check. You can run visaul studio as administrator directly anymore. This way, formal and so basic.
In addition to the answer by @nologo, I also had to use IIS. So I changed the
<UseIIS>True</UseIIS>
to 'False' first.
- Opened the solution and ensured that the project could be loaded.
- Close solution and that instance of Visual Studio
- Change the value to 'True' again
- Open the solution. This time, I didn't get any error/warning. I could also run with Ctrl+F5 or F5 without any problem while my project was mapped to an IIS website.
Changing this key worked for me:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal
The location didn't exist.
I also had a similar problem. My solution is an extension to the answer "Run as admin" which I hope someone might find useful.
I was running VS2012 and almost every time I had to do the Right Click, Run As Administrator. I got tired of this so instead I went into its properties on the shortcut, clicked advanced, and then clicked the "Run as Administrator" option. Now VS2012 always runs as administrator whenever I open it from that shortcut.
The from that shortcut bit is important. I proceeded to branch my project, and download the branch to a new local folder. Then, when I opened it from the shortcut I had no problem. But if I went directly into the folder, and ran the project locally without the shortcut, it did not run as administrator and I got this error.
Once I opened VS2012 as usual first, then using File/Open/Project It worked again no problem. (because I was running as admin). But I wasn't running as admin when I opened the solution using windows file manager.
The other suggestions seem somewhat extreme, but this is pretty simple so I would tend to give this a try first.
Hope this was helpful.
This seems like one of those "All errors lead to this message" type of bugs.
Mine was that the App Pool was just turned off. I turned it back on, and everything worked fine.
One more thing you could try:
- Check if you have pending Windows updates.
- If you do, please reboot before trying anything else.
I tend to never shut down my machine, so I had plenty of them waiting for a reboot. And that fixed it.
I tried everything above. The credit goes to all of the responses above. Having tried all of the suggestions on their own, I just assembled this combination of suggestions in an order that made sense to me. Note my Documents folder is on a shared drive. The subst/IISExpress stuff is not applicable unless you're in the same boat.
- Configure VS to run as admin
- Uninstall IIS via Add/Remove Programs, Windows Features
- Reboot
- Run WinRAR or something similar as admin and archive
C:\windows\system32\inetsrv\
- Run cmd as admin and
rmdir /s c:\windows\system32\inetsrv\
to completely remove all traces of the last install. Leave elevated cmd prompt open for later. - Reinstall IIS with IIS 6 Metabase compatibility (doubt this was necessary)
- Leave Default AppPool and Default Website as-is (I had previously deleted both)
- Ran
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ga MYDOMAIN\scottt732
- Ran
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
Also, because my Documents folder is on a share drive, I was having IIS Express issues. I don't use/like IIS Express, but Visual Studio complained about it.
- From elevated cmd prompt, ran
subst U: c:\Temp
. CreatedC:\Temp\Documents\
and copied the IISExpress folder from my U drive. - Created
CustomUserHome
key inHKCU\Software\Microsoft\IISExpress
withC:\Temp\Documents\IISExpress
- This allowed me to get Visual Studio to open my web projects and edit the properties. I tweaked the projects to store web server settings in a user file and adjusted it to use a Custom URL (not sure if this was necessary)
- I may/may not have to run the
subst
command each time I restart. Don't care.
And after throwing in the towel 3 times and spending roughly ~6 hours I can open web projects in Visual Studio (2015 Update 2).
Go to the root directory of your project and find the following file:
YourProjectName.csproj.user - inside it, make sure UseIISExpress is set to false:
<UseIISExpress>false</UseIISExpress>
If that alone doesn't work try the following as well and try again:
YourProjectName.csproj - inside the main project file, make sure both UseIIS and UseIISExpress are set to false:
<UseIIS>True</UseIIS>
<UseIISExpress>false</UseIISExpress>
After changing these I was able to load the project again.
Note: Make sure you run your VS as an Administrator, as mentioned in the other answers.
I just had the same issue with me today. And I found it annoying. Though I have other two websites already under development from the same IIS but still was not able to create new site. Strange, but I did this.
- Delete the site from IIS
- Create new site, give it a name "new_site"
- Select Application Pool other than the site name itself. So it wont be messing up with default settings.
- Keep IP "unassigned" if you are running it from same machine
- give it some unused port
- Run Visual Studio as "Run as Administrator" by right-clicking on VS executable shortcut.
- You are done!
You do not need to turn off/re-install anything other than what I have stated since it works.
Let me know if anybody had the same issue just like me and solved the same way. I think it was not the issue but a wrong way of creating website on localhost which Visual Studio rejects to open.
I hope this will help newbies.
- Create a shortcut to the "devenv.exe"
- select the "Run as administrator" option for the shortcut
- doble click on the short cut and reopen your project
I had the same problem after Adding feature from this link afterward I followed this article the issue was gone.
I did a repair of Visual Studio 2015 to solve this. The repair took a long time, but it solved the issue while doing much of the above did not. I am running Win 7 enterprise.
Open visual studio command prompt and type below command and run
aspnet_regiis -ga machinename\ASPNET
After running the above command Reset the IIS
and test the application that resolve your issue.
If above command doesn’t resolve your problem then try to run below command in visual studio command prompt:-
aspnet_regiis -i
Alternatively we can run above command from our windows command prompt also
Go to the Start menu and open Run and enter and click OK
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –I
After that Reset the IIS and test the application that resolves your issue
In my message, beside complaining about "Unable to access the IIS metabase", it also mentions can't access "<IISUrl>http://localhost:6416/</IISUrl>"
. Right click on the unload project, click Edit, find the line "<IISUrl>http://localhost:6416/</IISUrl>"
, comment it out. Reload and it should work. This has to do with administrator doesn't have permission to access that address.
I had a similar problem. Visual Studio would not load any web projects and showed the error: creation of virtual directory <myproj:myport> failed. Unable to access the IIS metabase.
In my case it was actually IISExpress that was at the root of the problem. Right clicking on IIS Express in Programs and Features in the control panel and choosing repair fixed the issue in less than two minutes.
I'm using Win 8 Pro and VS 2013. After trying everything in this page... I simply reinstalled IIS Express 8 and everything works fine now (even without running as an admin).
My conclusion is that this is a rather generic error and there are multiple root causes.
Windows 기능 목록에서 IIS 도구를 실제로 선택 취소하여이 문제를 해결할 수 있습니다. 그런 다음 Visual Studio 2013 설치를 복구하고 Web Developer가 선택되어 있는지 확인합니다. VS가 잘 작동하는 IIS 8을 설치합니다.
참고 URL : https://stackoverflow.com/questions/12859891/error-unable-to-access-the-iis-metabase
'Nice programing' 카테고리의 다른 글
git은 커밋되지 않았거나 저장되지 않은 모든 변경 사항을 실행 취소합니다. (0) | 2020.09.29 |
---|---|
NaN 값을 어떻게 확인할 수 있습니까? (0) | 2020.09.28 |
setup.py는 무엇입니까? (0) | 2020.09.28 |
"무작위성"이해 (0) | 2020.09.28 |
AngularJS : $ scope. $ apply () 호출시 이미 진행중인 $ digest 오류 방지 (0) | 2020.09.28 |