Subscribe and Follow

     AngularJs Ajax localhost Web Api  calling  If you want to request CORS support   Error -------- Response to preflight request d...

     AngularJs Ajax localhost Web Api  calling If you want to request CORS support 


Error
--------
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. 405 Error Showing response Return


Solution
------------

Go To you api project ----> Global.asax below code you added and check the your Project

public class MvcApplication : HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
        protected void Application_BeginRequest(Object sender, EventArgs e)
        {
            if (HttpContext.Current.Request.IsSecureConnection.Equals(false) && HttpContext.Current.Request.IsLocal.Equals(false))
            {
                Response.Redirect("https://" + Request.ServerVariables["HTTP_HOST"]
            + HttpContext.Current.Request.RawUrl);
            }
        }
    }

0 comments:

Update panel uses asp.net recall the script function  < script type="text/javascript"> $ ( function () {...

Update panel uses asp.net recall the script function





 <script type="text/javascript">

$(function () {
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(yourown);
});
function yourown(
{
alert();
}
</script>
Use update panel in asp.net page button click (or) postback events at the time some script fuction recall usage at time this script using for usfully to recall the fuction .

0 comments:

Google launches new Awareness API

Google launches new Awareness API Developers can now easily  sign in  order to get an early access preview of this Awareness API. ...

Google launches new Awareness API


Developers can now easily sign in order to get an early access preview of this Awareness API. Here's the announcement video

While developers have the access to all the sensor information for a long time, the Awareness API is easier to implement and does more work, process raw signals with advanced algorithms for improved accuracy, and automatically manages impact on data usage and battery life

0 comments:

  SignalIr  Framework  V 4.0  Installation Error Solved Try To  nuget package console use Any previous versions installed  uninstall...

  SignalIr Framework V 4.0  Installation Error Solved



Try To nuget package console use Any previous versions installed  uninstall first after. Try
                         install-package Microsoft.AspNet.SignalR -Version 1.1.3

0 comments: