Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine - iis

I am unable to load a csproj in VS2015. I get the Creation of the virtual directory http://localhost:<Port_Number>/ failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine. error. I tried the following:
Uninstalled and reinstalled IIS
Gave access to %systemroot%\system32\inetsrv\config & %systemroot%\system32\inetsrv\config\Export folders
Changed <UseIIS>True</UseIIS> to <UseIIS>False</UseIIS>
Rebooted the system
None of the above worked. Could you advise how to fix this problem please?

You can solve this problem in two ways:
Launch Visual Studio with Administrator priviledges.
Permanently grant the IIS Metabase folder permissions to the current user.
You can press Win + E to open a Windows Explorer instance, then write the following line on the topmost address bar depending on the OS you’re using, As soon as you hit the Enter key the following popup will appear, asking you if you want to permanently grant access to that folder to the current user, click on the Continue button, then try to open up the \Export\ subfolder with a couple mouse clicks and repeat the same process. You’re done: from now on, you’ll be able to launch Visual Studio with default priviledges and your IIS instance will work without hassles.
More information about setting you can refer to this link: setting

I had this problem when trying to load a visual studio 2015 solution. The solution would load but website project would remain unloaded and the output window would show that error message.
Click the unloaded website project in the solution explorer
Go to the properties section dock-window, there is a property called "File Path"
If it is set to an URL, change it to the full physical path to the website.
Reload the project.

Related

Error trying to install node.js(v15.3.0) on Windows 10 from nodejs.org

When I try to install node.js from the installer that I have downloaded from website nodejs.org I get error message "An error occurred while attempting to create the directory: C:\Users\User\Appdata\Roaming"
I have listed the possible causes and solutions. Please try them.
Causes:
Permissions or user profile issues can cause this issue.
If Windows Defender thinks the installer is unfriendly it may prevent the creation of files and folders.
Solution:
First, check to see if Windows Defender is preventing the creation of the folder. Open Windows Defender Security Center and navigate to the following:
Click Virus & threat protection.
Click Virus & threat protection settings.
Scroll down to Controlled folder access and temporarily switch to
the OFF position.
Try the installation again.
If none of these work, visit this link where a similar question was asked.

IIS 7.5 HTTP 500.19 Internal Server Error Config invalid

I am using Windows 2008 R2 with IIS 7.5 and have mapped the source of my website to a network drive. When I do, the below error occurs. When pointing to the local c: drive the website works.
Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \\?\H:\ExcelAutomation\1.0\src\docs\web.config
Requested URL http://vmwws085381.msad.ms.com:80/index.html
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Config Source
-1:
0:
The solution for me was to open up IIS, click on my site, and under Advanced Settings change the physical path to the network share like \\server\share\.. instead of using the mapped drive.
Original source that helped me arrive to this solution is here: http://forums.iis.net/t/1157959.aspx
Another cause is not having the URL Rewrite Module installed if your web-app references this in the associated Web.config file – this is detailed in this Stack Overflow Question
The IIS server and the server with the shared folder must each have an account with the exact same username and password. Make sure this account has "Read & Execute", "List folder contents", and "Read" access to the shared folder.
Connect within IIS using UNC. (E.g., add a virtual directory to the site; enter an Alias; enter the physical path as \servername\foldername; click "Connect As..."; choose "Specific User"; click "Set..."; enter the user name and password referenced in step 1.) Current versions of IIS do not support mapped drives. Don't waste your time trying to make them work.
Also, make a big mental (or written) note for yourself and other administrators: If you ever change the password for that account, do it on both servers and within the IIS connection.
For someone who is getting this error on your local system, it can happen when you share code across multiple servers or copy an existing project to a new location and it's virtual directory path still refers to an older path.
This happened to me as I was sharing a project on a Google drive and was accessing it from 2 different systems. (I know, Should've used version control system)
Solution:
Right click on the project >> Web >> Create virtual directory
It will probably show a prompt. Select Yes and you are done.
The main reason behind this error is the physical path i.e web site folder cannot be under the users folder, desktop folder, or any related folder. If it's there, move it or place it on other drive and try again.

Orchard CMS Module Install with IISExpress Fails because of permissions

I keep getting the "There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders." message when trying to install a module from the Gallery.
I've given the IIS_WPG full control of the Orchard.Web\Modules directory and it worked yesterday, but it doesn't today.
I'm running from Visual Studio 2010 SP1 and IIS Express.
EDIT: I've made sure the gallery path is: http://packages.orchardproject.net/FeedService.svc/
I came across the same issue. We had a custom theme and I had to change the version from 1 to 1.0 in the theme.txt file. Then I was able to install a module.
I fixed this problem by doing this:
Change the app pool user to NetworkService or to a custom user you
create. (I was using IIS not IIS Express)
Grant read/write permissions to the user on the folders (Modules and
Themes).
Make sure Dashboard > Settings > Gallery url is
http://packages.orchardproject.net/FeedService.svc/
That fixed it for me. Using ApplicationPoolIdentity did not work, even when I gave it the appropriate permissions (not sure why).
I hope that helps.

Recreate the default website in IIS

I've accidentally deleted the default website in IIS; It no longer shows up in the tree of IIS manager and browsing "localhost" returns a 404 error.
I've re-installed IIS, but the default website still doesn't exist... Is it possible to recreate the default website so I can create my folder inside?
Other answers are basically right, thanks to them I was able to restore my default web site, they're just missing some more or less important details.
This was the complete process to restore the Default Web Site in my case (IIS 7 on Windows 7 64bit):
open IIS Manager
right click Sites node under your machine in the Connections tree on the left side and click Add Website
enter "Default Web Site" as a Site name
set Application pool back to DefaultAppPool!
set Physical path to %SystemDrive%\inetpub\wwwroot
leave Binding and everything else as is
Possible issues:
If the newly created web site cannot be started with the following message:
Internet Information Services (IIS) Manager - The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
...it's possible that port 80 is already assigned to another application (Skype in my case :). You can change the binding port to e.g. 8080 by right clicking Default Web Site and selecting Edit Bindings... and Edit.... See Error 0x80070020 when you try to start a Web site in IIS 7.0 for details. Or you can just close the application sitting on the port 80, of course.
Some applications require Default Web Site to have the ID 1. In my case, it got ID 1 after recreation automatically. If it's not your case, see Re-create “default Website” in IIS after accidentally deleting. It's different for IIS 6 and 7.
Note: I had to recreate the Default Web Site, because I wasn't able to even open a project configured to run under IIS in Visual Studio. I had a solution with a couple of projects inside. One of the projects failed to load with the following error message:
The Web Application Project is configured to use IIS. The Web server 'http://localhost:8080/' could not be found.
After I have recreated the Default Web Site in IIS Manager, I was able to reload and open that specific project.
Did the same thing. Wasn't able to recreate Default Web Site directly - it kept complaining that the file already existed...
I fixed as follows:
Create a new web site called something else, eg. "Default", pointing to "C:\inetpub\wwwroot"
It should be created with ID 1 (at least mine was)
Rename the web site to "Default Web Site"
I suppose you want to publish and access your applications/websites from LAN; probably as virtual directories under the default website.The steps could vary depending on your IIS version, but basically it comes down to these steps:
Restore your "Default Website" Website :
create a new website
set "Default Website" as its name
In the Binding section (bottom panel), enter your local IP address in the "IP Address" edit.
Keep the "Host" edit empty
that's it: now whenever you type your local ip address in your browser, you will get the website you just added.
Now if you want to access any of your other webapplications/websites from LAN, just add a virtual application under your default website pointing to the directory containing your published application/website. Now you can type : http://yourLocalIPAddress/theNameOfYourApplication to access it from your LAN.
You can try to restore your previous state by doing the following:
Go to IIS Manager
Right-click on your Local Computer.
Point to All Tasks
Point to Backup/Restore Configuration
Select the configuration you want to restore
Wait untill configuration applies
Check out this answer on SuperUser:
In short: Reinstall both IIS and WAS.
In details -
Step 1
Go to "Add remove programs"
"Turn windows features on or off"
Remove both IIS and WAS (Windows Process Activation Service)
Restart the PC
Step 2
Go to "Add remove programs"
"Turn windows features on or off"
Turn on both IIS and WAS (Windows Process Activation Service)
Note: Reinstalling IIS alone won't help. You have to reinstall both IIS and WAS
This approach fixed the problem for me.
Follow these Steps
Restore your "Default Website" Website :
create a new website
set "Default Website" as its name
In the Binding section (bottom panel), enter your local IP address in the "IP Address" edit.
Keep the "Host" edit empty
I deleted the C:\inetpub folder and reinstalled IIS which recreated the default website and settings.

Retrieving the COM class factory for component failed

I am using an excel object (COM component) for excel manipulation. It works fine on my PC, but when I deploy the application to our Intranet I am getting this error:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005
I am using windows authentication and impersonate=true in my web.config.
I made all the settings in component service but it still gives the same error.
Please help
I had the same error when I deployed my app. I've got solution from this site: Component with CLSID XXX failed due to the following error: 80070005 Access is denied
Here is this solution:
In DCOMCNFG, right click on the My Computer and select properties.
Choose the COM Securities tab.
In Access Permissions, click Edit Defaults and add Network Service to it and give it Allow local access permission. Do the same for < Machine_name >\Users.
In Launch and Activation Permissions, click Edit Defaults and add Network Service to it and give it Local launch and Local Activation permission. Do the same for < Machine_name >\Users.
*I used forms authentication.
This did the trick for me:
(solution from the msdn forum)
goto Controlpanel --> Administrative tools-->Component Services -->computers --> myComputer -->DCOM Config --> Microsoft Excel Application.
right click to get properties dialog. Goto Security tab and customize permissions accordingly.
In Launch and Application Permissions, select Customize, Edit. Add the user / group that calls the application.
There's one more issue you might need to address if you are using the Windows 2008 Server with IIS7. The server might report the following error:
Microsoft Office Excel cannot access the file 'c:\temp\test.xls'. There are several possible reasons:
The file name or path does not exist.
The file is being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.
The solution is posted here (look for the text posted by user Ogawa): http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91?prof=required
You will also get this error when there are stale EXCEL.EXE processes in the system (Use Task Manager --> Processes tab to view these.)
Kill all those instances and the application would work normally.
I have Done the Following Things in IIS 8.5 (Windows Server 2012 R2)Server and its Worked in My Case Without Restart:
Selecting The Application Pool That Connected to The Application in IIS
And Right Click --> Advanced Settings --> Process Model --> Select Local System Instead of Recommended ApplicationPoolIdentity
And Make Sure C:\Windows\SysWOW64\config\systemprofile\desktop Have Enough Access For Users.
Refresh the Website Link that Connected With this Pool
In case it helps somebody:
I am running Windows 7 64-bit and I wanted to register a 32-bit dll.
First I tried: regsvr32 <path\name.dll> and got the following error:
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {A1D59B81-C868-4F66-B58F-AC94A4A7982E} failed due to the following error: 80040154.
Then I tried to add the application through the Component Services (Run->DCCOMCNFG) and got the following error:
System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {A1D59B81-C868-4F66-B58F-AC94A4A7982E} failed due to the following error: 80070005.
There are many links to solving it but what worked for me was:
Console Root -> Component Services -> Computers -> My Computer -> COM+ Applications -> your_application_name -> Properties: Security tab: Authorization: Uncheck 'Enforce access checks for this application'.
I don't know what it does.
I can understand your pain. In my case the error got resolved by performing below steps:
Start > Run > dcomcnfg.
Open the folder DCOM Config and Select Component Services > Computers > My Computer > DCOM Config.
Select “Microsoft Office Word 97 – 2003 document”/”Microsoft Excel Application” and go to its properties.
In "Security" tab set “Launch and Activation Permissions” need to be Customize (Authorized user).
Now go to IIS and select application pool of the Web and go to its Advanced Settings and select “NETWORK SERVICE” as identity user.
Hope this helps.
The CLSID you describe is for the Microsoft.Office.Interop.Excel.ApplicationClass. This class basically launches excel.exe through InprocServer32. If you don't have it installed then it will return the error message you received above.
For IIS 8 I did basically the same thing as Monic. Im running my application as its own app pool on an x64 machine 1.In DCOMCNFG, right click on the My Computer and select properties.
2.Choose the COM Securities tab.
3.In Access Permissions, click Edit Defaults and add iis apppool\myapp to it and give it Allow local access permission. Do the same for iis apppool\myapp
4.In launch and Activation Permissions, click Edit Defaults and add iis apppool\myapp to it and give it Local launch and Local Activation permission. Do the same for iis apppool\myapp.
additionally I had to make the folders outlined under C:\Windows\SysWOW64\config\systemprofile\Desktop and give read \ write permissions to iis apppool\myapp also
I'm getting this same error when trying to export a csv file from Act! to Excel. One workaround I found was to run Act! as an administrator.
That tells me this is probably some sort of permission issue but none of the previous answers here solved the problem. I tried running DCOMCNFG and changing the permissions on the whole computer, and I also tried to just change permissions on the Excel component but it's not listed in DCOMCNFG on my Windows 10 Pro PC.
Maybe this workaround will help someone until a better solution is found.
If you run the app from the Task Scheduler, it helps to check option in General parameters "Run with highest privileges".

Resources