473,513 Members | 2,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Smart Client Issue



Hi

I am building a smart client application in which i am calling the assembly (exe ) on web server by assembly.loadfrom() method in client exe.
I have tried deploying assembly by all the three methods i.e XCopy , Global Assembly Cache and Code Base.
The first time the assembly loads fine , but affter making some change and changing the version of assembly and than again deploying on the web server.

Now if i try to run my client exe , it still shows the old version exe and not the new version.
Could someone let me know what could be the problem , I tried clearing download assembly cache hoping the old version is coming from cache. But thats not the case , it just shows the old version exe.
My App.Config is :

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="SmartTest" publicKeyToken="0c1c679667aa20be" />
<codeBase version="3.0.24.0" href="http://localhost/smarttest/bin/SmartTest.exe"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Assembly Calling Exe code :

im downloadedAssembly As [Assembly]
Dim formType As Type
Dim downloadedForm As Object

Try
'download and load the assembly
downloadedAssembly = [Assembly].LoadFrom("http://localhost/smarttest/bin/smarttest.exe")
'find the type in the assembly for the object we want to create
formType = downloadedAssembly.GetType("SmartTest.Form1")
'Create an instance of the desired type and show it
downloadedForm = System.Activator.CreateInstance(formType)
downloadedForm = CType(downloadedForm, Form)
If Not (downloadedForm Is Nothing) Then
downloadedForm.Show()
End If
Catch exc As Exception
MessageBox.Show(exc.ToString())
End Try

Thanks,

PS






---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Nov 20 '05 #1
1 1739

I had a similar problem. When you call Assembly.LoadFrom, the assembly you try to load has to be compiled as a dll. I can't remember where I found that answer, but one I recompiled my source assembly as a dll, the code worked for me. You can easily experiment by going into your project properties and and changing the output type from 'Windows Application' to 'Class Library'.

WalterB

"DotNetJunkies User" wrote:


Hi

I am building a smart client application in which i am calling the assembly (exe ) on web server by assembly.loadfrom() method in client exe.
I have tried deploying assembly by all the three methods i.e XCopy , Global Assembly Cache and Code Base.
The first time the assembly loads fine , but affter making some change and changing the version of assembly and than again deploying on the web server.

Now if i try to run my client exe , it still shows the old version exe and not the new version.
Could someone let me know what could be the problem , I tried clearing download assembly cache hoping the old version is coming from cache. But thats not the case , it just shows the old version exe.
My App.Config is :

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="SmartTest" publicKeyToken="0c1c679667aa20be" />
<codeBase version="3.0.24.0" href="http://localhost/smarttest/bin/SmartTest.exe"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Assembly Calling Exe code :

im downloadedAssembly As [Assembly]
Dim formType As Type
Dim downloadedForm As Object

Try
'download and load the assembly
downloadedAssembly = [Assembly].LoadFrom("http://localhost/smarttest/bin/smarttest.exe")
'find the type in the assembly for the object we want to create
formType = downloadedAssembly.GetType("SmartTest.Form1")
'Create an instance of the desired type and show it
downloadedForm = System.Activator.CreateInstance(formType)
downloadedForm = CType(downloadedForm, Form)
If Not (downloadedForm Is Nothing) Then
downloadedForm.Show()
End If
Catch exc As Exception
MessageBox.Show(exc.ToString())
End Try

Thanks,

PS






---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.

Nov 20 '05 #2

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

Similar topics

14
2655
by: David B. Held | last post by:
I wanted to post this proposal on c.l.c++.m, but my news server apparently does not support that group any more. I propose a new class of exception safety known as the "smart guarantee". ...
27
3366
by: Susan Baker | last post by:
Hi, I'm just reading about smart pointers.. I have some existing C code that I would like to provide wrapper classes for. Specifically, I would like to provide wrappers for two stucts defined...
1
1253
by: Richard K Bethell | last post by:
The Bigger Better Basic tour spoke to us about "smart clients." It seemed intriguing, especially the web-launched executables that downloaded the required assemblies under the hood - that was...
10
1303
by: Ahmed | last post by:
Hello All, I am programming a smart client application that should, of course, work offline with most of the functionalities while online. The program will have a local database that will keep...
3
2645
by: Marc Gravell | last post by:
Kind of an open question on best-practice for smart-client design. I'd really appreciate anyones views (preferably with reasoning, but I'll take what I get...). Or if anybody has any useful links...
1
2416
by: HM | last post by:
Hi, I have an existing web application in ASP/VB which uses OCX controls. I want to replace them with a Smart client solution, but I do not want to change the whole application at the first go....
1
3506
by: Rasheed | last post by:
We are building a smart client application (.NET 2.0) which uses Web Services to access the business objects. Services: The Web Services have been secured by brokered authentication using X509...
33
5017
by: Ney André de Mello Zunino | last post by:
Hello. I have written a simple reference-counting smart pointer class template called RefCountPtr<T>. It works in conjunction with another class, ReferenceCountable, which is responsible for the...
0
1469
by: Ekart Laszlo | last post by:
Hi, there We have currently a Java Applet based solution that we would like to rewrite to a .NET solution. The scenario is the following: 1. Starter Client application opens up a web browser...
0
7257
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
7535
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...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
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
5682
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 project—planning, coding, testing,...
0
4745
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...
0
3232
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...
0
1591
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 ...
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.