473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Using a c# assembly client side while disconnected

Hi,

I have created a c# assembly that I want to use from IE. There is no UI,
just some methods that I want to call from client-side script.

I've referenced the assembly as follows:

<object id="objTest" classid="dlltest.dll#dlltest.dllTest" width="100"
height="100" viewastext></object>

and everything works fine as long as I open the web page from a web server.

What I would *really* like to do, however, is open the page directly from
the file system - it's just a .htm page - with the ultimate goal of enabling
the user to work with this page when not connected to the network.

I've tried hard-coding the local path to the dll in the classid attribute
with no success. Does anyone know if / how this can be done?

Thanks!

Nov 19 '05 #1
2 1214
codebase is used to specifiy the path. IE requires the code path match the
domain the same came from though. to host the object locally you can:

1) have the user run the page from the local disk.
2) build a cab file, mark as safe, and install the component locally.

-- bruce (sqlwork.com)
"Andrew Bagby" <An*********@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
Hi,

I have created a c# assembly that I want to use from IE. There is no UI,
just some methods that I want to call from client-side script.

I've referenced the assembly as follows:

<object id="objTest" classid="dlltest.dll#dlltest.dllTest" width="100"
height="100" viewastext></object>

and everything works fine as long as I open the web page from a web
server.

What I would *really* like to do, however, is open the page directly from
the file system - it's just a .htm page - with the ultimate goal of
enabling
the user to work with this page when not connected to the network.

I've tried hard-coding the local path to the dll in the classid attribute
with no success. Does anyone know if / how this can be done?

Thanks!

Nov 19 '05 #2
Thanks Bruce, but from what I've read the codebase attribute isn't used when
referencing a .NET assembly. I've tried modifying the object tag to point to
the dll as follows with no success:

<object id="objTest" classid="dlltest.dll#dlltest.dllTest"
codebase="c:\inetpub\wwwroot\dlltest\dlltest.dll" width="100" height="100"
viewastext></object>

I haven't gone so far as to put the dll into a cab yet... Do you think that
would make the difference?

"Bruce Barker" wrote:
codebase is used to specifiy the path. IE requires the code path match the
domain the same came from though. to host the object locally you can:

1) have the user run the page from the local disk.
2) build a cab file, mark as safe, and install the component locally.

-- bruce (sqlwork.com)
"Andrew Bagby" <An*********@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
Hi,

I have created a c# assembly that I want to use from IE. There is no UI,
just some methods that I want to call from client-side script.

I've referenced the assembly as follows:

<object id="objTest" classid="dlltest.dll#dlltest.dllTest" width="100"
height="100" viewastext></object>

and everything works fine as long as I open the web page from a web
server.

What I would *really* like to do, however, is open the page directly from
the file system - it's just a .htm page - with the ultimate goal of
enabling
the user to work with this page when not connected to the network.

I've tried hard-coding the local path to the dll in the classid attribute
with no success. Does anyone know if / how this can be done?

Thanks!


Nov 19 '05 #3

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

Similar topics

0
by: Ken Durden | last post by:
I'm working on a client-server application where the client is controlling two devices (aka servers) which both implement the same interface contract. We have a set of about 4 assemblies which...
1
by: Jim Hammond | last post by:
I can get data from a client-side assembly to the server in two manual steps, but I need to be able to do it in one step. Step 1: The user presses the manually coded "Step 1" button, which calls...
11
by: John Boghossian | last post by:
I know this isnīt spot on for this group, but the problem relates to an asp.net project i am working on. I am trying to develop an windows forms control to be used in IE in an intranet solution....
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
1
by: Mike Dole | last post by:
I'm sorry to bother you with this question but it was either this or giving up and trying to go for a simpler solution (which I will if this is not gonna work out..) I'm afraid this is way out...
3
by: DevX | last post by:
Hi to all, An ex-coworker of mine is learning ASP .NET for building web application. Because I had 3 years experience in .NET programming (but zero on web programming and ASP .NET) he asked me a...
4
by: andrei.csibi | last post by:
I've have a .NET Assembly, which is COM Visible. I would like to load objects from this assembly in javascript code. E.g. Assembly Book.dll has the class Book and I would like to use <script...
1
by: Miroslav Endys | last post by:
I have two apps. Client and Server (both are windows console apps). Im using Client Socket of this definition AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp and Im using async...
7
by: Vishal | last post by:
Hi, I am writing a CGI to serve files to the caller. I was wondering if there is any way to tell in my CGI if the client browser is still connected. If it is not, i want to execute some special...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.