易截截图软件、单文件、免安装、纯绿色、仅160KB

The default ASP.NET Trust level

 啟動:Microsoft   .NET   Framework   2.0   Configuration-->Runtion   Security   Policy-->右鍵-->Adjust   Security-->Make   changes   to     this   computer-->調節所有結點的權限為Full   Trust-->搞定!!  
System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint) at System.Net.HttpRequestCreator.Create(Uri Uri) at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) at System.Net.WebRequest.Create(String requestUriString) at Send_Email.Button5_Click(Object sender, EventArgs e) in E:\web\test.aspx.vb:line 85 The action that failed was: Demand The type of the first permission that failed was: System.Net.WebPermission The Zone of the assembly that failed was: MyComputer
Common errors associated with inadequate Trust Level
Security Exception:
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
---
Error:
System.Security.SecurityException: That assembly does not allow partially trusted callers.
---
Stack Trace:
[SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
---
Error:
Request for the permission of: type 'System.Security.Permissions.EnvironmentPermission, mscorlib, V


相关文档:

asp.net“服务器应用程序不可用” 解决方法

引起这个的原因大概是现安装了.Net Framework后装的IIS导致.Net没有在IIS里注册。
在网上找了很久都是说从.net命令行工具里运行aspnet_regIIS /i就可以了(或者在类似下面的目录:C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i),但是自己试了很多次都不行,后来发现还是要先卸载再安装,重新创建为 ......

asp.net 页面延时五秒,跳转到另外的页面

asp.net 页面延时五秒,跳转到另外的页面的实现代码。
--前台
复制代码 代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Successed.aspx.cs" Inherits="Biz_Order_Successed" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xht ......

ASP.NET中常用的用来输出JS脚本的类

在ASP.NET中我们经常需要输出一些JS脚本,比如弹出一个警告窗口,返回到历史页面等JS功能,我看到网上好多这方面的代码,以下代码是其中之一。
整个程序的代码如下:
复制代码 代码如下:
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
/// &l ......

ASP.NET 上传图片并生成缩略图

private void btnUploadPicture_Click(object sender, System.EventArgs e) { //检查上传文件的格式是否有效 if(this.UploadFile.PostedFile.ContentType.ToLower().IndexOf("image") < 0) { Response.Write("上传图片格式无效!"); return; } //生成原图 Byte[] oFileByte = new byte[this.UploadFile.PostedFile.Conte ......

asp.net Web.config 详细配置说明

asp.net开发的朋友,经常用得到web.config文件的配置,所以我们特整理了中文说明。
<?xml version="1.0" standalone="yes"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<!--配置全局变量-->
<appSettings>
<add key="examstr" value="server=.;da ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号