Tuesday, October 10, 2017

.net Core HTTP Error 405.0 - Method Not Allowed

When you try to do PUT and DELETE request using .net Core you get  "HTTP Error 405.0 - Method Not Allowed",

The solution is :
The WebDAVModule set PUT and DELETE request methods disabled by default. so you should disable it.

inside your Web.config :

  <system.webServer>   
    <modules runAllManagedModulesForAllRequests="false">
          <remove name="WebDAVModule" />
    </modules>
  </system.webServer>

Thursday, October 5, 2017

.Net Core 2 How to Send an Email using HTML Physical File System as a Template & SmtpClient.

.Net Core 2 How to Send an Email using HTML Physical File System as a Template & SmtpClient.

From .NET Core V2.0 you can use your old famous friend "SmtpClient", However, this example will Show you: How to send an email using HTML physical file system as a template.

You can find the project Github rep here: https://github.com/naadydev/Dotnet_Core_HTML_File_EMail_Template 

hope you find it useful for you (: naadydev@gmail.com 

Tuesday, October 3, 2017

.net Core application path & Information

Try your self the following Code to get the physical Application Directory path and the assembly information: