iis-docs icon indicating copy to clipboard operation
iis-docs copied to clipboard

Code example does not compile, missing code

Open RobK410 opened this issue 5 years ago • 1 comments

Specifically, it appears sample was taken from a larger code example. This sample does not compile due to missing _serviceProxy and TestDemoModuleServiceProxy, both are not named intuitively enough to direct a user to other documentation.

_serviceProxy = (TestDemoModuleServiceProxy) Connection.CreateProxy(Module, typeof(TestDemoModuleServiceProxy));

I did a github search for this line of code and for TestDemoModuleServiceProxy specifically and nothing came up, so the larger example does not exist in github. Google reports only the docs site with this code, so the example doesn't exist anywhere.

I would suggest any and ALL examples on docs be in a state that can easily be copied and pasted into a program, or have a full example available for review on Github, or download as a zip from the docs site.

The examples on docs are few and far between so it is extremely important that the ones do exist actually are functional.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

RobK410 avatar Mar 24 '20 14:03 RobK410

"are not named intuitively enough to direct a user to other documentation"

They are in fact following the IIS Manager extension manner very well, and sure they come from a big project (similar to https://github.com/phpmanager/phpmanager).

Usually you should use ServerManager.Sites to get started,

https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.administration.servermanager.sites?view=iis-dotnet

lextm avatar Mar 24 '20 19:03 lextm