HTTP 500 response connecting CCTray to CC.NET server via dashboard via RawXmlMessage.aspx
Asked Answered
F

1

13

I'm using CC.NET 1.6 server and its corresponding CCTray connecting happily via remoting but need to change to use the dashboard connection via HTTP so that I can start farming the URL out to developers.

Putting my dashboard URL into CCTray:

http://localhost/CruiseControl/server/local/ViewServerReport.aspx

Results in CCTray returning

Failed to connect to server: The remote server returned an error: (500) Internal Server Error.

If I check my IIS logs, I can see the request was turned into a POST to this location and the log confirms the 500 response.

/CruiseControl/server/local/ViewServerReport.aspx/server/localhost/RawXmlMessage.aspx

If I navigate to that URL via GET - I get some Xml with error "Unable to process error: Root element is missing". This could be an artifact of me doing a GET instead of a POST of course.

Note: Yes I am using localhost in the URL as it is all contained on the one machine at the moment, if I can get this to work then I will of course change to use better hostname.

Fenestella answered 7/3, 2012 at 0:26 Comment(0)
F
10

Worked this out after upgrading to cc.net 1.8

1) Check dashboard.config for server name

Use fiddler to watch the request go through and observe the dashboard server name

http://localhost/CruiseControl/server/yourdomain.com/ViewServerReport.aspx

In the above case it is yourdomain.com

Open your dashboard.config and make sure there is an entry with the same name

<server name="yourdomain.com" url="tcp://localhost:21234/CruiseManager.rem" allowForceBuild="true" allowStartStopBuild="true" backwardsCompatible="false" />

2) Check IIS request validation

Check your application pool for Cruise Control's IIS. If it is .NET 4.0 then you need this in your web.config

<httpRuntime requestValidationMode = "2.0" />

That config is sitting in cc.net 1.8 web.config but needs uncommenting

3) Try again, you should be good - if not observe responses in fiddler

Fenestella answered 2/8, 2012 at 4:7 Comment(2)
<httpRuntime requestValidationMode = "2.0" /> was the issueDamaging
Right! I changed the application pool in IIS mgmnt console (in win server 2012) to a .net 4.0 pool, than uncommented the httpruntime-setting in web.config of the dashboard-folder, and then it worked!Oedipus

© 2022 - 2024 — McMap. All rights reserved.