Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'

C

Chupacabra

I have a VB.NET application that used to work against Project Server 2007.
However, we have built a new Project Server 2007 SP1 machine, and I cannot
authenticate to it anymore. As far as I know everything is configured the
same as the old (now retired) server.

The error I get is:

Client found response content type of 'text/html; charset=utf-8', but
expected 'text/xml'

The code that causes it is the LoginWindows.Login() call. The code below I
horked from somewhere and massaged it until it worked great on the original
Project Server 2007. I have Web References set up for AdminWebSvc,
LoginWindowsSvc, ResourceWebSvc, and TimeSheetWebSvc all pointing to the new
URL. I even deleted them and recreated them to no avail. The relevant code
is below:

Dim LoginWindows As New LoginWindowsSvc.LoginWindows

Dim TimeSheetSvc As New TimeSheetWebSvc.TimeSheet()
Dim ResourceSvc As New ResourceWebSvc.Resource()
Dim AdminSvc As New AdminWebSvc.Admin()
Dim ResourceDS As ResourceWebSvc.ResourceDataSet

TimeSheetSvc.Url = PROJECT_SERVER_URL + TIMESHEET_SERVICE_PATH
TimeSheetSvc.UseDefaultCredentials = True

ResourceSvc.Url = PROJECT_SERVER_URL + RESOURCE_SERVICE_PATH
ResourceSvc.UseDefaultCredentials = True

AdminSvc.Url = PROJECT_SERVER_URL + ADMIN_SERVICE_PATH
AdminSvc.UseDefaultCredentials = True

LoginWindows.Url = PROJECT_SERVER_URL + LOGIN_SERVICE_PATH
LoginWindows.Credentials = CredentialCache.DefaultCredentials

LoginWindows.Login()

Any idea what is causing the mismatch of text/html and text/xml? Thanks
much in advance!
 
C

Chupacabra

Upon further review, I'm getting HTML back because Sharepoint is throwing an
error in HTML format, the meat of which is:

"The file you are attempting to save or retrieve has been blocked from this
Web site by the server administrators."

Will keep digging...
 
C

Chupacabra

Turns out it was because I had mistyped the URL, and Sharepoint was spitting
back a nice pretty HTML error message. Once I fixed the typo in the URL,
everything works just peachy! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top