Sending Email is a very easy thing in ASP.NET. In ASP.NET MVC we can render our view as email template. There are bunch of third party packages. So recently I got to know Postal package More About Postal So I created Quick sample using Postal. You can find working sample here Video On Youtube Advertisements
Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘<domain>’
So I found a useful Package to read excel files easily. No more cumbersome codes needed. I have written post
So some times we want to convert object to xml. We can follow severel cumbersome methods. So I am using Utlity methods to convert c# object to xml and xml to c# object. Suppose we have class like below And we want serialize List<Student> to xml. So we can use this utlity function As a example we populate List<student> with dummy data Then call out utility function then out xml variable look like as below
So when I am hosting ASP.NET MVC web site in iis 7 I got following error. So I followed following
read more This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault=”Deny”), or set explicitly by a location tag with overrideMode=”Deny” or the legacy allowOverride=”false”.
what is Expect100Continue Property According to w3.org The purpose of the 100 (Continue) status is to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body. In some cases, it might either be inappropriate or highly inefficient for the client to send the body if the server will reject the message without looking at the body. more details about 100 continue property I got this error when try to call web method in c#. So finally I salved this error by applying following things. Adding following statement right before calling web method System.Net.ServicePointManager.Expect100Continue = false. 2. Adding following section in web.config inside <configuration> <settings> <servicePointManager expect100Continue=”false” /> </settings> more detail on MSDN