Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

System.__ComObject is not what I want returned

I have a c# class that I want to work, when compiled into a dll,
either in asp.net or classic asp 3.0. It references
System.EnterpriseServices and ASPTypeLibrary and as far as the dll
used either an asp.net page or an asp page goes, it functions, apart
from the following part which is meant to gather, for logging,
request.servervariable objects When called by an asp page they return
the string System.__ComObject instead of an i.p. address or part of a

This is the code:

if(System.Web.HttpContext.Current != null)
//the calling page is aspx
                                string address_remote =
System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToStr ing().Trim();

                                strRequest += "\t" + address_remote;
                                strRequest += "\t" +
System.Web.HttpContext.Current.Request.ServerVariables["SCRIPT_NAME"].ToStr ing();
// the calling page is classic asp

                                ASPTypeLibrary.Request oRequest =
                                if(oRequest as ASPTypeLibrary.Request == null)
//this never gets executed, so oRequest is not null
                                        strRequest += "xxx.xxx.xxx.xxx";
                                        strRequest += "\t/path1/path2/dummy.asp";
//the next two become "System.__ComObject"

                                        string address_remote =

                                        strRequest += "\t" + address_remote;
                                        strRequest += "\t" +


How can I get the actual values of what would in classic asp be
Request.ServerVariables("REMOTE_ADDR") and

I made a test in classic ASP and was it returns actually an IStringList
object. So try perhaps ServerVariables["SomeVar"].Item(1).ToString().


"les" <lesliewb@gmail.com> a crit dans le message de news:

On May 30, 5:30 pm, "Patrice" <http://www.chez.com/scribe/> wrote:

Thank you very much! What I actually works now is just slightly

strRequest = ((IStringList)oRequest.ServerVariables["SCRIPT_NAME"])

which I found on
with a search inspired by your post. Thanks again


Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc