Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




IIS authentication issue & REST api

web-app

I am trying to configure  the gemama mail add-on. I disabled IIS anonymous authentication but now I cannot access Gemini website at all. I receive this error: "

401 - Unauthorized: Access is denied due to invalid credentials."


When I enable anonymous authentication again. Gemini works as expected.  But then I have issues using .net client API to access gemama

any help is appreciated..thanks

I am using :

gemini 3.6.5
IIS 7.5
windows server 2008
forms authentication

xcarter
· 1
xcarter
Replies (7)
helpful
0
not helpful

If you are using forms authentication then you must enable anonymous access in IIS.

What is the error you are getting from the API?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

here is the stack trace. I am trying  use the Gemini mail machine add-on

[XmlException: '100' is an unexpected token. The expected token is '"' or '''. Line 20, position 71.]
System.Xml.XmlTextReaderImpl.Throw(Exception e) +95
System.Xml.XmlTextReaderImpl.ParseAttributes() +5089799
System.Xml.XmlTextReaderImpl.ParseElement() +378
System.Xml.XmlTextReaderImpl.ParseElementContent() +199
System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) +229
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +61
System.Xml.XmlDocument.Load(XmlReader reader) +134
System.Xml.XmlDocument.Load(Stream inStream) +103
CounterSoft.Gemini.Commons.Rest.Serializer.ConvertToObject(Stream stream) +95
CounterSoft.Gemini.WebServices.BaseService.GetObjectFromResponse(Stream stream) +276
CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response) +291
CounterSoft.Gemini.WebServices.BaseService.ProcessResponse(String url, Object obj, RequestType requestType) +1249
CounterSoft.Gemini.WebServices.BaseService.GetResponse(String url, Object o, RequestType r) +86
CounterSoft.Gemini.WebServices.AdminService.GetIssueRisk() +84
WebApplication1.Default.Help() in C:\data\codeplex\gemama\GeminiMailMachine\Default.aspx.cs:48
WebApplication1.
Default.Page_Load(Object sender, EventArgs e) in C:\data\codeplex\gemama\GeminiMailMachine\Default.aspx.cs:15
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


xcarter
· 1
xcarter
helpful
0
not helpful

Can you please run Fiddler2 (http://www.fiddler2.com/fiddler2/) and inspect the response that you are getting back from the server.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

OK here is the fiddler  output. I  still don't have any clues from it.

<html>
    <head>
        <title>'100' is an unexpected token. The expected token is '&quot;' or '''. Line 20, position 71.</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/GeminiMailMachine' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>'100' is an unexpected token. The expected token is '&quot;' or '''. Line 20, position 71.</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

            <br><br>

            <b> Exception Details: </b>System.Xml.XmlException: '100' is an unexpected token. The expected token is '&quot;' or '''. Line 20, position 71.<br><br>

            <b>Source Error:</b> <br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

                  </td>
               </tr>
            </table>

            <br>

            <b>Stack Trace:</b> <br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

[XmlException: '100' is an unexpected token. The expected token is '&quot;' or '''. Line 20, position 71.]
   System.Xml.XmlTextReaderImpl.Throw(Exception e) +95
   System.Xml.XmlTextReaderImpl.ParseAttributes() +5089799
   System.Xml.XmlTextReaderImpl.ParseElement() +378
   System.Xml.XmlTextReaderImpl.ParseElementContent() +199
   System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) +229
   System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +61
   System.Xml.XmlDocument.Load(XmlReader reader) +134
   System.Xml.XmlDocument.Load(Stream inStream) +103
   CounterSoft.Gemini.Commons.Rest.Serializer.ConvertToObject(Stream stream) +95
   CounterSoft.Gemini.WebServices.BaseService.GetObjectFromResponse(Stream stream) +276
   CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response) +291
   CounterSoft.Gemini.WebServices.BaseService.ProcessResponse(String url, Object obj, RequestType requestType) +1249
   CounterSoft.Gemini.WebServices.BaseService.GetResponse(String url, Object o, RequestType r) +86
   CounterSoft.Gemini.WebServices.AdminService.GetIssueRisk() +84
   WebApplication1.Default.Help() in C:\data\codeplex\gemama\GeminiMailMachine\Default.aspx.cs:48
   WebApplication1.
Default.PageLoad(Object sender, EventArgs e) in C:\data\codeplex\gemama\GeminiMailMachine\Default.aspx.cs:15
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
</pre></code>

                  </td>
               </tr>
            </table>

            <br>

            <hr width=100% size=1 color=silver>

            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

            </font>

    </body>
</html>
<!--
[XmlException]: '100' is an unexpected token. The expected token is '&quot;' or '''. Line 20, position 71.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseAttributes()
   at System.Xml.XmlTextReaderImpl.ParseElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   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.GetObjectFromResponse[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.AdminService.GetIssueRisk()
   at WebApplication1.
Default.Help() in C:\data\codeplex\gemama\GeminiMailMachine\Default.aspx.cs:line 48
   at WebApplication1.Default.PageLoad(Object sender, EventArgs e) in C:\data\codeplex\gemama\GeminiMailMachine\Default.aspx.cs:line 15
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.defaultaspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\geminimailmachine\36fdcd11\22668d10\AppWeb_u5gshglz.0.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->


xcarter
· 1
xcarter
helpful
0
not helpful

   CounterSoft.Gemini.WebServices.AdminService.GetIssueRisk() +84
   WebApplication1._Default.Help() in C:\data\codeplex\gemama\GeminiMailMachine\Default.aspx.cs:48

the above indicates that your calling gemama with the help-parameter. This will trigger a call to WebServices.AdminService.GetIssueRisk() - which seems to fail.

This indicates that there an issue with the service-usage of your installation - either because of an misconfiguration in web.config or an restricition imposed by the authentifications configured on the site.

I would recommend download of Gemini API Test Harness in order to verify the REST api functionallity of the installation.

kind regards

Morten


Modist
· 1
Modist
helpful
0
not helpful

Also, Gemini's system log for errors.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I finally got it to work. The test harness pointed to an authentication problem api folder.  I  had to enable   anonymous authentication on the Gemini api folder and then it worked.  Now I am modifying the gemama add-on code to support SSL smtp.  thanks for your help

xc


xcarter
· 1
xcarter