[MantisConnect] [MantisConnect 1.0a5] ASP.NET C# problem. Need help!
Brought to you by:
vboctor
From: Sietse v. <mij...@ho...> - 2007-08-23 13:23:34
|
This is a cross post with the Mantis Help forum. I think this is a more sui= table place for this. To get adjusted to working with MantisConnect1.0.5a = I am working at porting MantisSubmit to ASP.NET in C#.I use Microsoft Visua= l Studio 2005, Mantis and MantisConnect are running at a IIS 6.0 server.I r= un into the following problem:When this line is executed.[code] session = =3D new Session(mantisConnectUrl, mantisUserName, mantisPassword, nc);[/cod= e]I get the following error:Description: The application attempted to perfo= rm an operation not allowed by the security policy. To grant this applicat= ion the required permission please contact your system administrator or cha= nge the application's trust level in the configuration file. Exception Deta= ils: System.Security.SecurityException: That assembly does not allow partia= lly trusted callers.I included Futureware.MantisConnect.dll as a reference.= And http://192.168.0.32/mantisdev/mc/mantisconnect.php?wsdl as a webservice= [code]using System.Collections;using System.Drawing;using System.ComponentM= odel;using System.Web;using System.Web.Security;using System.Web.UI;using S= ystem.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using Sys= tem.Web.UI.HtmlControls;using System.Net;using Futureware.MantisConnect;pub= lic partial class _Default : System.Web.UI.Page { protected void Page_Lo= ad(object sender, EventArgs e) { try { bool pop= ulating =3D false; NetworkCredential nc =3D null; Ses= sion session =3D null; string basicHTTPAuthUserName = =3D ""; string basicHTTPAuthPassword =3D ""; if ((bas= icHTTPAuthUserName !=3D null) && (basicHTTPAuthUserName.Length > 0) && (bas= icHTTPAuthPassword !=3D null)) { nc =3D new Netw= orkCredential(basicHTTPAuthUserName, basicHTTPAuthPassword); } = string mantisConnectUrl =3D "http://192.168.0.32/mantisdev/mc/man= tisconnect.php"; string mantisUserName =3D "administrator"; = string mantisPassword =3D "ao-ict"; session = =3D new Session(mantisConnectUrl, mantisUserName, mantisPassword, nc);// = session.Connect(); populating =3D true;// ddlCus= tomer.DataSource =3D session.Request.UserGetAccesibleProjects(); = populating =3D false; } catch (Exception ex) { = Response.Write(ex.Message + " Webservice Error "); } }}[/cod= e]Best regards, Sietse=20 _________________________________________________________________ Jouw nieuws: wereldnieuws! Beleef 't op MSN.nl http://reporter.msn.nl/= |