首页 新闻 论坛 群组 Blog 文档 下载 读书 Tag 网摘 搜索 .NET Java 游戏 视频 人才 外包 培训 数据库 书店 程序员
中国软件网
欢迎您:游客 | 登录 注册 帮助
  • asp.net 安全性问题 [无满意答案结贴,结贴人:clever_yang]
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 11:32:52 楼主
    各位大虾帮帮忙: 最近我用.net1.1  vb 开发的 到本机上可以运行,可是传到虚拟主机上面就出现了下面的问题。。。。 
      希望大家能够提供一下解决方案 。。  我希望能和你们交流..    我的MSN:lives_2008@hotmail.com

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    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.

    Exception Details: System.Security.SecurityException: System.Security.Permissions.SecurityPermission

    Source Error:

    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    or:

    2) Add the following section to the configuration file of your application:

    <configuration>
      <system.web>
          <compilation debug="true"/>
      </system.web>
    </configuration>

    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. 

    Stack Trace:


    [SecurityException: System.Security.Permissions.SecurityPermission]
      ImportExport.WebForm1.ExportSellingSheet(Int64 SalesQuoteNo, String SpreadsheetLocation, String OutputFileLocation) +1088
      ImportExport.WebForm1.ButtonImportExport_Click(Object sender, EventArgs e) +731
      System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
      System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
      System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
      System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
      System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6978
      System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
      System.Web.UI.Page.ProcessRequest() +86
      System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
      System.Web.UI.Page.ProcessRequest(HttpContext context) +49
      ASP.cofruka_admin_importexport_aspx.ProcessRequest(HttpContext context) +29
      System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
      System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
    Welcome!
    100  修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 11:37:081楼 得分:0
    应该是代码问题或者访问权限的问题,并且你的web.config中没有设置这个网站为可以调试的并且没指定默认编译的语言.所以详细错误没有显示出来.
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • NekChan
    • 等级:
    发表于:2007-10-31 11:38:102楼 得分:0
    原因可能是不能读数据库,可能是在防火墙后面,可能对某个目录进行文件操作却没有操作权限……
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 11:41:183楼 得分:0
    Version  Information:  Microsoft  .NET  Framework  Version:2.0.50727.832;  ASP.NET  Version:2.0.50727.832 
    Welcome!
    -----------------------------
    看清楚这个错误,你开发的网站是 .NET  Framework 1.1,而虚拟主机上用的是 .NET  Framework 2.0

    所以肯定就会出问题,联系你的虚拟主机提供商,让他在IIS把你的网站改成用.NET  Framework 1.1来编译,

    而不是2.0。

    具体操作:IIS——右键你的虚拟目录——属性——ASP.NET选项卡——把ASP.NET 版本哪个改成1.1的就OK
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • hdt
    • 等级:
    发表于:2007-10-31 11:43:064楼 得分:0
    ExportSellingSheet

    code???
    ??
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 11:47:135楼 得分:0
    2.0应该没问题的,应该向下兼容

    但是你用1.1来编译2.0的可能就不行了.
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 11:54:266楼 得分:0
    web.config  我配置过还是没 能解决
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 11:57:157楼 得分:0
    测试网页  : http://www.gci-asia.com/cofruka/admin/importexport.aspx  点中 一个单选框 再 点excute
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • hdt
    • 等级:
    发表于:2007-10-31 12:00:148楼 得分:0
    需要在服务器上调整组件服务中你那个com组件的安全性
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 12:00:569楼 得分:0
        还有前提是: 我在本机测试一切正常,传到虚拟主机上才出现问题的
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 12:05:2410楼 得分:0
    版本问题
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 12:37:4311楼 得分:0
    我晕了,现在错误信息又 变了:: 头都大了阿。。。 WHO CAN SAVE  ME ??  THANK YOU!

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.
    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.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.

    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:


    [COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.]
      ImportExport.WebForm1.ExportSellingSheet(Int64 SalesQuoteNo, String SpreadsheetLocation, String OutputFileLocation) +1088
      ImportExport.WebForm1.ButtonImportExport_Click(Object sender, EventArgs e) +731
      System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
      System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
      System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
      System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
      System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
    Welcome!
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 12:38:2912楼 得分:0
    如果 是 在 服务器 端调用excel,要 配置 dcom。分配权限
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 13:14:5913楼 得分:0
    vb看不懂  帮顶下了
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 14:43:5414楼 得分:0
     还是没解决阿......自己Up Yi 下
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • tdtao
    • 等级:
    发表于:2007-10-31 14:52:0815楼 得分:0
    不懂VB
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 15:32:3816楼 得分:0
    你先设置debug为true看看具体的调试信息是什么原因啊,光这么个错误信息有鸟用
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 15:55:2417楼 得分:0
    楼主没试我的方法?
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-10-31 16:00:2718楼 得分:0
    IIS权限的设置问题.........
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2007-11-07 08:29:4319楼 得分:0
    不好意思,不知道为什么给不了分
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    发表于:2008-07-07 11:39:2320楼 得分:0
    不好意思,我不知道最开始为什么不能给分,现在我新开一个技术帖子,希望以上回复过的人来接分。谢谢!!!
    修改 删除 举报 引用 回复

    网站简介广告服务网站地图帮助联系方式诚聘英才English 问题报告
    北京创新乐知广告有限公司 版权所有 京 ICP 证 070598 号
    世纪乐知(北京)网络技术有限公司 提供技术支持
    Copyright © 2000-2008, CSDN.NET, All Rights Reserved