2017-10-05 7 views
2

MVC5アプリケーションを新しい専用サーバーに展開しようとすると、同じエラーが発生します。問題MVC 5をWindows Serverに展開する2014

Microsoft.Web.Infrastructureパッケージを再インストールしようとしました。
また、プロパティ> [ローカルにコピー]をTrueに変更しました。

公開されたbinフォルダにMicrosoft.AI.Webが存在することを確認しました。

はまだ同じエラーメッセージを取得:

誰もが任意のアイデアを得ましたか。 MVCに必要なサーバー構成はありますか?

Server Error in '/' Application. ________________________________________ Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.AI.Web' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileNotFoundException: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.] System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +95 System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +53
System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +44 System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +61
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +49

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +558
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +30
System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +57 System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +54 System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +191
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1086 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +123
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +124 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +700

UPDATE:

私は基本的な空白のMVCアプリケーションの罰金を展開することができます。だから私は、私が配備したいプロジェクトのビュー、モデル、コントローラーを転送するだけだと思っていました。私がこれをすると、私は再びエラーになります。このようなエラーを引き起こす可能性のあるコードがありますか?

+0

このAIはApplication Insightsで使用されています。あなたのプロジェクトでそれを必要としない場合は、それも削除することができます。それ以外の場合は、https://stackoverflow.com/a/39776427/7974050 – Amit

+0

をチェックしてください。これは空白のMVCプロジェクトが標準で提供されるため、必要ないかどうかは不明です。 @Amit – elszeus

+0

あなたのweb.release.configでアセンブリを削除していないかどうか確認してください。 – GGO

答えて

0

皆さん、私が投稿したエラーのためにアプリケーションの洞察をアンインストールすると、404はルーティングの問題でした。ローカルルーティングを実行する場合は問題ありませんが、サーバー上ではルーティングが少し異なります(設定が異なる可能性があります)。我々はUrl.Action(ビュー内)と~/Home/Index(クッキーチェッカー内)を使用して、URLルーティングを成功させました。

これは最初から明白ではなかったので、これが他の人に役立つことを願っています!

関連する問題