2

Has anyone successfully used Postal in an Asp.Net 5? I tried installing Postal.Mvc5 Nuget package in an MVC 6 project, and although the project compiled it gave runtime errors, specifically the following:

An unhandled exception occurred while processing the request.

FileNotFoundException: Could not load file or assembly 'System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
System.Web.Mvc.BuildManagerViewEngine..ctor(IViewPageActivator viewPageActivator, IResolver`1 activatorResolver, IDependencyResolver dependencyResolver, VirtualPathProvider pathProvider)

TypeInitializationException: The type initializer for 'System.Web.Mvc.ViewEngines' threw an exception.
System.Web.Mvc.ViewEngines.get_Engines()

If anyone has managed to get Postal working in MVC 6, please outline the steps involved in getting it successfully configured, and in particular the Asp.Net 5 equivalent of the following smtp configuration.

<configuration>
  ...
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="network">
        <network host="example.org" port="25" defaultCredentials="true"/>
      </smtp>
    </mailSettings>
  </system.net>
  ...
</configuration>
BruceHill
  • 6,954
  • 8
  • 62
  • 114
  • 2
    ASP.NET 5 is rewritten completely, so `System.Web.*` packages are no longer there, that’s why Postal cannot find them. You could maybe add them, but I doubt that ASP.NET 5 can handle them at all. You’re better off waiting for an update (maybe you want to open an issue on the project site), or sticking to MVC5 completely for now. – poke Nov 22 '15 at 21:02
  • Thanks, Poke. I have opened an issue for Asp.Net 5 support. The issue can be found here: https://github.com/andrewdavey/postal/issues/129 – BruceHill Nov 22 '15 at 21:29

0 Answers0