Click here to Skip to main content
15,793,707 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionProblem with DataTable Updating Pin
mahesh kukkadapu20-Jul-06 12:31
mahesh kukkadapu20-Jul-06 12:31 
QuestionTreeview size changes after postback!? Pin
WebMaster20-Jul-06 11:52
WebMaster20-Jul-06 11:52 
AnswerRe: Treeview size changes after postback!? Pin
minhpc_bk20-Jul-06 17:28
minhpc_bk20-Jul-06 17:28 
QuestionHelp~!! Pin
maddict20-Jul-06 9:12
maddict20-Jul-06 9:12 
QuestionBeautiful Page Pin
TheEagle20-Jul-06 5:33
TheEagle20-Jul-06 5:33 
AnswerRe: Beautiful Page Pin
bluewavestrider20-Jul-06 6:02
bluewavestrider20-Jul-06 6:02 
GeneralRe: Beautiful Page Pin
TheEagle24-Jul-06 19:38
TheEagle24-Jul-06 19:38 
AnswerRe: Beautiful Page Pin
Not Active20-Jul-06 6:03
mentorNot Active20-Jul-06 6:03 
GeneralRe: Beautiful Page Pin
TheEagle24-Jul-06 19:41
TheEagle24-Jul-06 19:41 
AnswerRe: Beautiful Page Pin
Paddy Boyd20-Jul-06 7:21
Paddy Boyd20-Jul-06 7:21 
GeneralRe: Beautiful Page Pin
TheEagle24-Jul-06 19:47
TheEagle24-Jul-06 19:47 
AnswerRe: Beautiful Page Pin
WillemM20-Jul-06 23:47
WillemM20-Jul-06 23:47 
GeneralRe: Beautiful Page Pin
TheEagle24-Jul-06 19:31
TheEagle24-Jul-06 19:31 
QuestionTimed Executions for Application Pin
RedGoblin20-Jul-06 5:11
RedGoblin20-Jul-06 5:11 
AnswerRe: Timed Executions for Application Pin
Paddy Boyd20-Jul-06 5:54
Paddy Boyd20-Jul-06 5:54 
GeneralRe: Timed Executions for Application Pin
RedGoblin20-Jul-06 6:05
RedGoblin20-Jul-06 6:05 
QuestionCaching interop calls - not good [modified] Pin
Malcolm Smart20-Jul-06 4:01
Malcolm Smart20-Jul-06 4:01 
AnswerRe: Caching interop calls - not good Pin
Malcolm Smart20-Jul-06 5:47
Malcolm Smart20-Jul-06 5:47 
GeneralRe: Caching interop calls - not good Pin
Dustin Metzgar20-Jul-06 7:26
Dustin Metzgar20-Jul-06 7:26 
GeneralRe: Caching interop calls - not good [modified] Pin
Malcolm Smart20-Jul-06 23:44
Malcolm Smart20-Jul-06 23:44 
Getting there I think....but I can't seem to load anything using this method. Code included below...

<br />
public class MonkeyDLL : MarshalByRefObject<br />
{<br />
    public string LoadBatch(string batchName)<br />
    {<br />
        long i = 0;<br />
        <br />
        GetBatchJobSize(batchName, ref i);<br />
<br />
        System.Text.StringBuilder buf1 = new System.Text.StringBuilder(((int)(i + 10)));<br />
        GetBatchJob(batchName, buf1);<br />
<br />
        return buf1.ToString();<br />
    }<br />
<br />
    [System.Runtime.InteropServices.DllImport("d:/data/inetpub/focs/bin/MonkeyCfg.dll")]<br />
    public static extern long GetBatchJobSize(string str, ref long i);<br />
<br />
    [System.Runtime.InteropServices.DllImport("d:/data/inetpub/focs/bin/MonkeyCfg.dll")]<br />
    public static extern void GetBatchJob(string str, System.Text.StringBuilder buf);<br />
<br />
};<br />
<br />
<br />
//calling code<br />
<br />
 MonkeyDLL monkey = new MonkeyDLL();<br />
            AppDomain ad = AppDomain.CreateDomain("MonkeyDomain");<br />
<br />
            MonkeyDLL remoteWorker = (MonkeyDLL)ad.CreateInstanceAndUnwrap(<br />
          "d:/data/inetpub/focs/bin/MonkeyCfg.dll",<br />
          "Worker");  <--FAILS HERE<br />
            <br />
            //parse the batch string<br />
            cached_batch batch = new cached_batch();<br />
            batch.BatchName = job;<br />
            batch.XMLContent = remoteWorker.LoadBatch(job); ;//batchString;<br />
<br />
AppDomain.Unload(ad);<br />

? - What is the second param in CreateInstanceAndUnwrap for? My DLL contains only two methods listed earlier in the thread.


Fails with
System.IO.FileLoadException: COuld not load file or assembly 'd:/data/inetpub/focs/bin/MonkeyCfg.dll' or one of its dependencies. 
 The given assembly name or codebase was invalid.


The DLL calls works fine through 'normal' interop, so the path is correct, the dependencies are there. I attempted to switch the assembly in CreateInstanceAndUnwrap with notepad, ir c:/winnt/system32/notepad.exe and got the same error.

Can you hammer home what mundane stupid thing I have missed please, or am I missing the whole plot?!?

Cheers

Regards

Angel
*********************************************
The sooner you fall behind, the longer you have to catch up.


-- modified at 5:17 Friday 21st July, 2006
GeneralRe: Caching interop calls - not good Pin
Malcolm Smart21-Jul-06 0:33
Malcolm Smart21-Jul-06 0:33 
GeneralRe: Caching interop calls - not good Pin
Dustin Metzgar21-Jul-06 4:28
Dustin Metzgar21-Jul-06 4:28 
QuestionHTML Problem Pin
venkatasivaramaprasad20-Jul-06 3:29
venkatasivaramaprasad20-Jul-06 3:29 
AnswerRe: HTML Problem Pin
Malcolm Smart20-Jul-06 4:08
Malcolm Smart20-Jul-06 4:08 
QuestionHey guy , Web.config file Pin
Mohammed Amine20-Jul-06 3:02
Mohammed Amine20-Jul-06 3:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.