Da github IISSample (grazie @ Pawel e Luca), qui ci sono le possibilità di valore:
<!-- This set of attributes are used for launching the sample using IISExpress via Visual Studio tooling -->
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
<!-- This set of attributes are used for launching the sample for full CLR (net451) without Visual Studio tooling -->
<aspNetCore processPath=".\IISSample.exe" arguments="" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
<!-- This set of attributes are used for launching the sample for Core CLR (netcoreapp1.0) without Visual Studio tooling -->
<aspNetCore processPath="dotnet" arguments=".\IISSample.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
Dopo diverse ore che si occupano di loro, ho trovato ci sono due web.configs che dobbiamo affrontare: src\ProjectName\wwwroot\web.config
e src\ProjectName\web.config
. Se non si dispone di quest'ultimo, VS2015 pubblica ne genererà uno per voi con %LAUNCHER_PATH%
e %LAUNCHER_ARGS%
per impostazione predefinita.
Per avere il progetto eseguito e debuggabile localmente in VS2015 tramite IISExpress, entrambi web.config devono avere il valore predefinito sotto. Sostituendo LAUNCHER_PATH e LAUNCHER_ARGS con qualcos'altro, VS2015 si bloccherà indefinitamente.
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
Tuttavia, dopo la distribuzione di IIS (sto usando 8.5 su WinServer 2012 R2), il valore sul src\ProjectName\web.config
deve essere sostituito con il seguente. Se configurato, il comando dotnet publish-iis
suppone di fare la sostituzione per te (vedi sotto).
<aspNetCore processPath="dotnet" arguments=".\ProjectName.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
Se si sta migrando da RC1, change la directory http legata pure alla cartella principale del progetto, non wwwroot. Esempio: da C:\inetpub\ProjectName\wwwroot
a C:\inetpub\ProjectName
.
Per configurepublish-iis
da fare sostituzione automatica, aggiungere questo frammento alla project.json: (Grazie @Pawel)
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final"
}
},
"scripts": {
"postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
}
Il segmento strumento IISIntegration converte queste variabili Launcher ai valori di distribuzione appropriato. Senza di esso, si otterrà il seguente errore:
No executable found matching command "dotnet-publish-iis"
Sto usando Anteprima RC2 Toolkit 1.
Non penso che bisogno di 2 web.config per RC2. Credo che quello di wwwroot sia inutile ora. – maxisam
@maxisam non proprio. il 'progetto \ wwwroot \ web.config' è usato per generare' project \ web.config'. Se configuri il tuo 'project.json' come sopra, userà il tuo' progetto \ wwwroot \ web.config' come modello. –
Ah ... puoi provarlo tu stesso. Funziona correttamente senza avere web.config in wwwroot. E sì, io uso gli stessi script in project.json. In effetti, è come il nuovo modello fa quando si aggiorna a '1.0.0-preview1-002702' – maxisam