473,545 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing an "ActiveX" control using C#

I have a dilemma, that I am hopping I can find some help with. He is the back
story so everyone sort of understands what it is that I am trying to
accomplish.

My problem:

I have multiple users, each user has 2 or more CPU’s, using 3 or more
monitors.
1 CPU system is running my web application. (Slick, high performance, and
wonderful)
1 Cpu/Dual monitor system is running 2 windows applications that allow the
user to view various images. (Java, very evil!)
I have to be able to launch 1 of the 2 windows applications via RSH, (I
don’t like it any more than you do, but it’s what I have), because the
windows programs only accept command line input. (Please don’t yell at me, I
didn’t write them, I only need to use them)
There are typically several of these “Pc sets”, (a “Pc set” for this
conversation is the Web app Pc, and the Images Pc), all of which the users
can use freely at any time.
These Pc sets are behind a firewall, which performs network address
translation. (Think your broadband wireless router and how it allows multiple
Pc’s to share the same internet connection).
Because of this firewall/Nat system, I have no way to know what the Ip
addresses of any of the users Pc’s are during run time. (This is a generic
application being used by several groups, so hard coding is not an option).

What I need:
I need to find out what the Ip Address of the Web Pc is, during run time,
from the Web Pc itself. The Http headers are not reliable, because of the
above mentioned Firewall/Nat.
I need to be able to take that IpAddress, and store it in an Oracle data
base, using a connection string defined during run time.
I need this to work with NO user intervention. Presently, project managers
are required to assign users Pc’s, and define IpAddress’s up front. This is
okay short term, and for small projects. But it won’t fly for very long.
What I have devised so far:
I have started down the road of creating what acts like an ActiveX control,
but is written using C# ( I used the article at
http://www.c-sharpcorner.com/Code/20...tiveXInNet.asp as my initial
guide to get started ).

I am loading the control with the following code inside the Html of one of
my web forms.
“<OBJECT id="ClientSyste mInfo" name="ClientSys temInfo"
classid="Active X.dll#ActiveX.C lientSystemInfo " VIEWASTEXT />”

When this control loads, I get 2 permission errors
1. “The application attempted to perform an operation not allowed by the
security policy. To grant this application the required permission, contact
your system administrator, or use the MS.NET framework configuration tool”
2. “That assembly does not allow partially trusted callers”

I have tried messing with the framework configuration tool, but I either am
doing something wrong, or I’m just way off base, because it just doesn’t seem
to make any difference.

For a while, I would see the app work, when it was loaded from the web
server, but I could not make it work off my laptop. So, when the control
loaded, and worked, that was good, *BUT*, then I made code changes, and the
new control I just made code changes to would not download and run, ( IE
seemed to cache it, and would not pull the new one ), unless I changed my
Url. This is made debugging sort of difficult.

I have talked it over with some co-workers, and they seem to be in agreement
that this is the best, yet messiest, solution. Seems to sort of be a no-win
right now.

Limitations:
I started development with classic Asp. I then transitioned to
VB.NET/ASP.NET and I am now writing C#/Asp.NET. I have always been a web
developer, I can do windows applications, but my UI leaves something to be
desired. There doesn’t really need to be a UI here, so I am cool writing
this. I have never had the “pleasure” of writing C++ outside of school, or
any COM objects. I could learn, but I have an extremely aggressive timeline,
so taking a week or two to become proficient in a new non.NET language is not
really an option.

I would far prefer to keep this an all .NET solution if at all possible.

Thanks!!!!
Nov 18 '05 #1
0 1738

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5287
by: Berata | last post by:
Hello all, in VB6 we were able to create ActiveX-DLL's (In Process Components) and ActiveX-Exe's (Out of Process Components). We habe build up an application that exists of an main module (Standard Exe) that calls and controls other modules (ActiveX-Exe). We decided for ActiveX-Exe because they run in different processes. That means if...
3
1277
by: RodeoJoe | last post by:
I need an ActiveX control, or any other solution which permits me to show only a part of a huge bitmap (about 4000 X 3500 pixels) for each record in an Access database. The part of the image should appear at 1:1 scale. I MUST be able to displace the position of this window above the huge image, or, more easily, (and practically), displace...
4
12574
by: blacst | last post by:
I am using Access 2002 with either Service Pack 1 or 3. (I have seen this problem on 4 different OSs (NT, XP Home, XP Pro, Winows 2000) across 8 different machines) I have an ActiveX Object (Microsoft Common dialog Control, version 6) that, when I attempt add or copy the control in an access application, I get the above error. When...
3
6400
by: adam | last post by:
hi is it possible to write activeX controls in C# and if so any suggestions of links to sample code would be appreciated? thanks Adam
5
1801
by: Andrew | last post by:
Hi all, I am still getting into ASP/VB.net and have a concern about something I see coming. Currently our entire website is classic ASP, yet the feelings from on high is that we need to start looking into updating the site to ASP.net. For the most part I am in favor of this, but I am concerned about the ActiveX objects we are using. For...
5
3876
by: ESPN Lover | last post by:
I need a good primer in how to program an ActiveX control that is launched client side to communicate with the server. I've read thru three C# books and none of them even touch on the subject. I've searched web sites and found nothing. Is client side ActiveX programs on the way out? Is there any online examples of how to code an ActiveX...
2
2317
by: mhwang111 | last post by:
I have a Java application which is interfacing with a Windows ActiveX control (using a third party tool named JacoZoom). The problem I'm encountering is that the ActiveX control is writing out to a log file when the control is first instantiated. This file is going out to the "Current Directory" which is the Windows Desktop. I realize there...
3
2068
by: =?Utf-8?B?ZG5vcnJpcw==?= | last post by:
I have an application containing WMP and I'd like to create an "online" version of it. I believe that this used to be accomplished with activex in VB 6. How would I go about recreating it for use in websites like youtube, or other flash players? Do I have to go back to VB 6?
0
1511
by: lilOlMe | last post by:
I have a unique ASP.NET authentication system that I'm developing wherein my ASP.NET application has to access a certain file on the user's computer...sort of. I've been researching ActiveX controls and have developed a VB6 ActiveX that is able to do the job. But... I'm having issues with the lack of security on this object and would like to...
0
7502
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7434
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7692
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7946
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7791
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.