visual studio 2010 unable to Publish to local web site. access denied - visual-studio-2010

I just reinstalled IIS7.5 after a lot of ugly messing around. I admittedly had no idea what I was doing.
I finally was able to renamed my windows\system32\inetsrv folder so that when I reinstalled IIS, I would get the default settings.
I took a wild guess at running this and it got my site running: aspnet_regiis.exe -i
Now I just can't Publish from Visual studio to any site under wwwroot.
for example, I get the error: Unable to create the Web site location 'c:\inetpub\wwwroot\WebApplication5'. Access is denied.
My work around is to Publish elsewhere and then copy the code there--and that works.
Goodness knows what else I broke in the process, but my web site appears to work except that I can't use the Publish functionality in VS2010 because of the Access Denied error.
Do I have to grant some ASPNET built in user rights to this folder?
Here's a snapshot of the rights on my wwwroot folder:

If you are able to run your application after copying from a different location, the problem is not with IIS or the worker process; it would most likely be a permissions problem with your windows user and process (in this case, visual studio).
Try running visual studio as an administrator (if you are not a local administrator of the machine). If that works, you can give full access to your inetpub folder for your user.

Late to this thread but I fixed this issue by going to:
c:\inetpub\wwwroot\myApplication > right click > properties > security > select Users(myMachine\Users) change access to full

Hopefully this thread is still alive. I had this problem and here is how I resolved it:
Try opening a file on the remote site from Visual Studio by File>Open File...
If you don't have access you will be challenged with Windows Sign in. Here you can enter your credentials for accessing the REMOTE site. Once you enter the credentials and the file is successfully opened you will be able to publish. Occassionally (I don't know why) the credentials will become invalid at which time all you have to do is open a file and reenter them.

Another solution is to create a share to your local c:\inetpub\wwwroot dir (give yourself read/write permissions) and publish to the share like so: \\mypc\wwwroot\mywebsite. It helped me get around the annoying UAC security without disabling it.

Web Deploy is likely to execute under the user name Local Service. Check the permissions for this user.

I'm having a similar problem
Access to the path 'C:\Sources\x\bin\Debug\netcoreapp2.1\publish' is denied.
Unable to create the Web site location Access is denied.
Access is denied because a subfolder is open in file explorer and locked by file explorer.

Related

Team Foundation Server 2013 : Workspace Change from Local to Server

We have got an implementation of TFS 2013 and the Visual Studio is configured to work with TFS 2013. Until recently when the developers are working on separate project everything went on smoothly.
Now when multiple developers are working on a single project, there is a problem of Multiple Check outs for the same file. The fact is Visual Studio is configured to work with Local Workspaces and hence the Multiple Checkouts. I tried to change the workspace from Local to Server by following the instructions from this post.
However, the developers now face an error (TF14098: Access Denied: User username needs PendChange, Lock permission(s) for $/myproject/file.aspx) when trying to checkout.
Itreid searching for this error on the internet but could not resolve this nor could I find any resolution for this.
Help is very much awaited and appreciated on this.
You are having trouble with permissions. Check if any the group you are the member is denied for PendingChange and lock or its directly denied for you. Note in TFS permissions, Deny always takes precedence. You must make sure your users and all the groups your users belong to have the allow permissions of PendingChange and lock in the project.
You can use the command Tf perm to check what are the security permissions for this project . Navigate to the project location and enter it. This will basically tell you list of all users/groups with their permission. Then change the security in web access.

Sitecore Setup installation fails with error Failed to open XML file, system error:-2147024786

When running Sitecore Setup the following error pops up:
Failed to open XML file, system error:-2147024786
I've tried going through the eventviewer but to no avail.
Not unimportant is that I used the installer but forgot to change my rootdirectory. As a consequence I had to uninstall (using the same installer Sitecore).
Now however it "feels" as though there are some references or remnants left behind somewhere.
Who has a clue or can give me an idea of what is going on?
You are correct, this issue is because the previous Sitecore instance, with the same name, has not been removed completely. You will need to manually complete the following tasks to remove the remnants and be able to run the installer, it has worked for me in past;
Stop the App Pool for the uninstalled site in IIS
Stop the Web Application for the uninstalled site in IIS
Perform an iisreset in command line
Delete the App Pool and Web app in IIS
You should now be able to completely delete the folder containing the Website and Data folder completely
If you are still having trouble deleting it check the folder's Security Permissions, the Users and their Permissions and Read Only checkbox. Ensure you have control to delete
Delete the relating entry in the hosts file
If you also installed Databases access them via MSSQL Management Studio, take all relating databases Offline then delete them.
This will effectively remove all remanants of the previous site. If what ever reason the issue still persists, Sitecore's own Sitecore Instance Manager has a delete option which will completely uproot the site for you. Try installing with SIM then.

TFS access denied error when doing checkin using parallels, and Visual studio 2013 on a Mac

I am running visual studio with TFS in parallels on a mac. In parallels, my projects are actually pointed to the mac documents folder. I am able to open and edit projects no problem as well as push them to the server.
Recently I enabled TFS source control. Whenever I try to do an initial push or checkin, I get an "Access to path is denied" error on all the individual files.
I really do NOT want to have to put my file on the virtual machine, so can someone tell me how to fix the permissions to allow TFS to access these files and do the check in?
here is an example of the output window upon checkin...
V:\MeYearly\packages\Newtonsoft.Json.5.0.6\lib\portable-net45+wp80+win8\Newtonsoft.Json.xml: Access to the path is denied.
V:\MeYearly\packages\Newtonsoft.Json.5.0.6\Newtonsoft.Json.5.0.6.nupkg: Access to the path is denied.
V:\MeYearly\packages\Owin.1.0\lib\net40\Owin.dll: Access to the path is denied.
V:\MeYearly\packages\Owin.1.0\Owin.1.0.nupkg: Access to the path is denied.
V:\MeYearly\packages\repositories.config: Access to the path is denied.
V:\MeYearly\packages\Respond.1.2.0\content\Scripts\respond.js: Access to the path is denied.
V:\MeYearly\packages\Respond.1.2.0\content\Scripts\respond.min.js: Access to the path is denied.
V:\MeYearly\packages\Respond.1.2.0\Respond.1.2.0.nupkg: Access to the path is denied.
V:\MeYearly\packages\System.Linq.Dynamic.1.0.0\lib\net40\System.Linq.Dynamic.dll: Access to the path is denied.
V:\MeYearly\packages\System.Linq.Dynamic.1.0.0\System.Linq.Dynamic.1.0.0.nupkg: Access to the path is denied.
V:\MeYearly\packages\Twitter.Bootstrap.3.0.1.1\readme.txt: Access to the path is denied.
V:\MeYearly\packages\Twitter.Bootstrap.3.0.1.1\Twitter.Bootstrap.3.0.1.1.nupkg: Access to the path is denied.
V:\MeYearly\packages\WebGrease.1.5.2\lib\WebGrease.dll: Access to the path is denied.
I found a workaround for this. I was able to check-in by shelving pending changes first.
You need to put the files locally on your virtual machine.
Checking in and out from what is in effect a remote location is not supported. If you want to have the files on your mac you can use Team Explorer Everywhere in eclipse and the command line. You would have to switch to your mac every time you want to checkin, which kinda sucks...
Another solution without the need to shelve:
What I did was to change the local workspace to a server workspace in Visual Studio (macOS Sierra + Windows 10 on Parallels);
File > Source Control > Advanced > Workspaces...
Select your workspace in the list and hit Edit...
Hit Advanced >>
Change Location to Server and hit OK and Close
Now you should be able to check in without needing to shelve.
I am a similar question a while back.
This used to work fine in Parallels. I had opened a ticket with Microsoft.
We spent nearly three weeks trying to track down the issue -- but it appears a Parallels update that was release at the end of 2014 is the culprit.
As Parallels is very not very responsive to consumer complaint's we will probably not be able to get a resolution anytime in the near future.
You will need change the configuration for the source control.
Go to File ---> Source Control----->Advanced----> WokrSpace and remove it.

Unable to write to subfolder in website

I have a webservice that I need to be able to write some logs for. The service is installed in c:\inetpub\wwwroot\myservice. The log files should be written to c:\inetpub\wwwroot\myservice\logging.
When I try running it in debug mode in Visual Studio, log files are created successfully. When I publish the site and try it, log files are not created.
I have tried giving write access for the logging folder to: NETWORK Service, IUSR, IIS_IUSRS, DefaultAppPool, ASP .NET 4.0 Classic but it made no difference. I also added Everyone with Full Control, but it made no difference.
Any ideas why I cannot get write access to this folder????
I have no idea what caused the issue, but IIS had somehow got corrupted. It would no longer display pages either by using localhost or 127.0.0.1.
Removed and re-installed IIS, all working now.

Unable to publish website from Visual studio 2010

We have a an ASP NET MVC website solution which only one out of three devs on the team is able to publish to the live server. When I, and another colleague, attempt to publish the site from VS 2010, the output window will display an error:
Unable to create the Web site
'\blah'. The path '\blah' does not
exist or you do not have access. The
specified path is invalid.
This points to a logon issue which my account, but the developer who can publish the site is a member of all the same user groups as me. As a long-shot, we gave Everyone full access to the folder, but this did not resolve the problem.
Can anyone suggest a more detailed way to try and figure out why we cannot publish the site? There must be a permission set somewhere that is allowing my colleague to publish the site from Visual Studio.
I had this problem and racked my brain trying to resolve it so I wouldn't have to copy the publish files to a remote server manually. I spent a great deal of time actively trying to get this to work.
Here's how I solved the problem: I went to File>Open in Visual Studio 2010 Express and navigated to the remote server (\\255.255.255.255\folder1\folder2\folder3 and so on). Right away I was challenged for a User Name an Password. I entered the credentials for the REMOTE server, checked the box to 'Remember my credentials'. I immediately tried to publish and voilá - it worked like a charm.
I hope this saves a lot of people a lot of time.
I had this issue - certain members of our team were able to publish directly from VS2010, whereas for some reason I was always getting permission denied errors, even though we were all able to connect to the server we were trying to deploy to. I fixed it in the following way:
Go to "Server Explorer".
Right click "Servers" and go to "Add server..."
Type in the name of the server you are trying to connect to, and then click on "Connect using a different user name..." - put the credentials for logging into the server in here.
Click OK and wait for it to add the server.
Now try and publish to that server and it should be ok...
Not sure why I needed to do this and others were able to deploy without adding the server in this way... remains unexplained.
According to the comments below:
You may need to restart Visual Studio in order for this to take effect.
This should also work for newer versions of Visual Studio
Faced the same problem today. In my situation I had to close VS2010 and open it NOT as an admin and it worked without any problems.
This got me for a long time...Go to Project - Properties and select the Package/Publish Web tab. Under the header "Web Deployment Package Settings", there's a ellipsis button that you can use to map to the location you want to publish. You will be asked for your credentials during that process.
Are you using web deploy (right click and choose Publish)?
Have you tried copying the ProjectName.Publish.xml file from the one machine where you can publish to the other two machines? The login credentials for publishing are saved in this file.
In IIS can you check to see that all users/groups are listed under Management Service Delegation in IIS Manager? It is listed under the Server node in IIS. Alternatively you can give all administrators access by clicking on Edit Features from the side-menu and checking Allow Administrators to bypass rules.
You could also check under IIS Manager Permissions for the individual site to see if the person that can publish is listed under there and you are not.
I just recently setup MSDeploy access on my server and found the following two tutorials helpful:
http://william.jerla.me/post/2010/03/20/Configuring-MSDeploy-in-IIS-7.aspx
http://code-inside.de/blog-in/2011/04/03/howto-setup-of-webdeploy-msdeploy/
I have also found that mapping a drive to the UNC location can be a work around.
#soupy1976's solution has also worked for me.
I can not explain why one day it will work and one day it won't
Frustrating....

Resources