空间商迟迟没有解决?我建议空间商把临时目录下的我的aspnet临时目录删掉?是不是他们不愿意停掉IIS
我的错误信息如下:
Compiler Error Message: CS0433: The type 'ASP.global_asax' exists in both 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\368aa724\e2618b33\assembly\dl3\0be575cb\76fee7ab_4515c801\App_global.asax.DLL' 
and 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\368aa724\e2618b33\App_global.asax.bfwrpviw.dll'

解决方案 »

  1.   

    应是你的程序DLL问题,你传一个最小化程序应不会有那种错误。
      

  2.   

    我的源代码如下:请看看?
    Global.asax
    <%@ Application CodeBehind="Global.asax.cs"  Inherits="counter2.Global" Language="c#" %>
    app_code 下的 Global.asax.cs:
    using System;using System.Collections; using System.ComponentModel; using System.Web; using System.Web.SessionState; using System.IO ;using _lib;namespace counter2 { public class Global : System.Web.HttpApplication {
        protected void Application_Start(object sender, EventArgs e)
        {
            uint count = 0;        StreamReader srd;        string file_path = Server.MapPath("~/counter.txt");        srd = File.OpenText(file_path);        while (srd.Peek() != -1)
            {
                string str = srd.ReadLine();            count = UInt32.Parse(str);        }        object obj = count;        Application.Lock();        Application["counter"] = obj;        Application.UnLock();        srd.Close();
        }    protected void Application_End(object sender, EventArgs e)
        {
            uint js = 0;        js = (uint)Application["counter"];        string file_path = Server.MapPath("~/counter.txt");        StreamWriter fs = new StreamWriter(file_path, false);        fs.WriteLine(js);        fs.Close();    }    protected void Session_Start(object sender, EventArgs e)
        {        string strSql = "insert into t_hitsnum (aspname,ip) values(N'";
            strSql += Request.Params["url"] + "',N'";
            strSql += Request.UserHostAddress;
            strSql += "')";        TSqlDB SetHitNum = new TSqlDB();
            SetHitNum.Execute(strSql);        Application.Lock();        uint jishu = 0;        jishu = (uint)Application["counter"];        jishu = jishu + 1;        object obj = jishu;        Application["counter"] = obj;        string file_path = Server.MapPath("~/counter.txt");        StreamWriter fs = new StreamWriter(file_path, false);        fs.WriteLine(jishu);        fs.Close();        Application.UnLock();    }protected void Application_BeginRequest(Object sender, EventArgs e) { } protected void Application_EndRequest(Object sender, EventArgs e) { } protected void Session_End(Object sender, EventArgs e) { } 
    } } 
      

  3.   

    答案来拉,希望对你有所帮助,以前我也遇到这种问题,被我解决拉,现在贴出来拉
    http://www.ebookit.cn/270.html
      

  4.   

    getnetrmb:谢谢你的关顾  
      Global.asax.cs在我的项目中只有Global.asax引用了其它地方都没有使用??
      

  5.   

    应该是你的Global也被打包进bin里你看看是否有独立的Global.dll,如果有,删除它如果只有一个大的dll,那就是所有代码文件都打包在一起了,那你只能选择重新生成发布网站
      

  6.   

    我的Global没有被打包 是分开编译成dll的
      

  7.   

    Global.aspx 和Global.dll只能有一个在
      

  8.   

    谢谢 shawn_yang
    网站刚开始的一段时间还是可以的,不知后来怎么不可以了
    Global.asax.cs 是放在App_Code目录下
    Global.asax 放在根目录下的
    编译后生成
    App_global.asax.dll
    App_global.asax.compiled
      

  9.   

    MS的bug解决方法有
    1 下载他的一个什么包,用以往的vs 2003的发布方式成为一个程序集来发布 .这个包未经什么认证(ms说的)
    2 调整web.config的那个预编译的时间间隔(会减少出错次数)
    3 使用固定程序集的发布方式
      

  10.   

    为什么我的Global.asax没有cs文件,直接是写在script块里面的.我编译生成的dll文件名也全是随机的.