473,485 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Create 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="ClientSystemInfo" name="ClientSystemInfo"
classid="ActiveX.dll#ActiveX.ClientSystemInfo" 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 1734

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

Similar topics

2
5263
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...
3
1271
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...
4
12572
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...
3
6397
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
1796
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...
5
3868
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. ...
2
2309
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...
3
2061
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...
0
1498
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...
0
7090
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,...
0
6960
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...
0
7116
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,...
0
7275
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...
0
5418
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
1
4857
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1376
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
595
muto222
php
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.