1

Topic: Core: controlers and

I here  on a subject also would be desirable  more general-purpose. Also there was that a thing useful, especially on shared-virtualke or at shortage of storage once at me root  minute  More low simple implementation. A question in that as though to make it is is more general-purpose. Means here that - would not be desirable to invent all list  which covers all controlers and . Where that in Program. Main we remember all configured hosts-addresses. They will be necessary then when the Host will be launched. public static readonly List <string> Addresses = new List <string> (); public static void Main (string [] args) {var host = BuildWebHost (args); try {var adresses = host.ServerFeatures.Get<IServerAddressesFeature> ().Addresses; Addresses. AddRange (adresses. Select (x = x. Replace ("://+","://localhost").Replace ("://0.0.0.0", "://localhost")));} catch (Exception ex) {Console. WriteLine ("Oops:" + ex. GetExceptionDigest ());} host. Run ();} Somewhere  Startup () it is yanked necessary . For simplification only one   - root. ThreadPool. QueueUserWorkItem (_ => {//we would Give 2 seconds that host. Run () "was launched", to  it always is quickly fulfilled. Thread. Sleep (2000); var httpHost = Program. Addresses. FirstOrDefault ()?? "http://localhost:5000"; Stopwatch startAt = Stopwatch. StartNew (); try {HttpClient c = new HttpClient (); var bytes = c. GetByteArrayAsync (httpHost).Result; _StartUpLogger. LogInformation ($ "Pre-JITed [{httpHost}] in {startAt. Elapsed}");} catch (Exception ex) {_StartUpLogger. LogWarning ($ "Pre-JIT [{httpHost}] failed." + ex. GetExceptionDigest ());}});

2

Re: Core: controlers and

Hello, VladCore, you wrote: VC> I here  on a subject also would be desirable  more general-purpose. The approximate plan of action: 1) by Prekompilirovat of representation 2) To Walk on types and to pull method RuntimeHelpers. PrepareMethod for all successively (except abstract and ).

3

Re: Core: controlers and

Hello, hardcase, you wrote: H> the Approximate plan of action: H> 1) Prekompilirovat of representation of Thanks, I at first was delighted, but then read it Razor view precompilation is currently unavailable when performing a self-contained deployment (SCD) in ASP.NET Core 2.0. The feature will be available for SCDs when 2.1 releases. For more information, see View compilation fails when cross-compiling for Linux on Windows. Well and it is ambiguous - if on   SCD under  will be ok or not? On days off I will check up. H> 2) To Walk on types and to pull method RuntimeHelpers. PrepareMethod for all successively (except abstract and ). ok. So it is possible controlers , but I am almost assured all main resources guzzle  Vjuh. Them still  it is necessary before

4

Re: Core: controlers and

Hello, VladCore, you wrote: VC> ok. So it is possible controlers , but I am almost assured all main resources guzzle  Vjuh. Them still  it is necessary. It is almost assured that JIT  almost does not occupy time. Here  - quite another matter, in this side also it is necessary to dig them.

5

Re: Core: controlers and

Hello, hardcase, you wrote: VC>> ok. So it is possible controlers , but I am almost assured all main resources guzzle  Vjuh. Them still  it is necessary. H> it is almost assured that JIT  almost does not occupy time. Here  - quite another matter, in this side also it is necessary to dig them. I.e. explicit  itself at start remain  while?

6

Re: Core: controlers and

VC> Hello, hardcase, you wrote: VC>>> ok. So it is possible controlers , but I am almost assured all main resources guzzle  Vjuh. Them still  it is necessary. H>> it is almost assured that JIT  almost does not occupy time. Here  - quite another matter, in this side also it is necessary to dig them. Well I and wrote. VC> i.e. explicit  itself at start remain  while? I answer to myself - at cross-compilation  really not pre-kompiljatsja. But also publish does not fall. To sense from  it is imperceptible - for the first call HttpClient. GetBytesAsync (myHostAddress).Result that with pre-compilation that without, 2 seconds on  and on normal PC are fulfilled 10-30 seconds.

7

Re: Core: controlers and

Hello, VladCore, you wrote: VC> to Sense from  it is imperceptible - for the first call HttpClient. GetBytesAsync (myHostAddress).Result that with pre-compilation that without, 2 seconds on  and on normal PC are fulfilled 10-30 seconds. It looks as any  warming up of interiors of a Web server. It would be necessary  to look, whence such brakes. There can be it on file system for any  .

8

Re: Core: controlers and

Hello, hardcase, you wrote: H> It looks as any  warming up of interiors of a Web server. It would be necessary  to look, whence such brakes. There can be it on file system for any  . Characteristic  is more similar to check CRL for any of certificates by which something from the loaded code is signed.

9

Re: Core: controlers and

Hello, Sinclair, you wrote: H>> It looks as any  warming up of interiors of a Web server. It would be necessary  to look, whence such brakes. There can be it on file system for any  . S> Characteristic  is more similar to check CRL for any of certificates by which something from the loaded code is signed. Can indeed, but not only the certificate and and signatures of assembly. On  like signatures certificates at level of OS is not present, is only assembly sign specially rechecked - with pure   dotnet publish downloads in a folder   1071 mbytes, it not an error, it is more than gigabyte. Packets if that only four: <ItemGroup> <PackageReference Include = "Google. Cloud. Datastore. V1" Version = "2.0.0"/> <PackageReference Include = "Microsoft. AspNetCore. All "Version =" 2.0.0"/> <PackageReference Include ="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation"Version =" 2.0.1"/> <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design "Version =" 2.0.0"/> </ItemGroup> Guglovsky packets if that only 47 mbytes, remaining - asp.net to a bark and for studio weigh.

10

Re: Core: controlers and

Hello, VladCore, you wrote: VC> Can indeed, but not only the certificate and and signatures of assembly. On  like signatures certificates at level of OS is not present, is only assembly sign Forgive, and what such assembly sign? I somehow superficially understand this area. All life supposed that  everywhere approximately same, and a question exceptional in the mechanism of propagation of keys. To me such two mechanisms - PKI and PGP are known only. PKI just spreads keys by means of certificates. Really signing of assembly  on  is based on PGP?

11

Re: Core: controlers and

Hello, Sinclair, you wrote: S> Forgive, and what such assembly sign? S> I somehow superficially understand this area. I do not think S> All life supposed that  everywhere approximately same, and a question exceptional in the mechanism of propagation of keys. S> to me such two mechanisms - PKI and PGP are known only. S> PKI just spreads keys by means of certificates. Really signing of assembly  on  is based on PGP? Strong key: Project properties-> Signing-> Choose a strong name key file.  it is not required. Keyword Assembly is visible? Without a keyword - the signature of any , not only.net with

12

Re: Core: controlers and

Hello, VladCore, you wrote: VC> Strong key: Project properties-> Signing-> Choose a strong name key file.  it is not required. And, thanks, it, of course, , but not that which I meant. VC> keyword Assembly is visible? Without a keyword - the signature of any , not only.net with  Well as though yes. I absolutely precisely remember such behavior ( applications on start) at testing  web applications in the closed sandbox. I so understand that we loaded in the domain whether the assembly, whether  DLL with flag Force Integrity. It is interesting, what does  on  at loading of the code signed by the certificate and equipped with such flag? If that, chktrust on  too is, so means for such check available. https://lowleveldesign.org/2017/03/07/h … ssemblies/

13

Re: Core: controlers and

Hello, Sinclair, you wrote: S> it is interesting, what does  on  at loading of the code signed by the certificate and equipped with such flag? At level OS of check on  for  as far as I know is not present. Some  the files together with public key and under the signature on each file. The signature and public key - separate files. It is possible to check up, but to the discretion of that user who will be . Not  - do not check the signature on  the Organized check of the signature is only for repositories only. S> If that, chktrust on  too is, so means for such check available. S> https://lowleveldesign.org/2017/03/07/h … ssemblies/ it from mono, but not from dotnet P.S. On  very much  an expert to check the hash-sum after downloading. Microsoft in all docker-images microsoft/dotnet checks downloaded dotnet with the help sha512