.NET安全性 [英] .NET security

查看:81
本文介绍了.NET安全性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用.net安全性时遇到问题。我一直试图使用Microsoft .Net Framework 2.0配置工具(版本

2.0.50727.42),但它不适合我。我有一个简单的测试应用程序

,当我运行管理应用程序 - 查看程序集依赖项时,我

收到错误消息:

不幸的是,由于在列表的

生成期间出错,.NET Framework配置工具无法显示此列表的此列表

的程序集依赖项。


这并没有真正告诉我任何事情。我很感激来自

的任何意见,任何人都可能知道如何修复它。谢谢。

I am having problems working with .net security. I have been attempting to
use the Microsoft .Net Framework 2.0 Configuration tool (version
2.0.50727.42), but it won''t work for me. I have a simple test application
that works, when I run to Manage Applications - View Assembly Dependencies, I
get an error that says:

Unfortunately, the .NET Framework Configuration tool cannot show this list
of assembly dependencies for this application due to an error during the
generation of the list.

This does not really tell me anything. I would appreciate any input from
anyone might know how to fix it. Thanks.

推荐答案

Hello Richard,


感谢您在MSDN新闻组中发帖。


从您的描述中,我了解到您正在使用.net框架sdk

2.0''mscorcfg.msc"实用程序查看现有的.ent应用程序'

程序集依赖项,但是,当你尝试查看依赖项时,你得到以下错误,对吗?

=========

不幸的是,由于错误,.NET Framework配置工具无法显示此列表的这个列表的
组装依赖项期间

代表。

========


根据我的理解,mscorcfg .msc实用程序可以执行程序集

依赖项列表探索.net托管应用程序,并且此配置工具上没有特定或已知问题。我认为这个问题

可能特定于您正在评估的某个应用程序。

您是否尝试过其他应用程序的视图依赖性功能

图片?此外,这个应用程序是否使用许多非托管组件编译

或其他与普通托管应用程序不同的东西?


如果您觉得方便,可以提供给我这个

应用程序的简化版本,以便我可以在myside上执行一些测试。同时,如果你有
有其他任何发现,请随时在这里发布。


问候,


Steven Cheng

Microsoft在线社区支持

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


在回复帖子时,请回复群组通过您的新闻阅读器

,其他人可以从您的问题中学习并从中受益。


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

此帖子提供按现状 ;没有保证,也没有赋予任何权利。


安全! www.microsoft.com/security

(此帖子按原样提供,不作任何保证,并且不授予

权利。)
Hello Richard,

Thank you for posting in the MSDN newsgroup.

From your description, I understand you''re using the .net framework sdk
2.0''s "mscorcfg.msc" utility to view an existing .ent application''s
assembly dependencies, however, you got the following error when try
viewing the dependencies,correct?
=========
Unfortunately, the .NET Framework Configuration tool cannot show this list
of assembly dependencies for this application due to an error during the
generation of the list.
========

Based on my understanding, the mscorcfg.msc utility can perform assembly
dependencies list exploring on .net managed applications and there is not
particular or known issue on this configuration tool. I think this problem
could be specific to the certain application you''re evaluating against.
Have you tried the view dependencies fuction on some other application
images? Also, is this application compiled with many unmanaged components
or anything else different from a normal managed application?

If you feel it convenient, you can provide me a simplified one of that
application so that I can perform some test on myside. Meanwhile, if you
have any other finding, please feel free to post here also.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

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

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


谢谢史蒂文。是的,您的假设是正确的。它在作为项目一部分的

dll上正常运行,但不在exe上运行。据我所知,没有非托管的

代码。这是应用程序源代码:


#include< stdio.h>

#include< string.h>

#include< struct.h>

#include< malloc.h>

#include< mbsfun.h>

#包括< stdlib.h>


使用命名空间系统;


#using< csfu.dll>

void main(无效)

{

printf(" In Mancfu \ nn));


MBSFu :: AClass :: AFun(); //这个函数在csfu.dll中。

}


这是csfu.dll的代码:


使用System;

使用System.Windows.Forms;


名称空间MBSFu

{

公共类AClass

{

public static void AFun()

{

Console.WriteLine("在CSFU);

MessageBox.Show(DLL中的消息框);

}

}

}


这是我的构建文件:


csc / t:module csfu.cs

if errorlevel 1 goto error

al csfu.netmodule / platform:x86 / target:lib /out:csfu.dll /keyfile:signkey.snk

if errorlevel 1 goto error

cl / clr:oldsyntax / I\mbs7\sys\include mancfu.cpp / link /KEYFILE:signkey.snk

if errorlevel 1 goto error


告诉我是否可以更方便地通过电子邮件向您发送二进制

输出或类似内容。谢谢。


Thank you Steven. Yes, your assumptions are correct. It runs properly on the
dll that is part of the project, but not on the exe. There is no unmanaged
code as far as I know. Here is the application source code:

#include <stdio.h>
#include <string.h>
#include <struct.h>
#include <malloc.h>
#include <mbsfun.h>
#include <stdlib.h>

using namespace System;

#using <csfu.dll>

void main(void)
{
printf("In Mancfu\n");

MBSFu::AClass::AFun(); // this function is in csfu.dll.
}

Here is the code for csfu.dll:

using System;
using System.Windows.Forms;

namespace MBSFu
{
public class AClass
{
public static void AFun()
{
Console.WriteLine("In CSFU");
MessageBox.Show("Message Box in DLL");
}
}
}

Here is my build file:

csc /t:module csfu.cs
if errorlevel 1 goto error
al csfu.netmodule /platform:x86 /target:lib /out:csfu.dll /keyfile:signkey.snk
if errorlevel 1 goto error
cl /clr:oldsyntax /I\mbs7\sys\include mancfu.cpp /link /KEYFILE:signkey.snk
if errorlevel 1 goto error

Let me know if it would be more convenient for me to email you the binary
output or anything like that. Thanks.



我已经做了一些测试,并确定我的任何测试

应用程序调用我使用的dll,当我使用mscorcfg时失败。任何

测试没有dll的应用程序,该工具正常工作。是不是

能够处理dll电话,还是我做错了什么?谢谢。


Steven Cheng [MSFT]"写道:
I have done some more testing, and determined that any of my test
applications that call a dll that I have made, fail when I use mscorcfg. Any
test applications that do not have a dll, the tool works properly. Is it not
capable of handling dll calls, or am I doing something wrong? Thanks.

"Steven Cheng[MSFT]" wrote:
你好理查德,

感谢你在MSDN新闻组发帖。

从你的描述中,我理解你' '使用.net框架sdk
2.0'的'mscorcfg.msc"用于查看现有.ent应用程序的程序集依赖项的实用程序,但是,在尝试查看依赖项时出现以下错误,是否正确?
=========
不幸的是,由于在生成列表期间出错,.NET Framework配置工具无法显示此应用程序的程序集依赖关系列表。
===== ===

根据我的理解,mscorcfg.msc实用程序可以在.net托管应用程序上执行程序集
依赖项列表,并且没有特定或已知的问题配置工具。我认为这个问题可能是针对您正在评估的某个应用程序特定的。
您是否尝试过对其他应用程序图像的视图依赖性功能?此外,这个应用程序是使用许多非托管组件编译的还是与普通托管应用程序不同的其他东西?

如果您觉得方便,可以为我提供一个简化的组件申请,以便我可以在myside上进行一些测试。同时,如果您有任何其他发现,请随时在此发布。

问候,

Steven Cheng
Microsoft在线社区支持

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

在回复帖子时,请回复群组通过您的新闻阅读器,以便其他人可以从您的问题中学习并从中受益。

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

此帖子按原样提供。没有保证,也没有权利。

安全! www.microsoft.com/security
(此帖已提供按原样,没有保证,也没有赋予
权利。)
Hello Richard,

Thank you for posting in the MSDN newsgroup.

From your description, I understand you''re using the .net framework sdk
2.0''s "mscorcfg.msc" utility to view an existing .ent application''s
assembly dependencies, however, you got the following error when try
viewing the dependencies,correct?
=========
Unfortunately, the .NET Framework Configuration tool cannot show this list
of assembly dependencies for this application due to an error during the
generation of the list.
========

Based on my understanding, the mscorcfg.msc utility can perform assembly
dependencies list exploring on .net managed applications and there is not
particular or known issue on this configuration tool. I think this problem
could be specific to the certain application you''re evaluating against.
Have you tried the view dependencies fuction on some other application
images? Also, is this application compiled with many unmanaged components
or anything else different from a normal managed application?

If you feel it convenient, you can provide me a simplified one of that
application so that I can perform some test on myside. Meanwhile, if you
have any other finding, please feel free to post here also.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

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

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



这篇关于.NET安全性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆