Server Error in '/' Application.
--------------------------------------------------------------------------------Unable to load DLL 'gdiplus.dll': 拒绝访问。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.DllNotFoundException: Unable to load DLL 'gdiplus.dll': 拒绝访问。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: 
[DllNotFoundException: Unable to load DLL 'gdiplus.dll': 拒绝访问。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
   System.Drawing.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output) +0
   System.Drawing.Gdip.Initialize() +166
   System.Drawing.Gdip..cctor() +149[TypeInitializationException: The type initializer for 'Gdip' threw an exception.]
   System.Drawing.Gdip.GdipCreateBitmapFromFile(String filename, IntPtr& bitmap) +0
   System.Drawing.Bitmap..ctor(String filename) +73
   validatelogin.Page_Load(Object sender, EventArgs e) +438
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
 

解决方案 »

  1.   

    http://blog.csdn.net/TangZhongxin/archive/2009/10/23/4717456.aspx
      

  2.   

    因为该平台的程序除了一些小的更新外,程序一直运行的很稳定突然出现此类故障,也算是难得首先远程到服务器,进行检查,发现原有的权限配置没有更改过。把Gdiplus.dll加上Everyone权限.重启服务器(MS的系统不明原因重启下解决故障效率很高)
    发现故障依旧郁闷中。。
    打开百度输入错误提示,考,尽然没有发现一篇文章介绍。
    在GG下把,很好有两篇是在少的可怜,打开也就是说一些权限配置上的问题....
    查下Gdiplus.dll,哦,原来这个DLL这两天暴出一个严重的漏洞,BMP文件可以直接挂马运行是不小。。
    服务器上面开启了自动更新,应该是自动更新程序造成的。。难道不成要重装系统...继续不放弃,不断的改变权限,把这个该死的GDI+漏洞补丁在打一次,就这样反复折腾了一个上午。。
    把System.Drawing反汇编看看,其实里面就是直接DllImport调用Gdiplus.dll
    无奈中已经做好的重装的准备
    反正要重装了,在试下把原来.net 2.0(2.0已经卸到重装了)升级到.NET 3.0结果咋样,搞定了。