[MantisConnect] [MantisConnect 1.0a5] ASP.NET C# problem. Need help!
Brought to you by:
vboctor
From: Sietse v. d. S. <Sie...@ao...> - 2007-08-23 13:05:36
|
This is a cross post with the Mantis Help forum.=20 I think this is a more suitable place for this. =20 =20 =20 To get adjusted to working with MantisConnect1.0.5a I am working at porting MantisSubmit to ASP.NET in C#. I use Microsoft Visual Studio 2005, Mantis and MantisConnect are running at a IIS 6.0 server. =20 I run into the following problem: When this line is executed. =20 [code] session =3D new Session(mantisConnectUrl, mantisUserName, = mantisPassword, nc); [/code] =20 I get the following error: =20 Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.=20 Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers. =20 I included Futureware.MantisConnect.dll as a reference. And http://192.168.0.32/mantisdev/mc/mantisconnect.php?wsdl as a webservice =20 [code] =20 using System.Collections; using System.Drawing; using System.ComponentModel; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Net; =20 using Futureware.MantisConnect; =20 public partial class _Default : System.Web.UI.Page=20 { protected void Page_Load(object sender, EventArgs e) { try { bool populating =3D false; NetworkCredential nc =3D null; Session session =3D null; =20 string basicHTTPAuthUserName =3D ""; string basicHTTPAuthPassword =3D ""; if ((basicHTTPAuthUserName !=3D null) && (basicHTTPAuthUserName.Length > 0) && (basicHTTPAuthPassword !=3D null)) = { nc =3D new NetworkCredential(basicHTTPAuthUserName, basicHTTPAuthPassword); } string mantisConnectUrl =3D "http://192.168.0.32/mantisdev/mc/mantisconnect.php"; string mantisUserName =3D "administrator"; string mantisPassword =3D "ao-ict"; =20 session =3D new Session(mantisConnectUrl, mantisUserName, mantisPassword, nc); // session.Connect(); =20 populating =3D true; // ddlCustomer.DataSource =3D session.Request.UserGetAccesibleProjects(); populating =3D false; =20 } catch (Exception ex) { Response.Write(ex.Message + " Webservice Error "); } } } [/code] =20 Best regards, =20 Sietse=20 =20 =20 =20 =20 |