Base solution for your next web application
Open Closed

Deploying to IIS 8? #767


User avatar
0
amwdrizz created

I am running into an issue on deploying ASP.Net Boilerplate to IIS 8 / Windows 2012 R2. I have a Windows 2012 R2 server spun up with a default install of IIS 8/8.5? (Which ever comes with it). Enabled ASP.Net 4.5, installed .Net 4.5.2 web installer so it has .Net 4.5.2 installed. Doing a file layout publish (not a web pack zip file). The database is configured, and seeded. The website correctly points to the database.

I get the following error:

The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.

Source Error:

Line 70:                     <label class="control-label visible-ie8 visible-ie9">Tenancy Name</label>
Line 71:                     <input type="text" class="form-control form-control-solid placeholder-no-fix" id="TenancyName" name="TenancyName" placeholder="Tenancy name" maxlength="@Onyxeye.MultiTenancy.Tenant.MaxTenancyNameLength">
Line 72:                     <span class="text-muted">@L("CanBeEmptyToLoginAsHost")</span>
Line 73:                 </div>
Line 74:             }

Stack Trace:

[InvalidDataException: The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.]
   System.IO.Compression.GZipDecoder.ReadHeader(InputBuffer input) +8407780
   System.IO.Compression.Inflater.Decode() +560
   System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset, Int32 length) +118
   System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count) +85
   System.Xml.XmlTextReaderImpl.InitStreamInput(Uri baseUri, String baseUriStr, Stream stream, Byte[] bytes, Int32 byteCount, Encoding encoding) +350
   System.Xml.XmlTextReaderImpl.FinishInitStream() +79
   System.Xml.XmlReaderSettings.CreateReader(Stream input, Uri baseUri, String baseUriString, XmlParserContext inputContext) +111
   System.Xml.XmlReader.Create(Stream input, XmlReaderSettings settings, String baseUri) +50
   System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options) +119
   System.Data.Entity.Migrations.Edm.ModelCompressor.Decompress(Byte[] bytes) +108
   System.Data.Entity.Migrations.History.HistoryRepository.GetLastModel(String& migrationId, String& productVersion, String contextKey) +1256
   System.Data.Entity.Internal.InternalContext.QueryForModel(DatabaseExistenceState existenceState) +344
   System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) +72
   System.Data.Entity.Internal.InternalContext.CompatibleWithModel(Boolean throwIfNoMetadata, DatabaseExistenceState existenceState) +72
   System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) +128
   System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +66
   System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +596
   System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +208
   System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +263
   Abp.EntityFramework.AbpDbContext.Initialize() +101
   Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.ApplyConcerns(IEnumerable`1 steps, Object instance) +98
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) +83
   Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) +27
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally) +57
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) +29
   Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) +282
   Castle.MicroKernel.Handlers.ExtendedHandler.InvokeResolvePipeline(Int32 extensionIndex, ResolveInvocation invocation) +119
   Castle.MicroKernel.Handlers.ComponentLifecycleExtension.Intercept(ResolveInvocation invocation) +342
   Castle.MicroKernel.Handlers.ExtendedHandler.InvokeResolvePipeline(Int32 extensionIndex, ResolveInvocation invocation) +261
   Castle.MicroKernel.Handlers.ExtendedHandler.Resolve(CreationContext context, Boolean instanceRequired) +101
   Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy) +154
   Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) +74
   Castle.Windsor.WindsorContainer.Resolve() +65
   Abp.EntityFramework.Uow.EfUnitOfWork.GetOrCreateDbContext() +214
   Castle.Proxies.EfRepositoryBase`2Proxy_2.get_Context_callback() +24
   Castle.Proxies.Invocations.EfRepositoryBase`3_get_Context_4.InvokeMethodOnTarget() +40
   Castle.DynamicProxy.AbstractInvocation.Proceed() +116
   Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) +73
   Castle.DynamicProxy.AbstractInvocation.Proceed() +595
   Castle.Proxies.EfRepositoryBase`2Proxy_2.get_Context() +154
   Castle.Proxies.EfRepositoryBase`2Proxy_2.get_Table_callback() +15
   Castle.Proxies.Invocations.EfRepositoryBase`3_get_Table_4.InvokeMethodOnTarget() +40
   Castle.DynamicProxy.AbstractInvocation.Proceed() +116
   Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) +73
   Castle.DynamicProxy.AbstractInvocation.Proceed() +595
   Castle.Proxies.EfRepositoryBase`2Proxy_2.get_Table() +154
   Castle.Proxies.EfRepositoryBase`2Proxy_2.GetAll_callback() +14
   Castle.Proxies.Invocations.EfRepositoryBase`3_GetAll_4.InvokeMethodOnTarget() +36
   Castle.DynamicProxy.AbstractInvocation.Proceed() +116
   Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) +73
   Castle.DynamicProxy.AbstractInvocation.Proceed() +595
   Castle.Proxies.EfRepositoryBase`2Proxy_2.GetAll() +154
   Abp.EntityFramework.Repositories.&lt;GetAllListAsync&gt;d__3.MoveNext() +80
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   Abp.Localization.&lt;GetLanguagesFromDatabaseAsync&gt;d__35.MoveNext() +788
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +49
   Abp.Threading.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__10`1.MoveNext() +1020
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   Abp.Runtime.Caching.&lt;&lt;GetAsync&gt;b__c>d__f.MoveNext() +339
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +49
   Abp.Runtime.Caching.<GetAsync>d__1.MoveNext() +1459
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   Abp.Runtime.Caching.<GetAsync>d__13`2.MoveNext() +547
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +49
   Abp.Localization.<GetLanguageDictionary>d__2a.MoveNext() +483
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   Abp.Localization.<GetLanguagesAsync>d__0.MoveNext() +288
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +49
   Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task`1 task) +100
   System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() +106
   System.Threading.Tasks.Task.Execute() +110
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +49
   Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task`1 task) +100
   Nito.AsyncEx.AsyncContext.Run(Func`1 action) +422
   Abp.Localization.ApplicationLanguageProvider.GetLanguages() +59
   Abp.Localization.MultiTenantLocalizationDictionaryProvider.GetDictionaries() +54
   Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource.GetStringOrNull(String name, CultureInfo culture, Boolean tryDefaults) +69
   Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource.GetString(String name, CultureInfo culture) +26
   ASP._Page_Views_Account_Login_cshtml.Execute() in c:\Program Files (x86)\Onyxeye\Onyxeye Web App Installer\ONX_OUT\Views\Account\Login.cshtml:72
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +143
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +110
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +109
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +97
   System.Web.Mvc.Async.&lt;&gt;c__DisplayClass21.&lt;BeginInvokeAction&gt;b__1e(IAsyncResult asyncResult) +241
   System.Web.Mvc.Controller.&lt;BeginExecuteCore&gt;b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   Castle.DynamicProxy.AbstractInvocation.Proceed() +116
   Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) +143
   Castle.DynamicProxy.AbstractInvocation.Proceed() +595
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +19
   Castle.DynamicProxy.AbstractInvocation.Proceed() +116
   Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) +143
   Castle.DynamicProxy.AbstractInvocation.Proceed() +595
   System.Web.Mvc.MvcHandler.&lt;BeginProcessRequest&gt;b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

Everything works on my dev system. Which is Windows 8.1, VS2015, IIS Express. But for some reason when moved over to a production IIS server it doesn't seem to work. Any thoughts?


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    It seems related to EntityFramework. See <a class="postlink" href="http://stackoverflow.com/questions/10087508/the-magic-number-in-gzip-header-is-not-correct-make-sure-you-are-passing-in-a-g">http://stackoverflow.com/questions/1008 ... ing-in-a-g</a> for example.

  • User Avatar
    0
    amwdrizz created

    <cite>hikalkan: </cite> It seems related to EntityFramework. See <a class="postlink" href="http://stackoverflow.com/questions/10087508/the-magic-number-in-gzip-header-is-not-correct-make-sure-you-are-passing-in-a-g">http://stackoverflow.com/questions/1008 ... ing-in-a-g</a> for example.

    That was the problem, thank you for catching that. Seems like the __migrationHistory table got corrupted some how. Soon as I truncated that table (emptied it), everything started working as it should.

    Thanks.