Re: [MantisConnect] [MantisConnect 1.0a5] ASP.NET C# problem. Need help!
Brought to you by:
vboctor
From: Sietse v. <mij...@ho...> - 2007-08-24 09:26:30
|
I've already solved the problem. Creating a local webpage instead of using = a networkshare to make my webpage did the trick :)Tnx, Sietse> Date: Thu, 2= 3 Aug 2007 09:01:59 -0700> From: vb...@gm...> To: mantisconnect-users= @lists.sourceforge.net> Subject: Re: [MantisConnect] [MantisConnect 1.0a5] = ASP.NET C# problem. Need help!> > Checkout the following article, it may he= lp you solve this issue:> http://blogs.msdn.com/shawnfa/archive/2005/02/04/= 367390.aspx> > On 8/23/07, Sietse vdS <mij...@ho...> wrote:> >> >= This is a cross post with the Mantis Help forum.> > I think this is a more= suitable place for this.> >> > To get adjusted to working with MantisConne= ct1.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.> >> > I run into the following problem:> > When this line = is executed.> >> > [code]> > session =3D new Session(mantisConnectUrl, = mantisUserName, mantisPassword,> > nc);> > [/code]> >> > I get the followin= g error:> >> > Description: The application attempted to perform an operati= on not allowed> > by the security policy. To grant this application the re= quired permission> > please contact your system administrator or change the= application's trust> > level in the configuration file.> > Exception Detai= ls: System.Security.SecurityException: That> > assembly does not allow part= ially trusted callers.> >> > I included Futureware.MantisConnect.dll as a r= eference.> > And http://192.168.0.32/mantisdev/mc/mantisconnect.php?wsdl> >= as a webservice> >> > [code]> > using System.Collections;> > using System.= Drawing;> > using System.ComponentModel;> > using System.Web;> > using Syst= em.Web.Security;> > using System.Web.UI;> > using System.Web.UI.WebControls= ;> > using System.Web.UI.WebControls.WebParts;> > using System.Web.UI.HtmlC= ontrols;> > using System.Net;> >> > using Futureware.MantisConnect;> >> > p= ublic partial class _Default : System.Web.UI.Page> > {> > protected voi= d Page_Load(object sender, EventArgs e)> > {> > try> > = {> > bool populating =3D false;> > NetworkCredentia= l nc =3D null;> > Session session =3D null;> >> > s= tring basicHTTPAuthUserName =3D "";> > string basicHTTPAuthPass= word =3D "";> > if ((basicHTTPAuthUserName !=3D null) &&> > (ba= sicHTTPAuthUserName.Length > 0) && (basicHTTPAuthPassword !=3D null))> > = {> > nc =3D new> > NetworkCredential(basicHTTPAut= hUserName,> > basicHTTPAuthPassword);> > }> > strin= g mantisConnectUrl =3D> > "http://192.168.0.32/mantisdev/mc/mantisconnect.p= hp";> > string mantisUserName =3D "administrator";> > = string mantisPassword =3D "ao-ict";> >> > session =3D new Se= ssion(mantisConnectUrl, mantisUserName,> > mantisPassword, nc);> > // = session.Connect();> >> > populating =3D true;> > // = ddlCustomer.DataSource =3D> > session.Request.UserGetAccesibleProjects();= > > populating =3D false;> > }> > catch (Except= ion ex)> > {> > Response.Write(ex.Message + " Webservic= e Error ");> > }> > }> > }> > [/code]> >> > Best regards,> >> >= > > Sietse> >> >> > ________________________________> > In 2 tellen een web= pagina voor al je fotos makkelijk en gratis met Windows> > Live Spaces> > -= ------------------------------------------------------------------------> >= This SF.net email is sponsored by: Splunk Inc.> > Still grepping through l= og files to find problems? Stop.> > Now Search log events and configuratio= n files using AJAX and a browser.> > Download your FREE copy of Splunk now = >> http://get.splunk.com/> > _____________________________________________= __> > MantisConnect-users mailing list> > Man...@li...urcef= orge.net> > https://lists.sourceforge.net/lists/listinfo/mantisconnect-user= s> >> >> > ----------------------------------------------------------------= ---------> This SF.net email is sponsored by: Splunk Inc.> Still grepping t= hrough log files to find problems? Stop.> Now Search log events and config= uration files using AJAX and a browser.> Download your FREE copy of Splunk = now >> http://get.splunk.com/> ___________________________________________= ____> MantisConnect-users mailing list> Man...@li...urcefor= ge.net> https://lists.sourceforge.net/lists/listinfo/mantisconnect-users _________________________________________________________________ Jouw nieuws: wereldnieuws! Beleef 't op MSN.nl http://reporter.msn.nl/= |