Skip to content
This repository

JS Client raise error after receive cross-origin negotiate response when EnableCrossDomain = true #1745

Closed
Xiaohongt opened this Issue · 2 comments

3 participants

Xiaohong Tang N. Taylor Mullen Abhishek Nanda
Xiaohong Tang
Collaborator

Repro:
1). map the AspNet.Samples to a IIS web site, e.g. web site Sample
2). update AspNet.Samples Raw/crossdomain.html:
update the connection url to use the web site and machine name (instead of localhost, so the negotiate request will include origin header), e.g.

var connection = $.connection('http://xiaota003-vm02/sample/raw-connection');

3). update RouteConfig.cs to EnableCrossDomain true:

routes.MapConnection<RawConnection>("raw-connection", "raw-connection", new ConnectionConfiguration() { EnableCrossDomain = true });   

4). build the AspNet.Samples web app
5). request the Raw/crossdomain.html from web app

http://localhost:40476/Raw/crossdomain.htm
the negotiate response includes allow-origin headers.

We can see that JS Client raise error and connection become disconnected

This is regression from 1.0.1

N. Taylor Mullen
Collaborator

Awesome find @Xiaohongt . This is actually a regression caused by #947. After removing the Negotiate content type header the request successfully goes through.

N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Fixed cross domain issue when setting content type
- Also fixed jsonp fail issues

#947, #1745
17f22b1
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
233fe3f
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
6044891
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Fixed cross domain issue when setting content type
- Also fixed jsonp fail issues

#947, #1745
d9de591
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
ff5f2ce
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Fixed cross domain issue when setting content type
- Also fixed jsonp fail issues

#947, #1745
439a4f6
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
9d64d81
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Addressed code review comments
- Removed signalRPrivate variable from the common file
- Also minified/compiled changes

#1745
6137b55
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Fixed cross domain issue when setting content type
- Also fixed jsonp fail issues

#947, #1745
98fadf6
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
f1671c2
N. Taylor Mullen NTaylorMullen referenced this issue from a commit
N. Taylor Mullen NTaylorMullen Addressed code review comments
- Removed signalRPrivate variable from the common file
- Also minified/compiled changes

#1745
61415c4
Xiaohong Tang
Collaborator

verified, log a issue #1780 for IE10 with Browser Mode IE9, when stop connection, it causes SCRIPT5007: Object expected connect, line 1 character 1 for the longPolling connection response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.