[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Re: Problems while using an ASP NET page as a remote client

Ken Kolda

9/15/2004 10:17:00 PM

Try putting your remoting config information in your web app's web.config --
that's where it should generally go when running a web app. Once you do
that, I believe you do not need to call RemotingConfiguration.Configure() --
that will be done automatically for you.

Ken


"Fernando Romero via .NET 247" <anonymous@dotnet247.com> wrote in message
news:OAQioT1mEHA.3756@TK2MSFTNGP11.phx.gbl...
I cannot get my ASP NET app to work as a remote client to the data tier
while reading remote configuration from a configuration file. I have
followed all the directives given in another messages related to this
subject but I cannot get it to work!. This is what my global.asax file looks
like:

<%@ Application Codebehind="Global.asax.cs" Inherits="MyApp.Global" %>

Contents of Global.asax.cs: (generated with Visual Studio 2003)

using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Runtime.Remoting;

namespace MyApp
{
/// <summary>
/// Descripci?n breve de Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
private System.ComponentModel.IContainer components = null;

public Global()
{
InitializeComponent();
}

protected void Application_Start(Object sender, EventArgs e)
{

RemotingConfiguration.Configure(HttpContext.Current.Server.MapPath("DTier.co
nfig"));
}

the other events of the template remain unaltered ..
}


The remote configuration file is this one:

<configuration>
<system.runtime.remoting>
<application name="MyAppBizniz">
<client>
<wellknown type="DataNameSpace.DataClass, DataAssembly"
url="tcp://xxxxxx:9000/MyData/" />
</client>
<channels>
<channel ref="tcp" port="9001" />
</channels>
</application>
</system.runtime.remoting>
</configuration>

I have entered an invalid computer name "xxxxxx" in this file so to cause an
exception intently, but
with no success since the ASP NET client loads the local version of the
assembly (the one it was compiled with since I distributed it to the client,
once I manage to solve this problem I will turn to interfaces to distribute
the metadata to clients I do promise!)

The computer hosting the APS NET application has installed Windows XP SP 2
running IIS 5.1.

Thanks,
Eng Fernando Romero


--------------------------------
From: Fernando Romero

-----------------------
Posted by a user from .NET 247 (http://www.dotn...)

<Id>+rnBt41pXkOw/SDBLb/qNQ==</Id>