You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new web app project in VS at c:\projects\webapp1
From the CLI, in c:\projects, run `dotnet publish .\webapp1\project.json --output .\pubtest
If you run dotnet publish --output ..\pubtest\ from inside the webapp1 directory it works fine.
Expected behavior
The published web.config to be correctly updated with the relevant parameters.
Actual behavior
web.config isn't updated, and the the CLI spits out:
Configuring the following project for use with IIS: './pubtest'
No web.config found. Creating './pubtest\web.config'
Could not find a part of the path 'C:\Projects\WebApplication1\pubtest\web.config'.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Projects\WebApplication1\pubtest\web.config'
.
at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize,
FileOptions options, FileStream parent)
at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSiz
e, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOp
tions options)
at Microsoft.AspNetCore.Server.IISIntegration.Tools.PublishIISCommand.Run()
at Microsoft.AspNetCore.Server.IISIntegration.Tools.Program.<>c__DisplayClass0_0.<Main>b__0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.AspNetCore.Server.IISIntegration.Tools.Program.Main(String[] args)
publish: Published to ./pubtest
web.config looks like:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>
If you then publish this to Azure you get a CGI error.
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
The text was updated successfully, but these errors were encountered:
Steps to reproduce
If you run
dotnet publish --output ..\pubtest\
from inside thewebapp1
directory it works fine.Expected behavior
The published web.config to be correctly updated with the relevant parameters.
Actual behavior
web.config isn't updated, and the the CLI spits out:
web.config looks like:
If you then publish this to Azure you get a CGI error.
Environment data
dotnet --info
output:The text was updated successfully, but these errors were encountered: