Home All Groups Group Topic Archive Search About

FileNotFoundException when porting from Dev 2003 to Dev 2005

Author
26 Dec 2005 2:56 PM
Barakme
Hello,

I developed an application using Remoting in Dev 2003 using the security
sample code from Microsoft samples to add SSPI functionality and secure my
messages.

When the .NET framework 2.0 was released I have learned that now securing
Remoting application is built in and has no memory leeks, therefore I port my
application to dev 2005.

My application is client C# WinForm application which use remote object
hosted on windows service on the remote machine.  The remote object use
unmanaged DLLs which expose "C" calling conventions.

Since I port it when ever I run the application and get to this line:
Application.Run(new Form1());

I always recieve FileNotFoundException.  I heard that the C runtime for .NET
2.0 is defferent from v1.1.

How can I solve this problem ??

Thanks,

Barak

Author
30 Jan 2006 4:40 PM
Beppe
Hi Barak,
I have the same exact your error.
.... it seems that we are alone in the world
Beppe

Show quote
"Barakme" <Bara***@discussions.microsoft.com> wrote in message
news:DE1C4509-F6B7-434E-BAB2-869A857BB9C2@microsoft.com...
> Hello,
>
> I developed an application using Remoting in Dev 2003 using the security
> sample code from Microsoft samples to add SSPI functionality and secure my
> messages.
>
> When the .NET framework 2.0 was released I have learned that now securing
> Remoting application is built in and has no memory leeks, therefore I port
> my
> application to dev 2005.
>
> My application is client C# WinForm application which use remote object
> hosted on windows service on the remote machine.  The remote object use
> unmanaged DLLs which expose "C" calling conventions.
>
> Since I port it when ever I run the application and get to this line:
> Application.Run(new Form1());
>
> I always recieve FileNotFoundException.  I heard that the C runtime for
> .NET
> 2.0 is defferent from v1.1.
>
> How can I solve this problem ??
>
> Thanks,
>
> Barak
>
Author
30 Jan 2006 7:50 PM
Barakme
Hello,

No we are not... I have the answer - The fileNotFoundexception regards your
assembly:
So you have signed before the manifest was embedded. This invalidated the
previous signature, making your assembly invalid.
If you instead use the Project -> Properties -> Configuration Properties ->
Linker ->Advanced ->Key File to enter the key file information your project
should build. And hopefully it can be loaded successfully later on.
The linker switch is new, and is what you can use to get the signing to
happen after manifest embedding.
Alternatively you could use a postbuild action "sn -R" to sign your assembly.

Hope this helped you.

Barak


Show quote
"Beppe" wrote:

> Hi Barak,
> I have the same exact your error.
> .... it seems that we are alone in the world
> Beppe
>
> "Barakme" <Bara***@discussions.microsoft.com> wrote in message
> news:DE1C4509-F6B7-434E-BAB2-869A857BB9C2@microsoft.com...
> > Hello,
> >
> > I developed an application using Remoting in Dev 2003 using the security
> > sample code from Microsoft samples to add SSPI functionality and secure my
> > messages.
> >
> > When the .NET framework 2.0 was released I have learned that now securing
> > Remoting application is built in and has no memory leeks, therefore I port
> > my
> > application to dev 2005.
> >
> > My application is client C# WinForm application which use remote object
> > hosted on windows service on the remote machine.  The remote object use
> > unmanaged DLLs which expose "C" calling conventions.
> >
> > Since I port it when ever I run the application and get to this line:
> > Application.Run(new Form1());
> >
> > I always recieve FileNotFoundException.  I heard that the C runtime for
> > .NET
> > 2.0 is defferent from v1.1.
> >
> > How can I solve this problem ??
> >
> > Thanks,
> >
> > Barak
> >
>
>
>
Author
31 Jan 2006 3:36 PM
Beppe
Great!!
I have solved with you answer
Thanks a lots!!
Beppe

Show quote
"Barakme" <Bara***@discussions.microsoft.com> wrote in message
news:C88E823C-ABBB-48A2-8EC9-B9B4161CA1CB@microsoft.com...
> Hello,
>
> No we are not... I have the answer - The fileNotFoundexception regards
> your
> assembly:
> So you have signed before the manifest was embedded. This invalidated the
> previous signature, making your assembly invalid.
> If you instead use the Project -> Properties -> Configuration
> Properties ->
> Linker ->Advanced ->Key File to enter the key file information your
> project
> should build. And hopefully it can be loaded successfully later on.
> The linker switch is new, and is what you can use to get the signing to
> happen after manifest embedding.
> Alternatively you could use a postbuild action "sn -R" to sign your
> assembly.
>
> Hope this helped you.
>
> Barak
>
>
> "Beppe" wrote:
>
>> Hi Barak,
>> I have the same exact your error.
>> .... it seems that we are alone in the world
>> Beppe
>>
>> "Barakme" <Bara***@discussions.microsoft.com> wrote in message
>> news:DE1C4509-F6B7-434E-BAB2-869A857BB9C2@microsoft.com...
>> > Hello,
>> >
>> > I developed an application using Remoting in Dev 2003 using the
>> > security
>> > sample code from Microsoft samples to add SSPI functionality and secure
>> > my
>> > messages.
>> >
>> > When the .NET framework 2.0 was released I have learned that now
>> > securing
>> > Remoting application is built in and has no memory leeks, therefore I
>> > port
>> > my
>> > application to dev 2005.
>> >
>> > My application is client C# WinForm application which use remote object
>> > hosted on windows service on the remote machine.  The remote object use
>> > unmanaged DLLs which expose "C" calling conventions.
>> >
>> > Since I port it when ever I run the application and get to this line:
>> > Application.Run(new Form1());
>> >
>> > I always recieve FileNotFoundException.  I heard that the C runtime for
>> > .NET
>> > 2.0 is defferent from v1.1.
>> >
>> > How can I solve this problem ??
>> >
>> > Thanks,
>> >
>> > Barak
>> >
>>
>>
>>
Author
2 Feb 2006 10:37 AM
Beppe
Hi Barak,

after solved fileNotFoundexception I'm encoutering a lot of problems in
porting into .NET 2.0 the Microsoft samples code to add SSPI
functionalities.
What is your experience? I do not find anything on the net.

For example now I'm stopped on an
exception "SecuritySinkMessageHeaderException" on

   string securitySinkMessageHeader =
(string)headers[SecuritySinkMessageHeaderName];

What I'm missing?

My code is:
  public static MessageEnvelope GetMessageFromHeader(ITransportHeaders
headers)
  {
   string securitySinkMessageHeader =
(string)headers[SecuritySinkMessageHeaderName];

   if (securitySinkMessageHeader == null)
    throw new SecuritySinkMessageHeaderException();
   MessageEnvelope messageEnvelope =
MessageEnvelope.StringToMessageEnvelope(securitySinkMessageHeader);
   headers[SecuritySinkMessageHeaderName] = null;

  return messageEnvelope;
  }

Any idea?
Thanks a lot, Beppe




Show quote
"Beppe" <Beppe@newsgroups.nospam> wrote in message
news:O0DfTwnJGHA.528@TK2MSFTNGP12.phx.gbl...
> Great!!
> I have solved with you answer
> Thanks a lots!!
> Beppe
>
> "Barakme" <Bara***@discussions.microsoft.com> wrote in message
> news:C88E823C-ABBB-48A2-8EC9-B9B4161CA1CB@microsoft.com...
>> Hello,
>>
>> No we are not... I have the answer - The fileNotFoundexception regards
>> your
>> assembly:
>> So you have signed before the manifest was embedded. This invalidated the
>> previous signature, making your assembly invalid.
>> If you instead use the Project -> Properties -> Configuration
>> Properties ->
>> Linker ->Advanced ->Key File to enter the key file information your
>> project
>> should build. And hopefully it can be loaded successfully later on.
>> The linker switch is new, and is what you can use to get the signing to
>> happen after manifest embedding.
>> Alternatively you could use a postbuild action "sn -R" to sign your
>> assembly.
>>
>> Hope this helped you.
>>
>> Barak
>>
>>
>> "Beppe" wrote:
>>
>>> Hi Barak,
>>> I have the same exact your error.
>>> .... it seems that we are alone in the world
>>> Beppe
>>>
>>> "Barakme" <Bara***@discussions.microsoft.com> wrote in message
>>> news:DE1C4509-F6B7-434E-BAB2-869A857BB9C2@microsoft.com...
>>> > Hello,
>>> >
>>> > I developed an application using Remoting in Dev 2003 using the
>>> > security
>>> > sample code from Microsoft samples to add SSPI functionality and
>>> > secure my
>>> > messages.
>>> >
>>> > When the .NET framework 2.0 was released I have learned that now
>>> > securing
>>> > Remoting application is built in and has no memory leeks, therefore I
>>> > port
>>> > my
>>> > application to dev 2005.
>>> >
>>> > My application is client C# WinForm application which use remote
>>> > object
>>> > hosted on windows service on the remote machine.  The remote object
>>> > use
>>> > unmanaged DLLs which expose "C" calling conventions.
>>> >
>>> > Since I port it when ever I run the application and get to this line:
>>> > Application.Run(new Form1());
>>> >
>>> > I always recieve FileNotFoundException.  I heard that the C runtime
>>> > for
>>> > .NET
>>> > 2.0 is defferent from v1.1.
>>> >
>>> > How can I solve this problem ??
>>> >
>>> > Thanks,
>>> >
>>> > Barak
>>> >
>>>
>>>
>>>
>
>

AddThis Social Bookmark Button