Часть строки строки слишком короткая или слишком длинная – Azure

Вопрос:

Я загрузил проект на веб-сайтах Windows Azure, и я получаю странную ошибку.

Server Error in '/' Application.

Version string portion was too short or too long.

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.ArgumentException: Version string portion was too short or too long.

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.

Stack Trace:


[ArgumentException: Version string portion was too short or too long.]
System.VersionResult.SetFailure(ParseFailureKind failure, String argument) +10913423
System.Version.TryParseVersion(String version, VersionResult& result) +424
System.Version.Parse(String input) +68
System.Version..ctor(String version) +23
System.Web.WebPages.Deployment.WebPagesDeployment.GetVersionFromConfig(NameValueCollection appSettings) +73
System.Web.WebPages.Deployment.WebPagesDeployment.GetVersion(String path, NameValueCollection appSettings) +28
System.Web.WebPages.Deployment.PreApplicationStartCode.StartCore(Version testVersion) +34
System.Web.WebPages.Deployment.PreApplicationStartCode.Start() +70

[InvalidOperationException: The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an exception with the following error message: Version string portion was too short or too long..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection'1 methods, Func'1 setHostingEnvironmentCultures) +547
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection'1 methods) +132
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +521

[HttpException (0x80004005): The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an exception with the following error message: Version string portion was too short or too long..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9930568
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36213

Запуск веб-сайта на локальном компьютере в IIS работает отлично. Поиск в Google не принес много. Любые идеи о том, что может быть причиной этой ошибки?

Лучший ответ:

Это было связано с некоторыми перенаправленными переадресациями <assemblyBinding> в web.config. По-видимому, они добавлялись Нугэтом или каким-то процессом. Я удалил все AssemblyBindings, а затем повторно добавил только существенное, и эта ошибка исчезла. Странно, но работал.

Оцените статью
TechArks.Ru
Добавить комментарий