473,383 Members | 1,739 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,383 software developers and data experts.

.NET Deployment Problem (Appdomain, Reflection)

During deployment for a project i want to perform a number of tasks
automatically. for example update a database.
Theese tasks needs configuration settings from the .config file that are
included in the setup project.

The setup project contains a custom action to call an installer class during
setup.
The installer class creates a new AppDomain that uses the provided .Config
file.
Then i Instanciate a MarchalByRef type located in an other assembly using
NewAppDomain.CreateInstanceAndUnwrap. That class is going to load the
assembly/type containing the code i want to run.
It works fine when i execute the code in debug mode or from a
compiled(runtime) Console App.

But when the Microsoft Installer executes it through the custom Action i
recieve this Exception:
System.InvalidCastException: Specified cast is not valid.
NewAppDomain.CreateInstanceAndUnwrap returns an object of type MarchalByRef.
Not the type i expect. Why is that???

I would appreciate help!

Niklas
ts*******@hotmail.com
Nov 21 '05 #1
0 859

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

Similar topics

12
by: Jon Maz | last post by:
Hi All, I would like to have the following folder structure for an asp.net website: MasterFolder |---\AppRoot | --- webform.aspx | --- web.config | --- global.asax
1
by: Niklas Magnusson | last post by:
During deployment for a project i want to perform a number of tasks automatically. for example update a database. Theese tasks needs configuration settings from the .config file that are included...
7
by: Dave L | last post by:
I am inquiring about the feasability of being able to determine when an object of a certain type is instantiated. I have a base type that I want to be able to determine when each instance is...
4
by: Mark | last post by:
I wan't to be able to deserialize a class from an assembly that is not in the application domain. To do that I must have the Type from the Assembly. How do you get a Type from an assembly that is...
1
by: Raveendra M | last post by:
Hi! I am working with ASP.NET application. In my page I am creating one Application Domain and in that domain I am calling my DLL. Using the methods of the dll. And unloading the Application...
1
by: Charles Herring | last post by:
In my asp.net application I upload a video file and then need to get the duration and other properties. I get "Attempted to access an unloaded AppDomain" when I instanciate the Video object. I am...
4
by: Jack Wright | last post by:
Dear All, Every Virtual directory under IIS is executed in a new AppDomain. This is done by CLR itself. When I deploy a dll under its bin, the AppDomain is restarted as a result all my dlls under...
3
by: hB | last post by:
Hi. Error = "The configuration system can only be set once. Configuration system is already set" Exception Details: System.InvalidOperationExcepti­on: The configuration system can only...
3
by: Frank Uray | last post by:
Hi all I have a problem with loading a assembly ... I am trying to do the following: - I have a directory with a dll (assembly) in it (not the currect dir.) - I am trying to load this assembly,...
0
by: John Wright | last post by:
I have the following code that creates a new appDomain and loads an exe using reflection. The problem I have is the exe file I pass in is still locked by the application. I have showcopyfiles =...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.