Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Host a Windows Service topic #5315

Merged
merged 2 commits into from
Jan 31, 2018
Merged

Update Host a Windows Service topic #5315

merged 2 commits into from
Jan 31, 2018

Conversation

guardrex
Copy link
Collaborator

@guardrex guardrex commented Jan 30, 2018

Replaces #5095

Internal Review Topic

Thanks to @seprix91 for bringing this to our attention.

  • Updates samp to 2.0 and institutes tabs for 1.x coverage.
  • Tested the updated sample.
  • Relative links
  • UE updates

@guardrex guardrex changed the title [WIP] Update Host a Windows Service topic Update Host a Windows Service topic Jan 31, 2018
@guardrex guardrex removed the WIP label Jan 31, 2018

[View or download sample code](https://github.com/aspnet/Docs/tree/master/aspnetcore/host-and-deploy/windows-service/sample) ([how to download](xref:tutorials/index#how-to-download-a-sample)). See the [Next Steps](#next-steps) section for instructions on how to run it.
[View or download sample code](https://github.com/aspnet/Docs/tree/master/aspnetcore/host-and-deploy/windows-service/sample) ([how to download](xref:tutorials/index#how-to-download-a-sample)). For instrucitons on how to run the sample app, see the sample's *README.md* file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instrucitons --> instructions

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DAH! ..... no spell check run this time obviously.


The `binPath` value is the path to the app's executable, including the executable filename itself.
Open an administrator command prompt window to use the [sc.exe](https://technet.microsoft.com/library/bb490995) command-line tool to create and start a service. If the service is named MyService, published to `c:\svc`, and named AspNetCoreService, the commands are:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we use "command shell" instead of "command prompt window". How about "Open a command shell with administrative privileges..."?


## Next steps
1. In `Program.Main`, call the new extension method,`RunAsCustomService`, instead of `RunAsService`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space before RunAsCustomService


1. Publish the app to the folder with `dotnet publish --configuration Release --output c:\\svc`. The command will move the app's assets to the folder, including the required `appsettings.json` file and the `wwwroot` folder with its contents.

1. Open an **administrator** command prompt.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

command prompt --> command shell

@guardrex
Copy link
Collaborator Author

Thanks @scottaddie for the quick review. Changes made. 👍

@scottaddie scottaddie merged commit ce47040 into dotnet:master Jan 31, 2018
@guardrex guardrex deleted the guardrex/windows-service-samp branch January 31, 2018 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants