找着做啊,增加Internet用户访问权限啊

解决方案 »

  1.   

    给asp.net用户增加写入权限,在iis的配置里在你的对应虚拟目录上右击,选择属性,将写入权限钩上。
      

  2.   

    asp_net用户权限不够,如果你不怕安全问题的话,可以直接把这个帐号加入Administrator组
      

  3.   

    執行dcomcnfg命令-->在應用程序欄找到Microsoft excel application點屬性-->再選"安全性"-->三個都選擇"使用自定的存取權-->點擊"編輯",把Everyone和aspnet都加進去就可以了.
      

  4.   

    “/Alarm_4”应用程序中的服务器错误。
    --------------------------------------------------------------------------------访问被拒绝:“Microsoft.Office.Interop.Excel”。 
    说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.IO.FileLoadException: 访问被拒绝:“Microsoft.Office.Interop.Excel”。源错误: 
    行 30:  {
    行 31:  Exc ex=new Exc("ddddddd.xls");
    行 32:  this.Label1.Text=ex.CreateEx();
    行 33:  }
    行 34:  }
     源文件: C:\Inetpub\wwwroot\Alarm_4\Web\WebForm1.aspx.cs    行: 32 程序集加载跟踪: 下列信息有助于确定程序集“Microsoft.Office.Interop.Excel”无法加载的原因。
    === Pre-bind state information ===
    LOG: DisplayName = Microsoft.Office.Interop.Excel, Version=10.0.4504.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
     (Fully-specified)
    LOG: Appbase = file:///C:/Inetpub/wwwroot/Alarm_4
    LOG: Initial PrivatePath = bin
    Calling assembly : Alarm, Version=1.0.1684.24700, Culture=neutral, PublicKeyToken=null.
    ===LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/alarm_4/a0c600ca/f93d1767/Microsoft.Office.Interop.Excel.DLL.
    LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/alarm_4/a0c600ca/f93d1767/Microsoft.Office.Interop.Excel/Microsoft.Office.Interop.Excel.DLL.
    LOG: Attempting download of new URL file:///C:/Inetpub/wwwroot/Alarm_4/bin/Microsoft.Office.Interop.Excel.DLL. 堆栈跟踪: 
    [FileLoadException: 访问被拒绝:“Microsoft.Office.Interop.Excel”。]
       Alarm.Data.Exc.CreateEx() +0
       Alarm.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Alarm_4\Web\WebForm1.aspx.cs:32
       System.Web.UI.Control.OnLoad(EventArgs e) +67
       System.Web.UI.Control.LoadRecursive() +35
       System.Web.UI.Page.ProcessRequestMain() +731 
    --------------------------------------------------------------------------------
    版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573 
    在别的目录下可以,
    但是换个目录又不行了,设置和原来的目录一样
    请问:
    到底应该怎么修改设置????
      

  5.   

    是不是excel文件被设置为只读啊?请确定文件可写.
      

  6.   

    在webconfig中加入<identity impersonate="true"/>就可以了!
      

  7.   

    DCOM可能没有配,需要配置!试试吧,我昨天刚刚解决了这个问题!