2

I am trying to enable gzip on IIS on AWS Elastic Beanstalk and I found this link. But I get the following error when I follow the steps mentioned in the link.

This is from the log file:

Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'c:\staging\archive.xml'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at AWSBeanstalkCfnDeploy.DeploymentUtils.getAppPath() in d:\Jenkins\jobs\build-EBDPT-IISCore-V1\workspace\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 304
   at AWSBeanstalkCfnDeploy.DeploymentUtils.ContainerConfigDefaults(String appBundle, String appBundleFinal, String containerConfig) in d:\Jenkins\jobs\build-EBDPT-IISCore-V1\workspace\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 297
   at AWSBeanstalkCfnContainerDefaultsApp.Program.Main(String[] args) in d:\Jenkins\jobs\build-EBDPT-IISCore-V1\workspace\AWSBeanstalkCfnContainerDefaultsApp\Program.cs:line 19

If you got any idea why this is happening, please let me know.

Community
  • 1
  • 1
Rahees NP
  • 21
  • 1
  • 1
    This is essentially a 404... It's saying that Archive.xml is not there; it can't zip it if it's not there. – hephalump Apr 16 '16 at 11:52

1 Answers1

0

I was experiencing the same error when trying to deploy an ASP.NET web application with AWS Elastic Beanstalk and I think I've figured it out.

When deploying a .zip the EB deployment tool extracts the contents to c:\staging and then runs config files inside .ebextensions folder. During which it seems the EB deployment tool looking for an archive.xml file that would typically be included inside an MS Web-Deploy package zip - which usually include this and other files at the root level:

Content/
archive.xml
parameters.xml
systemInfo.xml

The zip file I was deploying wasn't packaged using MS Web-Deploy so didn't include these files. I've updated my build process to package my web application using web-deploy:

msbuild MyWebApplication.csproj /T:Package
cwills
  • 2,136
  • 23
  • 17