Search Posts

Category: c#

The server responded with a status of 400 (Bad Request) in angular Js with wcf service

I am consuming wcf Service in Angular Js Application. I am trying to creating user registration system using Angular Js by invoking Wcf Service. I got following error when I clicked save button in Angular Js Application … caught SyntaxError: Unexpected token < :52098/HalifaxIISService.svc/RegisterUser Failed to load resource: the server responded with a status of 400 (Bad Request) Registration.js:38 Some error Occured[object Object] Here is wcf service Method. [OperationContract] [WebInvoke(Method = “POST”, RequestFormat = WebMessageFormat.Json, […]

Wcf service with Angular js

I am currently working on wcf project and i am trying to consume in angular js and Windows Form Application. I got some questions to ask … 1. I have wcf self hosted in console application and i defined 4 end point. Is it possible one end point can interact with webhttpbindding and others with net.tcpbindding?? 2. For Windows From Application i want to use net.tcpbindding to communicate with wcf service and webhttpbindding will communicate […]

Download Image from api using angularjs [duplicate]

This question is an exact duplicate of: Binary files corrupted – How to Download Binary Files with AngularJS 2 answers Hi need some help please i want to download image file from api and save it into my local storage i have this code but i only get is the base64 of image? thank you function toDataURL(url, callback) { var xhr = new XMLHttpRequest(); xhr.onload = function() { var reader = new FileReader(); reader.onloadend = […]

Modular .NET Core Web Application with AngularJS and WebAPI [on hold]

I want to working on the Single Page Application Based on .Net Core 2.0 with AngularJS for front-end. We have request that the application must be modular, which means that we must separate Back-end and front-end for each modules. We have been trying to find best approach for the project. We try to use ASP.NET Boilerplate – Application Framework for this approach but i don’t know how to support static files such as html and […]

The Element behavior has invalid child "crossOriginResourceSharingBehavior"

I am consuming wcf service into Angular Js Application and I hosted it in Console Application . I created wcf project by using class library project .I am trying to create user registration system but I got following errors…when I click the submit button .. angular.js:12701 OPTIONS http://localhost:8080/AddUser 405 (Method Not Allowed) (anonymous) @ angular.js:12701 q @ angular.js:12446 (anonymous) @ angular.js:12198 (anonymous) @ angular.js:17000 $digest @ angular.js:18182 $apply @ angular.js:18480 (anonymous) @ angular.js:27290 kg @ […]

Monitor Changes to a Database and Update List

I’m developing a web app to deal with video editing jobs. It has 3 different interfaces:a web browser interface, a mobile app and a desktop app, and they all consume the same web service. The desktop interface is a widget-like app and its only function is to list unfinished jobs. It’s implemented in C#/WPF, and it already lists jobs I want, by doing a GET Http Request to my Web Service. However, if a new […]

Pass AngularJS parameter to ActionResult method

I have google and tried alot of diffrent solutions to this problom, non of them worked. this is as far as I got. I tried passing it with a Action link and a anchor tag. Tried catching it from the url in the actionResult. This anchor tag produce the right url HTML <a class=”link btn btn-default” ng-href=”@Url.Action(“CloseProject”, “Home”)?id={{item.ID}}”>@Resource.CloseProjectButton</a> C# public ActionResult CloseProject() { Guid id = new Guid(Request[“id”]); _fastaSamarbetenRepo.UpdatePropertyBagItemStatusToClosed(id); return RedirectToAction(“Projekt”); } what am I […]