'--' is an unexpected token. The expected token is '>'. Line 81, position 5.
I am having trouble with the Gemini ReST services. Here is my current environment:
Gemini Version: v3.6.0 Beta 2 Build 2526 CounterSoft.Gemini.Commons.dll Version: 3.6.0.2526 CounterSoft.Gemini.WebServices.dll Version: 3.6.0.2526 Background: I will be using Gemini as a central repository for issues within my company. I need to interface an existing ASP.NET 2.0 web application to send and receive information to/from Gemini. 1. I have configured Gemini to use Windows authentication. Working great. 2. The ASP.NET 2.0 web application is an Intranet application that uses Windows authentication. Working great. 3. Both Gemini and the web application reside on a Windows 2003 server running IIS 6. 4. The web application uses an Application Pool who’s Identity is set to Network ServiceProblem: When the ASP.NET 2.0 web application calls for information from Gemini via the ServiceManager object, the credentials of the application pool are being sent to Gemini for authentication instead of the logged in users credentials. Here is a code snippet of the offending routine:
<code>
ServiceManager serviceManager = new ServiceManager(Properties.Settings.Default.GemniURL, Request.LogonUserIdentity.Name, "", "", true);
UserEN user = serviceManager.UsersService.WhoAmI();
</code>
The behavior I was assuming was, if I set the windowsAuthentication parameter to true, and provided the user’s domain log in name in the username parameter, that the ServiceManager object would authenticate the user specified in the username parameter. What is happening is the Application Pool’s Identity is being passed to Gemini, regardless of the username parameter.
So, to override the Application Pool’s Identity to be used, in the ASP.NET 2.0 web application’s web.config file, I added to the <system.web> config section:
<code>
<identity impersonate="true" />
</code>
Thus, IIS is impersonating the logged in user and not use the Application Pool’s identity. When testing this configuration, I received the following exception:
System.Xml.XmlException was caught Message="'--' is an unexpected token. The expected token is '>'. Line 81, position 5." Source="System.Xml" LineNumber=81 LinePosition=5 SourceUri="http://www.w3.org/TR/html4/strict.dtd" StackTrace: at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.Throw(Exception e) at System.Xml.DtdParser.Throw(Int32 curPos, String res, String[] args) at System.Xml.DtdParser.ThrowUnexpectedToken(Int32 pos, String expectedToken1, String expectedToken2) at System.Xml.DtdParser.ScanClosingTag() at System.Xml.DtdParser.GetToken(Boolean needWhiteSpace) at System.Xml.DtdParser.ParseEntityDecl() at System.Xml.DtdParser.ParseSubset() at System.Xml.DtdParser.ParseExternalSubset() at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset) at System.Xml.DtdParser.Parse(Boolean saveInternalSubset) at System.Xml.XmlTextReaderImpl.DtdParserProxy.Parse(Boolean saveInternalSubset) at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.Load(Stream inStream) at CounterSoft.Gemini.Commons.Rest.Serializer.ConvertToObject[T](Stream stream) at CounterSoft.Gemini.WebServices.BaseService.GetObjectFromReponse[T](Stream stream) at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response) at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType) at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r) at CounterSoft.Gemini.WebServices.BaseService.WhoAmI() at IssueTrackerPOC.GeminiAPI.Page_Load(Object sender, EventArgs e) in <<Snip for security purposes>>\GeminiAPI.aspx.cs:line 32Please advise soonest if you can or cannot replicate this and if replicable, what the fix/patch is.
Also, do you have any recommendations for tools that can be used to interrogate the Xml being passed to and from the ReST service?
dongertz
· 1 |
|
Thursday, December 10, 2009, 12:18:18 AM |