Re: Remote application only works in dll (assemblies) are also installed on locally.

From: Fred Hirschfeld (a_at_b.c)
Date: 03/10/05


Date: Thu, 10 Mar 2005 08:35:02 -0800


>From this you are using a Reference to the DLL and so if you simply delete
the DLL you will most definitely get this error. Remove the reference to
your BLL from the project including the "using" statement, recompile and
remove the BLL.dll from the application directory.

I think this should work then.

Fred

"Wim Denayer" <wim.denayer@geac.com> wrote in message
news:OM23P3YJFHA.3076@tk2msftngp13.phx.gbl...
>
> Hello,
> I have one aspx page WebForm1.aspx, the page has one button
> that will call the business layer dll and one textbox that will contain
> the name of the remote machine.
>
> The business layer has one class Message and one Function
> that is simple returning the machine name.
>
> See Below, I do not pass yet business model entities (serializable). I
> think the string return by the function is serializable.
>
> Please help, Thanks.
>
>
> using System;
> using System.Collections;
> using System.ComponentModel;
> using System.Data;
> using System.Drawing;
> using System.Web;
> using System.Web.SessionState;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Web.UI.HtmlControls;
> using Geac.WIMPIE.BLL;
>
> namespace Geac.WIMPIE.Web
> {
> /// <summary>
> /// Summary description for WebForm1.
> /// </summary>
> public class WebForm1 : System.Web.UI.Page
> {
> protected System.Web.UI.WebControls.TextBox TextBox1;
> protected System.Web.UI.WebControls.TextBox TextBox2;
> protected System.Web.UI.WebControls.TextBox TextBox3;
> protected System.Web.UI.WebControls.Button Button1;
>
> private void Page_Load(object sender, System.EventArgs e)
> {
> // Put user code to initialize the page here
> TextBox3.Text = Session["PATH"].ToString();
> if (Application["REMOTE"].ToString() == "Y")
> {
> TextBox2.Text = "Config file found and loaded";
> }
> }
>
> #region Web Form Designer generated code
> override protected void OnInit(EventArgs e)
> {
> //
> // CODEGEN: This call is required by the ASP.NET Web Form Designer.
> //
> InitializeComponent();
> base.OnInit(e);
> }
>
> /// <summary>
> /// Required method for Designer support - do not modify
> /// the contents of this method with the code editor.
> /// </summary>
> private void InitializeComponent()
> {
> this.Button1.Click += new System.EventHandler(this.Button1_Click);
> this.Load += new System.EventHandler(this.Page_Load);
>
> }
> #endregion
>
> private void Button1_Click(object sender, System.EventArgs e)
> {
> Message msg = new Message();
> TextBox1.Text = msg.GetMessage("SS","EN",1);
> }
> }
> }
>
>
>
> using System;
> using System.Reflection;
> using System.Configuration;
> using System.Collections;
>
> namespace Geac.WIMPIE.BLL
> {
> /// <summary>
> /// Summary description for Message.
> /// </summary>
> public class Message : MarshalByRefObject
> {
>
>
> public Message()
> {
> }
> public string GetMessage(string msgID, string languageID, int
> serverID)
> {
> //Geac.WIMPIE.Dal.Message msg = new Geac.WIMPIE.Dal.Message();
> //return msg.GetMessage( msgID, languageID, serverID );
> return System.Environment.MachineName;
> }
> }
> }
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!