强名称验证失败 mysql_强名称验证失败

bd96500e110b49cbb3cd949968f18be7.png

I have a small console app that started out in dotnet 1.1 in VS 2003. That

version can be copied to a W2K3 server where it runs fine.

I set up a new project in VS 2005 and copied the code files from 2003 to

2005 where they compile and run, no problem. When I copy the two files (exe

& dll) to the same W2K3 server they fail with the Strong Name Verification

Failed error. After running the console contains: "Unhandled Exception:

System.BadImageFormatException: The format of the file ''x.exe is invalid.

I tried signing the project even though MS recommends against it for simple

code like this, but it gives the same result. I tried a different W2K3

server with the same result.

I ran "sn -v x.exe" on both my XP workstation and on the failing server. In

both cases the response is: Assembly ''x.exe'' is valid. The same with the

dll, which is in the directory with the dll.

Kal

..

解决方案Update,

On one of the W2K3 servers I have VS 2005, so I set up a copy of the project

on that machine. In debug mode under VS the project runs. The exact same

files copied to an execution directory give the same strong name

verification error.

Clearly I am missing something basic here. Anyone know where to point me in

the right direction.

Kal

"Kal"

news:u6**************@TK2MSFTNGP02.phx.gbl...

>I have a small console app that started out in dotnet 1.1 in VS 2003. That

version can be copied to a W2K3 server where it runs fine.

I set up a new project in VS 2005 and copied the code files from 2003 to

2005 where they compile and run, no problem. When I copy the two files

(exe

& dll) to the same W2K3 server they fail with the Strong Name Verification

Failed error. After running the console contains: "Unhandled Exception:

System.BadImageFormatException: The format of the file ''x.exe is invalid.

I tried signing the project even though MS recommends against it for

simple

code like this, but it gives the same result. I tried a different W2K3

server with the same result.

I ran "sn -v x.exe" on both my XP workstation and on the failing server.

In

both cases the response is: Assembly ''x.exe'' is valid. The same with the

dll, which is in the directory with the dll.

Kal

.

Hi Kal,

I was unable to reproduce the issue you described. Here''s my steps to test:

1) Create a simple console project in Visual Studio 2003 using C#, create a

key using "sn -k mykey.snk" and sign the project using this key.

2) Create another console project in Visual Studio 2005, copy the source

file and the key, sign this project using the key.

3) Copy the built assembly to another system which has .NET 2.0 Framework

installed, run it and it works correctly.

Since you''ve mentioned that the issue exists on another system, I think it

should be reproducible using your code. Would you please create a simple

repro project and post it here or send it to me via email? Thank you for

your effort.

Sincerely,

Walter Wang (wa****@online.microsoft.com, remove ''online.'')

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscripti...ult.aspx#notif

ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues

where an initial response from the community or a Microsoft Support

Engineer within 1 business day is acceptable. Please note that each follow

up response may take approximately 2 business days as the support

professional working with you may need further investigation to reach the

most efficient resolution. The offering is not appropriate for situations

that require urgent, real-time or phone-based interactions or complex

project analysis and dump analysis issues. Issues of this nature are best

handled working with a dedicated Microsoft Support Engineer by contacting

Microsoft Customer Support Services (CSS) at

http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Is it possible you are using delay signing and have disabled checking for

this assembly? Unlikely (especially at the server), but...?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值