question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can´t get WebDeploy of a .NET Core 3.1 app to "setACL" for folder

See original GitHub issue

Hi,

I’m trying to create a WebDeploy package from an ASP.NET Core 3.1 app and on that package was trying to use setACL to change my log folder permissions to allow Write. I’ve tried a Parameters.xml + Manifest.xml where Parameters.xml includes: <parameter name="Log Folder" tags="SetAcl" description="Log folder, ex: ./logs" defaultValue="./logs" > <parameterEntry kind="ProviderPath" scope="setAcl" match="\\logs$" /> </parameter> and Manifest.xml includes: <setAcl path="NBWebSeed\\logs" setAclAccess="Write, ReadAndExecute"/>

I’ve tried adding this to my csproj file: `
<Target Name=“SetupCustomAcls” AfterTargets=“AddIisSettingAndFileContentsToSourceManifest”> <ItemGroup> <MsDeploySourceManifest Include=“setAcl”> <Path>$(_MSDeployDirPath_FullPath)\logs</Path> <setAclAccess>Read,Write,Modify</setAclAccess> <setAclResourceType>Directory</setAclResourceType> <AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings> </MsDeploySourceManifest> </ItemGroup> </Target>

<Target Name=“DeclareCustomParameters” AfterTargets=“AddIisAndContentDeclareParametersItems”> <ItemGroup> <MsDeployDeclareParameters Include=“SetAclForLogFolder”> <Kind>ProviderPath</Kind> <Scope>setAcl</Scope> <Match>^$(_EscapeRegEx_MSDeployDirPath)\logs$</Match> <Description>Add write permission to logs folder.</Description> <DefaultValue>{Log Folder}</DefaultValue> <Value>$(_DestinationContentPath)/logs</Value> <Tags>Hidden</Tags> <Priority>$(VsSetAclPriority)</Priority> <ExcludeFromSetParameter>True</ExcludeFromSetParameter> </MsDeployDeclareParameters> </ItemGroup> </Target> `

Nothing seems to work, am I missing something? Is this supported in ASP.NET Core as it was in regular ASP.NET projects?

Thanks and best regards POFerro

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
taralpatel610commented, Mar 11, 2021

@vijayrkn I am facing the same issue. Is there a target documentation for changes made in ASP.NET Core that I can reference to figure out the issue

0reactions
ladenedgecommented, May 4, 2021

Looks like this is the same issue mentioned in #12485 and #12476, as well as another Stack Overflow question. 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you set ACLs in an ASP.NET Core Web Deploy ...
MSDeployPackage.targets, but I can't seem to make it work. I get this sort of error during package build: The target "MSDeployPackagePublish" ...
Read more >
Locked Files When Publishing .NET Core Apps to IIS with ...
By default WebDeploy doesn't place an app_offline.htm file into the folder while publishing which is really bad form. Publish Profile Setting: ...
Read more >
Troubleshoot Web Deploy problems with Visual Studio
The article helps you troubleshoot a series of errors when trying to publish from Visual Studio to a server that hasn't been correctly ......
Read more >
ASP.NET Web Deployment using Visual Studio
This tutorial series shows how to deploy (publish) an ASP.NET web application to Azure App Service Web Apps or to a third-party hosting ......
Read more >
ASP.NET Web Site Project Publishing and Changing ACLs
When publishing ASP.NET Web Site Projects, the project publish will overwrite server ACLs by clearing them to the inherited defaults and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found