Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9248629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:59:13+00:00 2026-06-18T09:59:13+00:00

How can I use an existing webapi service with breeze? Note that my webapi

  • 0

How can I use an existing webapi service with breeze? Note that my webapi service resides at “server1/api” and the web application is at “server2”. I tried changing the service name in the dataservice, but get an XMLHttpRequest Exception 101. This is a cross domain error. Is it possible to use breeze with a webapi service from another domain?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:59:14+00:00Added an answer on June 18, 2026 at 9:59 am

    Cross-origin Breeze Apps

    Yes it is possible to get the Breeze client app from one server and have that Breeze app communicate with a data service hosted on a different server.

    A Breeze client app runs cross-origin quite well on a CORS-supportive browser when the service is configured for CORS.

    Cross-origin issues and CORS solutions are in a more general category of web security problems. They aren’t Breeze-specific. We plan to post a topic on CORS + Breeze in the “Cool Breezes” section of the Breeze web site.


    UPDATE: 10 Dec 2013

    This sample uses a primitive CORS implementation that we no longer recommend if you have upgraded to Web API2. Please read this excellent article “CORS Support in ASP.NET Web API 2” which explains basic CORS and how to engage Web API2 CORS support.

    The rest of this answer remains as originally written.


    Todo Sample with CORS

    Until then, take a look at the code for the Todo Sample. The server for that sample is setup for CORS, has been deployed to todo.breezejs.com, and you can see it in action by looking at the jsFiddle at the bottom of the Breeze Todo Sample topic page.

    Four points of interest:

    • App_Start/BreezeSimpleCorsHandler.cs does the work

    • App_Start/BreezeWebApiConfig.cs turns it on

    // CORS enabled on this server
    GlobalConfiguration.Configuration.MessageHandlers.Add(new BreezeSimpleCorsHandler());
    
    • A Web.config line you’ll need for IIS7 (not needed for IIS8 or VS2012’s IIS Express)

    • Scripts/app/dataservice.js is ready to point to a foreign server; see this line:

      // * Cross origin service example *
      //var serviceName = ‘http://todo.breezejs.com/api/todos‘; // controller in different origin

    Hope that tides you over for now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Everyone who's done any web application development in Scala knows that you can use
I'm adding some Web API services to an existing MVC application. I have a
Via asynchronous HTTP requests, I can use an existing service to load/save some information
How can I get the javac task to use an existing fileset? In my
I am creating a service using Microsoft ASP.NET Web API with the following requirements:
I have added WebApi nuget package and a few api controllers to an existing
How can I use existing WebClient to post a custom HEAD request? I.e. there
How can I use an existing movie source as a background in VLC using
I need to modify an existing web app to use Castle.Windsor as IOC container.
I have started design of a ColdFusion application that is entirely web based. Not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.