0

最初のページに非常に長い時間がかかる、かなり大規模な ASP.NET および従来の ASP サイトがあります。〜45秒。私は自分のパイプライン (貧弱な人のプロファイリング) に入ることができるすべての場所に AOP ログを記録し、自分の structuremap.start と application_start の間に大きなギャップを見つけました。

    AOP Writes
    Time          What                                      Elapsed
    15:29:24.7537 RiPS.DependencyResolution.IoC.Initialize: 0.209 S
    15:29:24.7747 RiPS.DependencyResolution.StructureMapDependencyScope..ctor: 0 S
    15:29:24.7747 RiPS.DependencyResolution.StructureMapDependencyResolver..ctor: 0 S
    15:29:24.8407 RiPS.DependencyResolution.StructureMapDependencyScope..ctor: 0 S
    15:29:24.8407 RiPS.DependencyResolution.StructureMapDependencyResolver..ctor: 0 S
    15:29:24.8487 RiPS.App_Start.StructuremapMvc.Start: 0.308 S
    *15:29:24.8487* RiPS.App_Start.CustomErrorHander.PreStart: 0 S
    *15:29:42.0499* RiPS.MvcApplication..cctor: 0.001 S
    15:29:42.0499 RiPS.MvcApplication..cctor: 0.004 S
    15:29:42.0569 RiPS.MvcApplication..ctor: 0.002 S
    15:29:42.0569 RiPS.MvcApplication..ctor: 0.005 S
    15:29:43.2311 RipsMVC.Areas.Admin.AdminAreaRegistration..ctor: 0 S
    15:29:43.2311 RipsMVC.Areas.Admin.AdminAreaRegistration.get_AreaName: 0 S



    Manual Writes

    *15:29:24.8487* End Of StructureMapMVC.Start
    *15:29:42.0499* Beginning of MvcApplication ctor
    15:29:42.0569 Beginning of Application_Start
    15:29:46.4005 Beginning of MvcApplication ctor
    15:30:08.6163 Beginning of MvcApplication ctor

注目すべき2つのファイルに手動のnLogログを記録しました

私の Global.asax.cs

public class MvcApplication : System.Web.HttpApplication
{
    public MvcApplication()
    {
        LogManager.GetCurrentClassLogger().Trace("Beginning of MvcApplication ctor");
    }        
    protected void Application_Start()
    {
        LogManager.GetCurrentClassLogger().Trace("Beginning of Application_Start");

と構造図

 public static class StructuremapMvc {
    public static void Start() {
        IContainer container = IoC.Initialize();
        DependencyResolver.SetResolver(new StructureMapDependencyResolver(container));
        GlobalConfiguration.Configuration.DependencyResolver = new StructureMapDependencyResolver(container);
        LogManager.GetCurrentClassLogger().Trace("End Of StructureMapMVC.Start");
    }
}

この 2 つの時点の間に何かが起こっているかどうかはわかりません。しかし、常に15秒以上です。

私がどれほど冗長であるかはわかりませんので、詳細情報のリクエストをお待ちしております。

追加情報 ---> 発生するエラー ASP.NET サイトを開発用に起動し、ビルドが完了するまで F5 キーを押してから 5 秒カウントする必要があるか、このエラーが発生します

=== Pre-bind state information ===
LOG: User = COBALT-PC\Mark
LOG: DisplayName = Ionic.Zip
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Ionic.Zip | Domain ID: 3
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/Mark/Source/Repos/RiPS/RiPS/
LOG: Initial PrivatePath = C:\Users\Mark\Source\Repos\RiPS\RiPS\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Mark\Source\Repos\RiPS\RiPS\web.config
LOG: Using host configuration file: C:\Users\Mark\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/Mark/AppData/Local/Temp/Temporary ASP.NET Files/root/53450db4/7d786924/Ionic.Zip.DLL.
LOG: Attempting download of new URL file:///C:/Users/Mark/AppData/Local/Temp/Temporary ASP.NET Files/root/53450db4/7d786924/Ionic.Zip/Ionic.Zip.DLL.
LOG: Attempting download of new URL file:///C:/Users/Mark/Source/Repos/RiPS/RiPS/bin/Ionic.Zip.DLL.
LOG: Using application configuration file: C:\Users\Mark\Source\Repos\RiPS\RiPS\web.config
LOG: Using host configuration file: C:\Users\Mark\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c
ERR: Failed to complete setup of assembly (hr = 0x800700b7). Probing terminated.

待機すると、ロードするページに関係なく、最初のページに 30 秒かかります。2 回目の読み込みは高速です。

常に Ionic.Zip とは限りません。ソリューション内の任意のファイルがエラーをスローする可能性があります。

また、時々次のエラーが発生します

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1566: Error reading resource file 'c:\Users\Mark\AppData\Local\Temp\Temporary ASP.NET Files\root\8321fd63\20cbf3d0\ResX\resources.gridlocalization.nl-nl.resources' -- 'The system cannot find the path specified. '
4

0 に答える 0