Skip to content

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

Closed
Xiaohongt opened this Issue Mar 25, 2013 · 2 comments

3 participants

@Xiaohongt
SignalR member

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

@NTaylorMullen

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

@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 26, 2013
@NTaylorMullen NTaylorMullen Fixed cross domain issue when setting content type
- Also fixed jsonp fail issues

#947, #1745
17f22b1
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 26, 2013
@NTaylorMullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
233fe3f
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 26, 2013
@NTaylorMullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
6044891
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 27, 2013
@NTaylorMullen NTaylorMullen Fixed cross domain issue when setting content type
- Also fixed jsonp fail issues

#947, #1745
d9de591
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 27, 2013
@NTaylorMullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
ff5f2ce
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 28, 2013
@NTaylorMullen NTaylorMullen Fixed cross domain issue when setting content type
- Also fixed jsonp fail issues

#947, #1745
439a4f6
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 28, 2013
@NTaylorMullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
9d64d81
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 28, 2013
@NTaylorMullen NTaylorMullen Addressed code review comments
- Removed signalRPrivate variable from the common file
- Also minified/compiled changes

#1745
6137b55
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 28, 2013
@NTaylorMullen NTaylorMullen Fixed cross domain issue when setting content type
- Also fixed jsonp fail issues

#947, #1745
98fadf6
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 28, 2013
@NTaylorMullen NTaylorMullen Added defaultContentType property to the signalR object.
- This also included making a private object off of signalR

#947, #1745
f1671c2
@NTaylorMullen NTaylorMullen added a commit that referenced this issue Mar 28, 2013
@NTaylorMullen NTaylorMullen Addressed code review comments
- Removed signalRPrivate variable from the common file
- Also minified/compiled changes

#1745
61415c4
@Xiaohongt Xiaohongt was assigned Mar 28, 2013
@Xiaohongt
SignalR member

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

@Xiaohongt Xiaohongt closed this Apr 1, 2013
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.