“/”应用程序中的服务器错误。
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: CS0246: 找不到类型或命名空间名称“Dvbbs”(是否缺少 using 指令或程序集引用?)
源错误:
|
行 2: <%@ Import Namespace="System.IO" %>
行 3: <%@ Import Namespace="Dvbbs.Utils" %>
行 4: <%@ Import Namespace="Dvbbs.Web.Configuration" %>
行 5: <%@ Import Namespace="System.Xml" %>
行 6: <script language="C#" runat="server"> |
源文件: d:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx 行: 4
显示详细的编译器输出:
C:\WINNT\system32> "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINNT\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINNT\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINNT\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINNT\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINNT\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINNT\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\52083327\c5019998\App_Web_nos1tkbk.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\52083327\c5019998\App_Web_nos1tkbk.0.cs" "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\52083327\c5019998\App_Web_nos1tkbk.1.cs"
Microsoft (R) Visual C# 2005 编译器 版本 8.00.50727.1433
用于 Microsoft (R) Windows (R) 2005 Framework 版本 2.0.50727
版权所有 (C) Microsoft Corporation 2001-2005。保留所有权利。
d:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx(4,11): error CS0246: 找不到类型或命名空间名称“Dvbbs”(是否缺少 using 指令或程序集引用?)
d:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx(3,11): error CS0246: 找不到类型或命名空间名称“Dvbbs”(是否缺少 using 指令或程序集引用?)
|
显示完整的编译源:
行 1: #pragma checksum "D:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "8E66A5855D5A8D40C9642F97CCD37D0C"
行 2: //------------------------------------------------------------------------------
行 3: // <auto-generated>
行 4: // 此代码由工具生成。
行 5: // 运行库版本:2.0.50727.1433
行 6: //
行 7: // 对此文件的更改可能会导致不正确的行为,并且如果
行 8: // 重新生成代码,这些更改将会丢失。
行 9: // </auto-generated>
行 10: //------------------------------------------------------------------------------
行 11:
行 12: namespace ASP {
行 13:
行 14: #line 4 "D:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx"
行 15: using Dvbbs.Web.Configuration;
行 16:
行 17: #line default
行 18: #line hidden
行 19:
行 20: #line 3 "D:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx"
行 21: using Dvbbs.Utils;
行 22:
行 23: #line default
行 24: #line hidden
行 25:
行 26: #line 318 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 27: using System.Web.Security;
行 28:
行 29: #line default
行 30: #line hidden
行 31:
行 32: #line 311 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 33: using System.Collections.Specialized;
行 34:
行 35: #line default
行 36: #line hidden
行 37:
行 38: #line 320 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 39: using System.Web.UI;
行 40:
行 41: #line default
行 42: #line hidden
行 43:
行 44: #line 309 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 45: using System;
行 46:
行 47: #line default
行 48: #line hidden
行 49:
行 50: #line 321 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 51: using System.Web.UI.WebControls;
行 52:
行 53: #line default
行 54: #line hidden
行 55:
行 56: #line 312 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 57: using System.Configuration;
行 58:
行 59: #line default
行 60: #line hidden
行 61:
行 62: #line 310 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 63: using System.Collections;
行 64:
行 65: #line default
行 66: #line hidden
行 67:
行 68: #line 319 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 69: using System.Web.Profile;
行 70:
行 71: #line default
行 72: #line hidden
行 73:
行 74: #line 313 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 75: using System.Text;
行 76:
行 77: #line default
行 78: #line hidden
行 79:
行 80: #line 314 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 81: using System.Text.RegularExpressions;
行 82:
行 83: #line default
行 84: #line hidden
行 85:
行 86: #line 5 "D:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx"
行 87: using System.Xml;
行 88:
行 89: #line default
行 90: #line hidden
行 91:
行 92: #line 316 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 93: using System.Web.Caching;
行 94:
行 95: #line default
行 96: #line hidden
行 97:
行 98: #line 323 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 99: using System.Web.UI.HtmlControls;
行 100:
行 101: #line default
行 102: #line hidden
行 103:
行 104: #line 2 "D:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx"
行 105: using System.IO;
行 106:
行 107: #line default
行 108: #line hidden
行 109:
行 110: #line 322 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 111: using System.Web.UI.WebControls.WebParts;
行 112:
行 113: #line default
行 114: #line hidden
行 115:
行 116: #line 317 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 117: using System.Web.SessionState;
行 118:
行 119: #line default
行 120: #line hidden
行 121:
行 122: #line 315 "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
行 123: using System.Web;
行 124:
行 125: #line default
行 126: #line hidden
行 127:
行 128:
行 129: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
行 130: public class bbs_install_environment_test_aspx : global::System.Web.UI.Page, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler {
行 131:
行 132: private static bool @__initialized;
行 133:
行 134: private static object @__fileDependencies;
行 135:
行 136:
行 137: #line 6 "D:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx"
行 138:
行 139: protected override void OnInit(EventArgs e)
行 140: {
行 141: // 检测论坛地址
行 142: if ("forum_install_directory_test" == Request.QueryString["install_action"])
行 143: {
行 144: /*
行 145: if (null != Config.Settings)
行 146: {
行 147: Response.Write("OK");
行 148: }
行 149: //*/
行 150:
行 151: // 初始化论坛所需的配置文件……
行 152: if (InitForum())
行 153: {
行 154: Response.Write("OK");
行 155: }
行 156: else
行 157: {
行 158: Response.Write("未知的错误,请联系我们!");
行 159: }
行 160: }
行 161: }
行 162: private bool InitForum()
行 163: {
行 164: // 初始化 web.config
行 165: if (!InitWebConfig())
行 166: {
行 167: return false;
行 168: }
行 169:
行 170: // 初始化 Dvbbs.Web.config
行 171: if (!InitDvbbsWebConfig())
行 172: {
行 173: return false;
行 174: }
行 175:
行 176: return true;
行 177: }
行 178:
行 179: // 初始化 web.config
行 180: private bool InitWebConfig()
行 181: {
行 182: string web_config_path = Server.MapPath("~/web.config");
行 183: if (!File.Exists(web_config_path))
行 184: {
行 185: string src_web_config_path = Server.MapPath("../web.config");
行 186: if (!File.Exists(src_web_config_path))
行 187: {
行 188: throw new HttpException("您的安装程序不完整,缺少 web.config");
行 189: }
行 190: File.Copy(src_web_config_path, web_config_path);
行 191: return true;
行 192: }
行 193:
行 194: // 向 web.config 中添加 httpModules <add type="Dvbbs.Web.UrlRewriter.HttpModule, Dvbbs.bbs" name="DvModuleRewriter" />
行 195: HttpApplication app = Context.ApplicationInstance;
行 196: if (null == app.Modules.Get("DvModuleRewriter"))
行 197: {
行 198: XmlDocument xml_doc = new XmlDocument();
行 199: xml_doc.Load(web_config_path);
行 200: XmlNode xml_node = xml_doc.SelectSingleNode("configuration/system.web/httpModules/add[@name=''DvModuleRewriter'']");
行 201: if (null == xml_node) // 很郁闷,测试中发现要再多检查一次才行……
行 202: {
行 203: xml_node = xml_doc.SelectSingleNode("configuration/system.web");
行 204: if (null == xml_node)
行 205: {
行 206: xml_node = xml_doc.CreateElement("system.web");
行 207: xml_doc.DocumentElement.AppendChild(xml_node);
行 208: }
行 209: XmlNode http_modules = xml_node.SelectSingleNode("httpModules");
行 210: if (null == http_modules)
行 211: {
行 212: http_modules = xml_doc.CreateElement("httpModules");
行 213: xml_node.AppendChild(http_modules);
行 214: }
行 215: XmlElement ele = xml_doc.CreateElement("add");
行 216: ele.SetAttribute("name", "DvModuleRewriter");
行 217: ele.SetAttribute("type", "Dvbbs.Web.UrlRewriter.HttpModule, Dvbbs.bbs");
行 218: http_modules.AppendChild(ele);
行 219: try
行 220: {
行 221: xml_doc.Save(web_config_path);
行 222: }
行 223: catch (UnauthorizedAccessException)
行 224: {
行 225: Response.Write("无法向站点根目录的 web.config 添加论坛模块,请手动修改 web.config ");
行 226: return false;
行 227: }
行 228: }
行 229: }
行 230:
行 231: return true;
行 232: }
行 233:
行 234: // 初始化 Dvbbs.Web.config
行 235: private bool InitDvbbsWebConfig()
行 236: {
行 237: string src_cfg_file_path = Server.MapPath("../Dvbbs.Web.config");
行 238: if (!File.Exists(src_cfg_file_path))
行 239: {
行 240: throw new HttpException("您的安装程序不完整,缺少 Dvbbs.Web.config");
行 241: }
行 242:
行 243: string dest_cfg_file_path = Server.MapPath("~/Dvbbs.Web.config");
行 244: if (!File.Exists(dest_cfg_file_path))
行 245: {
行 246: File.Copy(src_cfg_file_path, dest_cfg_file_path, false);
行 247: }
行 248:
行 249: ForumSystemConfigInfoCollection cfgCollection = ForumSystemConfigurationProvider.GetInstance();
行 250: if (null == cfgCollection)
行 251: {
行 252: throw new HttpException("站点根目录下的 Dvbbs.Web.config 不存在或其格式不合法!");
行 253: }
行 254:
行 255: //string forum_virtual_base_path = "/" + Server.MapPath(Path.GetDirectoryName(Request.Path) + "\\..\\").Replace(Server.MapPath("/"), "").Replace("\\", "/");
行 256: string forum_virtual_base_path = Path.GetDirectoryName(Request.Path).Replace("\\install", "\\").Replace("\\", "/");
行 257: bool exists = false;
行 258: foreach (ForumSystemConfigInfo info in cfgCollection)
行 259: {
行 260: if (info.ForumRootVirtualPath.ToLower() == forum_virtual_base_path.ToLower())
行 261: {
行 262: exists = true;
行 263: break;
行 264: }
行 265: }
行 266: if (!exists)
行 267: {
行 268: ForumSystemConfigInfo cfg_info = new ForumSystemConfigInfo();
行 269: cfg_info.ForumRootVirtualPath = forum_virtual_base_path;
行 270: cfgCollection.Add(cfg_info);
行 271: ForumSystemConfigurationProvider.SaveInstance(cfgCollection);
行 272: }
行 273:
行 274: return true;
行 275: }
行 276:
行 277: #line default
行 278: #line hidden
行 279:
行 280:
行 281: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
行 282: public bbs_install_environment_test_aspx() {
行 283: string[] dependencies;
行 284: ((global::System.Web.UI.Page)(this)).AppRelativeVirtualPath = "~/bbs/install/environment_test.aspx";
行 285: if ((global::ASP.bbs_install_environment_test_aspx.@__initialized == false)) {
行 286: dependencies = new string[1];
行 287: dependencies[0] = "~/bbs/install/environment_test.aspx";
行 288: global::ASP.bbs_install_environment_test_aspx.@__fileDependencies = this.GetWrappedFileDependencies(dependencies);
行 289: global::ASP.bbs_install_environment_test_aspx.@__initialized = true;
行 290: }
行 291: this.Server.ScriptTimeout = 30000000;
行 292: }
行 293:
行 294: protected System.Web.Profile.DefaultProfile Profile {
行 295: get {
行 296: return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));
行 297: }
行 298: }
行 299:
行 300: protected override bool SupportAutoEvents {
行 301: get {
行 302: return false;
行 303: }
行 304: }
行 305:
行 306: protected System.Web.HttpApplication ApplicationInstance {
行 307: get {
行 308: return ((System.Web.HttpApplication)(this.Context.ApplicationInstance));
行 309: }
行 310: }
行 311:
行 312: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
行 313: private void @__BuildControlTree(bbs_install_environment_test_aspx @__ctrl) {
行 314:
行 315: #line 1 "D:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx"
行 316: @__ctrl.EnableViewState = false;
行 317:
行 318: #line default
行 319: #line hidden
行 320:
行 321: #line 1 "D:\wwwroot\wstone\wwwroot\bbs\install\environment_test.aspx"
行 322: this.InitializeCulture();
行 323:
行 324: #line default
行 325: #line hidden
行 326: }
行 327:
行 328: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
行 329: protected override void FrameworkInitialize() {
行 330: base.FrameworkInitialize();
行 331: this.@__BuildControlTree(this);
行 332: this.AddWrappedFileDependencies(global::ASP.bbs_install_environment_test_aspx.@__fileDependencies);
行 333: }
行 334:
行 335: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
行 336: public override int GetTypeHashCode() {
行 337: return 5381;
行 338: }
行 339:
行 340: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
行 341: public override void ProcessRequest(System.Web.HttpContext context) {
行 342: base.ProcessRequest(context);
行 343: }
行 344: }
行 345: }
行 346: |
function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == ''none'') { elemLevel2.style.display = ''''; } else { elemLevel2.style.display = ''none''; } }
版本信息: Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433
//我是下载的最新.net版,上传到空间后,进行安装的。