CAS和C# [英] CAS and C#

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

问题描述

不要开始朗战,但​​我问了几个VB.NET人他们如何解决

CAS问题我使用过SQL适配器,FileIO操作等。我得到了一些(很多)空白的外观。 VB.NET作者是不是没有这个问题,或者说他们的代码是如此的良性而从未使用任何安全资源?其中大部分是b $ b读取/写入SQL表。我们正在使用1.1框架和SDK。


阅读他们的代码我看到并使用语句导入这些语句:

使用System.Security.Permissions ;

使用System.Security;


给出了什么?


TIA,

E.

Not to start a lang war, but I asked a couple VB.NET people how they resolved
a CAS issue I had using SQL adapters, FileIO operations and the like. I got
some (quite a few) blank looks. Do VB.NET authors not have this issue or is
it possible their code is so benign it never used any secured resources? Most
of it is reading/writing to SQL tables. We''re using the 1.1 framework and SDK.

Reading their code I saw and Import statements like these using statements:
using System.Security.Permissions;
using System.Security;

What gives?

TIA,

E.

推荐答案

Esteban,


你有什么问题?不要开始语言大战

,但总的来说,VB并不是针对那些关注这类事情的观众。现在,MS正在向业余爱好者

程序员推销VB,一般来说,那个级别的程序员不会像CAS那样关心。


具体问题是什么?


-

- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com


Esteban404 < ES ******** @ discussions.microsoft.com>在消息中写道

新闻:FA ********************************** @ microsof t.com ...
Esteban,

What is the issue that you are having? Not to start a language war
either, but in general, VB is not targeted towards the audience that is
concerned with such things. Right now, MS is marketing VB to the hobbyist
programmer, and in general, programmers on that level are not going to be
concerned with things like CAS.

What specifically is your issue?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Esteban404" <Es********@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
不要开始朗战,但​​我问了几个VB.NET人他们如何解决我使用SQL适配器的CAS问题, FileIO操作等。我有一些(很多)空白的样子。 VB.NET作者是不是没有这个问题,或者
是否可能他们的代码是如此的良性而从未使用任何安全资源?
其中大多数是读/写SQL表。我们正在使用1.1框架和
SDK。

使用
语句读取他们看到的代码并使用
语句导入语句:
使用System.Security.Permissions ;
使用System.Security;

提供什么?

TIA,

E。
Not to start a lang war, but I asked a couple VB.NET people how they
resolved
a CAS issue I had using SQL adapters, FileIO operations and the like. I
got
some (quite a few) blank looks. Do VB.NET authors not have this issue or
is
it possible their code is so benign it never used any secured resources?
Most
of it is reading/writing to SQL tables. We''re using the 1.1 framework and
SDK.

Reading their code I saw and Import statements like these using
statements:
using System.Security.Permissions;
using System.Security;

What gives?

TIA,

E.



我会说它不依赖于语言和环境。


使用任何语言的ASP.NET Web开发人员习惯于在服务器上运行完全信任的代码,实际上,在1.0中,

代码只能以完全信任的方式运行,很多人都不知道

1.1中的不同信任级别。


编写智能客户端应用程序和HREF EXE的人必须考虑到

CAS的语言。如果没有,软件

休息!


-

Scott
http://www.OdeToCode.com/blogs/scott/


2004年10月20日星期三08:23:02 -0700,Esteban404

< Es ******** @ discussion.microsoft.com>写道:
I''d say it doesn''t depend on the language as much as the environment.

ASP.NET web developers using any language are accustomed to having
their code running on the server with full trust, indeed, in 1.0 the
code could only run with full trust, and many people are not aware of
the different trust levels in 1.1.

People writing smart client applications and HREF EXEs have to take
CAS into account regardless of the language. If not, the software
breaks!

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 20 Oct 2004 08:23:02 -0700, "Esteban404"
<Es********@discussions.microsoft.com> wrote:
不要开始朗战,但​​我问了几个VB.NET人他们如何解决我使用SQL适配器的CAS问题,FileIO操作和喜欢。我有一些(很多)空白的样子。 VB.NET作者是不是没有这个问题,或者他们的代码是如此温和,从未使用任何安全资源?其中大多数是读/写SQL表。我们正在使用1.1框架和SDK。

阅读他们看到的代码并使用语句导入这些语句:
使用System.Security.Permissions;
使用System。安全性;

是什么给予​​的?

TIA,

E。
Not to start a lang war, but I asked a couple VB.NET people how they resolved
a CAS issue I had using SQL adapters, FileIO operations and the like. I got
some (quite a few) blank looks. Do VB.NET authors not have this issue or is
it possible their code is so benign it never used any secured resources? Most
of it is reading/writing to SQL tables. We''re using the 1.1 framework and SDK.

Reading their code I saw and Import statements like these using statements:
using System.Security.Permissions;
using System.Security;

What gives?

TIA,

E.






感谢您的回复Nicholas,


我的具体问题是我收到的错误消息表明我已经分配了

足够的权限来执行操作。通过CAS的复杂性阅读

,我正在试图让我的代码快速获得用户
。这是本月到期的,我还有3天时间才能获得b $ b out在训练中一个星期。


该应用程序是一个WinForm快速和脏的幻灯片放映需要FullPath,

FileIO,SQL访问。我已经在SQL Server 2K中创建了ActiveDirectory组

,尽管如此,一切都可以使用这个基于角色的Windows安全性。我正在捕捉大量的热量,因为我不能像他们那样代码n-go

。它最终将是一个ASP.NET应用程序,用作这些信息亭的新

生成器/发布应用程序。我相信如果你可以访问域中的一个路径或一个数据库,你可以访问其他人,所以代码

需要比平时更安全。 />

我确实认为比VB更像C-C并快速拿起C#。现在我只需要

将提出的要求(例如CAS)提交(精神上)。


感谢您的回复>>尽管我不会说出任何关于类似玩具的VB.NET的b $ b性质。 ; - ]


E.


Nicholas Paldino [.NET / C#MVP]"写道:
Thanks for the response Nicholas,

My specific issue is that I''m receiving error messages stating that I have
not assigned sufficient permissions to perform the operations. Reading
through the complexities of CAS, I am over my head trying to get my code to
the users fast. This is due this month and I''ve got 3 days left before I''m
out "in training" for a week.

The application is a WinForm quick and dirty slide show requiring FullPath,
FileIO, SQL access. I''ve created the ActiveDirectory groups in SQL Server 2K
and everything works using this role-based Windows security as far as old
school though goes. I''m catching a lot of heat because I can''t just code-n-go
like they are. It will eventually be an ASP.NET application used as a new
generator/posting application for these kiosks. I believe if you can access
one path or one database in a domain, you can get to others, so the code
needs to be more secure than normal.

I do think more C-like than VB and picked up C# quickly. Now I just need to
wrestle the requirements like CAS into submission (mentally).

Thanks for the response >>though I won''t say anything regarding the toy-like
nature of VB.NET. ;-]

E.

"Nicholas Paldino [.NET/C# MVP]" wrote:
Esteban,

你有什么问题?不要开始语言大战
,但总的来说,VB并不针对那些关注此类事情的观众。现在,MS正在向业余爱好者
程序员推销VB,一般来说,那个级别的程序员不会关心CAS这样的事情。

具体是什么您的问题?

-
- Nicholas Paldino [.NET / C#MVP]
- mv*@spam.guard.caspershouse.com

Esteban404 < ES ******** @ discussions.microsoft.com>在消息中写道
新闻:FA ********************************** @ microsof t.com。 ..
Esteban,

What is the issue that you are having? Not to start a language war
either, but in general, VB is not targeted towards the audience that is
concerned with such things. Right now, MS is marketing VB to the hobbyist
programmer, and in general, programmers on that level are not going to be
concerned with things like CAS.

What specifically is your issue?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Esteban404" <Es********@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
不要开始朗战,但​​我问了几个VB.NET人员他们如何解决我使用SQL适配器,FileIO操作和CAS问题的CAS问题喜欢。我有一些(很多)空白的样子。 VB.NET作者是不是没有这个问题,或者
是否可能他们的代码是如此的良性而从未使用任何安全资源?
其中大多数是读/写SQL表。我们正在使用1.1框架和
SDK。

使用
语句读取他们看到的代码并使用
语句导入语句:
使用System.Security.Permissions ;
使用System.Security;

提供什么?

TIA,

E。
Not to start a lang war, but I asked a couple VB.NET people how they
resolved
a CAS issue I had using SQL adapters, FileIO operations and the like. I
got
some (quite a few) blank looks. Do VB.NET authors not have this issue or
is
it possible their code is so benign it never used any secured resources?
Most
of it is reading/writing to SQL tables. We''re using the 1.1 framework and
SDK.

Reading their code I saw and Import statements like these using
statements:
using System.Security.Permissions;
using System.Security;

What gives?

TIA,

E.




这篇关于CAS和C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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