L
Lauchlan M
Hi.
I have an ASP.net project that works fine.
I copied it to another project using the following steps:
<<
(i) create a new VS.NET ASP.NET project.
(ii) copy all the files from the old wwwroot subfolder to the new one
(iii) include all those files into the project
(iv) add a reference or two that didn't get copied over in (iii)
(v) build it - it builds ok
What happens when I take some page of the new project and try to 'view in
browser' I get:
<<
Server Error in '/MyWebInterface_NexusDB' Application.
----------------------------------------------------------------------------
----
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS1595: 'MyWebInterface.Secure.MyHeader' is defined
in multiple places; using definition from
'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\24513897\d2fa734
0_58f7c301\MyWebInterface_NexusDB.DLL'
Source Error:
Line 27:
Line 28:
[System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 29: public class MyHeader_ascx : MyWebInterface.Secure.MyHeader {
Line 30:
Line 31: private static bool __initialized = false;
Source File: e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\ucrrz4fp.0.cs Line: 29
As far as I can work out (the source file info at the end tells me nothing!)
it is complaining about a header user control I made, which of course is
referred to in multiple places (pretty much every page), but I've got no
idea
why it's complaining about it or even in which file the complaint is being
generated (on line 29 of that file).
The detailed compiler output is
<<
E:\WINNT\system32> "e:\winnt\microsoft.net\framework\v1.1.4322\csc.exe"
/t:library /utf8output
/R:"e:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
files\Mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\464084f2\32fdf8b
5_8293c301\Mywebinterface.dll"
/R:"e:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web
..dll"
/R:"e:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll"
/R:"e:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\s
ystem.web.services.dll"
/R:"e:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml
..dll"
/R:"e:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system
..drawing.dll"
/R:"e:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\sys
tem.web.mobile.dll" /R:"e:\winnt\microsoft.net\framework\v1.1.4322\temporary
asp.net
files\Mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\24513897\9efd1a9
9_42f8c301\Mywebinterface_nexusdb.dll"
/R:"e:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.da
ta.dll"
/R:"e:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d5
0a3a\system.enterpriseservices.dll"
/R:"e:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll"
/R:"e:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
files\Mywebinterface_nexusdb\fe7356c1\5423ab61\9xqkxlsx.dll"
/out:"E:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\9cswzlnb.dll" /DEBUG
/debug+ /optimize- /warnaserror /w:1
"E:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\9cswzlnb.0.cs"
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\9cswzlnb.0.cs(29,39): error
CS1595: 'MyWebInterface.Secure.MyHeader' is defined in multiple places;
using definition from 'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\464084f2\32fdf8b
5_8293c301\MyWebInterface.DLL'
The complete compilation source is
<<
Line 1:
//--------------------------------------------------------------------------
----
Line 2: // <autogenerated>
Line 3: // This code was generated by a tool.
Line 4: // Runtime Version: 1.1.4322.573
Line 5: //
Line 6: // Changes to this file may cause incorrect behavior and will
be lost if
Line 7: // the code is regenerated.
Line 8: // </autogenerated>
Line 9:
//--------------------------------------------------------------------------
----
Line 10:
Line 11: namespace ASP {
Line 12: using System;
Line 13: using System.Collections;
Line 14: using System.Collections.Specialized;
Line 15: using System.Configuration;
Line 16: using System.Text;
Line 17: using System.Text.RegularExpressions;
Line 18: using System.Web;
Line 19: using System.Web.Caching;
Line 20: using System.Web.SessionState;
Line 21: using System.Web.Security;
Line 22: using System.Web.UI;
Line 23: using System.Web.UI.WebControls;
Line 24: using System.Web.UI.HtmlControls;
Line 25: using ASP;
Line 26:
Line 27:
Line 28:
[System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 29: public class MyHeader_ascx : MyWebInterface.Secure.MyHeader {
Line 30:
Line 31: private static bool __initialized = false;
Line 32:
Line 33: public MyHeader_ascx() {
Line 34: if ((ASP.MyHeader_ascx.__initialized == false)) {
Line 35: ASP.MyHeader_ascx.__initialized = true;
Line 36: }
Line 37: }
Line 38:
Line 39: protected override bool SupportAutoEvents {
Line 40: get {
Line 41: return false;
Line 42: }
Line 43: }
Line 44:
Line 45: protected ASP.Global_asax ApplicationInstance {
Line 46: get {
Line 47: return
((ASP.Global_asax)(this.Context.ApplicationInstance));
Line 48: }
Line 49: }
Line 50:
Line 51: public override string TemplateSourceDirectory {
Line 52: get {
Line 53: return "/MyWebInterface_NexusDB";
Line 54: }
Line 55: }
Line 56:
Line 57: private System.Web.UI.Control __BuildControllbHome() {
Line 58: System.Web.UI.WebControls.LinkButton __ctrl;
Line 59:
Line 60: #line 4
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 61: __ctrl = new System.Web.UI.WebControls.LinkButton();
Line 62:
Line 63: #line default
Line 64: #line hidden
Line 65: this.lbHome = __ctrl;
Line 66:
Line 67: #line 4
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 68: __ctrl.ID = "lbHome";
Line 69:
Line 70: #line default
Line 71: #line hidden
Line 72: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 73:
Line 74: #line 4
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 75: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("Home"));
Line 76:
Line 77: #line default
Line 78: #line hidden
Line 79: return __ctrl;
Line 80: }
Line 81:
Line 82: private System.Web.UI.Control __BuildControlhlinkPublic()
{
Line 83: System.Web.UI.WebControls.HyperLink __ctrl;
Line 84:
Line 85: #line 5
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 86: __ctrl = new System.Web.UI.WebControls.HyperLink();
Line 87:
Line 88: #line default
Line 89: #line hidden
Line 90: this.hlinkPublic = __ctrl;
Line 91:
Line 92: #line 5
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 93: __ctrl.ID = "hlinkPublic";
Line 94:
Line 95: #line default
Line 96: #line hidden
Line 97:
Line 98: #line 5
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 99: __ctrl.NavigateUrl = "~/public/PublicMain.aspx";
Line 100:
Line 101: #line default
Line 102: #line hidden
Line 103: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 104:
Line 105: #line 5
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 106: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("Public"));
Line 107:
Line 108: #line default
Line 109: #line hidden
Line 110: return __ctrl;
Line 111: }
Line 112:
Line 113: private System.Web.UI.Control __BuildControlhrefSecure()
{
Line 114: System.Web.UI.HtmlControls.HtmlAnchor __ctrl;
Line 115:
Line 116: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 117: __ctrl = new System.Web.UI.HtmlControls.HtmlAnchor();
Line 118:
Line 119: #line default
Line 120: #line hidden
Line 121: this.hrefSecure = __ctrl;
Line 122:
Line 123: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 124: __ctrl.ID = "hrefSecure";
Line 125:
Line 126: #line default
Line 127: #line hidden
Line 128:
Line 129: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 130: __ctrl.HRef = "~/Secure/Main.aspx";
Line 131:
Line 132: #line default
Line 133: #line hidden
Line 134: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 135:
Line 136: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 137: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n\t\t\tSecure"));
Line 138:
Line 139: #line default
Line 140: #line hidden
Line 141: return __ctrl;
Line 142: }
Line 143:
Line 144: private System.Web.UI.Control __BuildControlspnSecure() {
Line 145: System.Web.UI.HtmlControls.HtmlGenericControl __ctrl;
Line 146:
Line 147: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 148: __ctrl = new
System.Web.UI.HtmlControls.HtmlGenericControl("span");
Line 149:
Line 150: #line default
Line 151: #line hidden
Line 152: this.spnSecure = __ctrl;
Line 153:
Line 154: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 155: __ctrl.ID = "spnSecure";
Line 156:
Line 157: #line default
Line 158: #line hidden
Line 159:
Line 160: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 161: this.__BuildControlhrefSecure();
Line 162:
Line 163: #line default
Line 164: #line hidden
Line 165: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 166:
Line 167: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 168: __parser.AddParsedSubObject(this.hrefSecure);
Line 169:
Line 170: #line default
Line 171: #line hidden
Line 172:
Line 173: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 174: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" | "));
Line 175:
Line 176: #line default
Line 177: #line hidden
Line 178: return __ctrl;
Line 179: }
Line 180:
Line 181: private System.Web.UI.Control __BuildControlhrefAdmin() {
Line 182: System.Web.UI.HtmlControls.HtmlAnchor __ctrl;
Line 183:
Line 184: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 185: __ctrl = new System.Web.UI.HtmlControls.HtmlAnchor();
Line 186:
Line 187: #line default
Line 188: #line hidden
Line 189: this.hrefAdmin = __ctrl;
Line 190:
Line 191: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 192: __ctrl.ID = "hrefAdmin";
Line 193:
Line 194: #line default
Line 195: #line hidden
Line 196:
Line 197: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 198: __ctrl.HRef = "~/Secure/Admin/AdminMain.aspx";
Line 199:
Line 200: #line default
Line 201: #line hidden
Line 202: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 203:
Line 204: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 205: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n\t\t\tAdmin"));
Line 206:
Line 207: #line default
Line 208: #line hidden
Line 209: return __ctrl;
Line 210: }
Line 211:
Line 212: private System.Web.UI.Control __BuildControlspnAdmin() {
Line 213: System.Web.UI.HtmlControls.HtmlGenericControl __ctrl;
Line 214:
Line 215: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 216: __ctrl = new
System.Web.UI.HtmlControls.HtmlGenericControl("span");
Line 217:
Line 218: #line default
Line 219: #line hidden
Line 220: this.spnAdmin = __ctrl;
Line 221:
Line 222: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 223: __ctrl.ID = "spnAdmin";
Line 224:
Line 225: #line default
Line 226: #line hidden
Line 227:
Line 228: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 229: this.__BuildControlhrefAdmin();
Line 230:
Line 231: #line default
Line 232: #line hidden
Line 233: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 234:
Line 235: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 236: __parser.AddParsedSubObject(this.hrefAdmin);
Line 237:
Line 238: #line default
Line 239: #line hidden
Line 240:
Line 241: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 242: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" | "));
Line 243:
Line 244: #line default
Line 245: #line hidden
Line 246: return __ctrl;
Line 247: }
Line 248:
Line 249: private System.Web.UI.Control __BuildControllbLogOut() {
Line 250: System.Web.UI.WebControls.LinkButton __ctrl;
Line 251:
Line 252: #line 10
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 253: __ctrl = new System.Web.UI.WebControls.LinkButton();
Line 254:
Line 255: #line default
Line 256: #line hidden
Line 257: this.lbLogOut = __ctrl;
Line 258:
Line 259: #line 10
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 260: __ctrl.ID = "lbLogOut";
Line 261:
Line 262: #line default
Line 263: #line hidden
Line 264: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 265:
Line 266: #line 10
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 267: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("Log Out"));
Line 268:
Line 269: #line default
Line 270: #line hidden
Line 271: return __ctrl;
Line 272: }
Line 273:
Line 274: private System.Web.UI.Control __BuildControllblURL() {
Line 275: System.Web.UI.WebControls.Label __ctrl;
Line 276:
Line 277: #line 11
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 278: __ctrl = new System.Web.UI.WebControls.Label();
Line 279:
Line 280: #line default
Line 281: #line hidden
Line 282: this.lblURL = __ctrl;
Line 283:
Line 284: #line 11
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 285: __ctrl.ID = "lblURL";
Line 286:
Line 287: #line default
Line 288: #line hidden
Line 289: return __ctrl;
Line 290: }
Line 291:
Line 292: private void __BuildControlTree(System.Web.UI.Control
__ctrl) {
Line 293: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 294:
Line 295: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 296: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n<H2 align=\"center\"><font
color=\"darkred\">My Regional Data Integration Onli" +
Line 297: "ne</font>\r\n</H2>\r\n<P align=\"center\">"));
Line 298:
Line 299: #line default
Line 300: #line hidden
Line 301:
Line 302: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 303: this.__BuildControllbHome();
Line 304:
Line 305: #line default
Line 306: #line hidden
Line 307:
Line 308: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 309: __parser.AddParsedSubObject(this.lbHome);
Line 310:
Line 311: #line default
Line 312: #line hidden
Line 313:
Line 314: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 315: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" | \r\n\t"));
Line 316:
Line 317: #line default
Line 318: #line hidden
Line 319:
Line 320: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 321: this.__BuildControlhlinkPublic();
Line 322:
Line 323: #line default
Line 324: #line hidden
Line 325:
Line 326: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 327: __parser.AddParsedSubObject(this.hlinkPublic);
Line 328:
Line 329: #line default
Line 330: #line hidden
Line 331:
Line 332: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 333: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" | \r\n\t"));
Line 334:
Line 335: #line default
Line 336: #line hidden
Line 337:
Line 338: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 339: this.__BuildControlspnSecure();
Line 340:
Line 341: #line default
Line 342: #line hidden
Line 343:
Line 344: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 345: __parser.AddParsedSubObject(this.spnSecure);
Line 346:
Line 347: #line default
Line 348: #line hidden
Line 349:
Line 350: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 351: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n\t"));
Line 352:
Line 353: #line default
Line 354: #line hidden
Line 355:
Line 356: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 357: this.__BuildControlspnAdmin();
Line 358:
Line 359: #line default
Line 360: #line hidden
Line 361:
Line 362: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 363: __parser.AddParsedSubObject(this.spnAdmin);
Line 364:
Line 365: #line default
Line 366: #line hidden
Line 367:
Line 368: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 369: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n\t"));
Line 370:
Line 371: #line default
Line 372: #line hidden
Line 373:
Line 374: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 375: this.__BuildControllbLogOut();
Line 376:
Line 377: #line default
Line 378: #line hidden
Line 379:
Line 380: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 381: __parser.AddParsedSubObject(this.lbLogOut);
Line 382:
Line 383: #line default
Line 384: #line hidden
Line 385:
Line 386: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 387: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" \r\n\t"));
Line 388:
Line 389: #line default
Line 390: #line hidden
Line 391:
Line 392: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 393: this.__BuildControllblURL();
Line 394:
Line 395: #line default
Line 396: #line hidden
Line 397:
Line 398: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 399: __parser.AddParsedSubObject(this.lblURL);
Line 400:
Line 401: #line default
Line 402: #line hidden
Line 403:
Line 404: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 405: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("</P>\r\n<H2>\r\n\t<HR width=\"100%\"
SIZE=\"1\">\r\n</H2>\r\n"));
Line 406:
Line 407: #line default
Line 408: #line hidden
Line 409: }
Line 410:
Line 411: protected override void FrameworkInitialize() {
Line 412: this.__BuildControlTree(this);
Line 413: }
Line 414: }
Line 415: }
Line 416:
Any suggestions on what is going wrong here? It works in the original, but
not in the copy.
Thanks!
Lauchlan M
I have an ASP.net project that works fine.
I copied it to another project using the following steps:
<<
(i) create a new VS.NET ASP.NET project.
(ii) copy all the files from the old wwwroot subfolder to the new one
(iii) include all those files into the project
(iv) add a reference or two that didn't get copied over in (iii)
(v) build it - it builds ok
What happens when I take some page of the new project and try to 'view in
browser' I get:
<<
Server Error in '/MyWebInterface_NexusDB' Application.
----------------------------------------------------------------------------
----
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS1595: 'MyWebInterface.Secure.MyHeader' is defined
in multiple places; using definition from
'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\24513897\d2fa734
0_58f7c301\MyWebInterface_NexusDB.DLL'
Source Error:
Line 27:
Line 28:
[System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 29: public class MyHeader_ascx : MyWebInterface.Secure.MyHeader {
Line 30:
Line 31: private static bool __initialized = false;
Source File: e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\ucrrz4fp.0.cs Line: 29
As far as I can work out (the source file info at the end tells me nothing!)
it is complaining about a header user control I made, which of course is
referred to in multiple places (pretty much every page), but I've got no
idea
why it's complaining about it or even in which file the complaint is being
generated (on line 29 of that file).
The detailed compiler output is
<<
E:\WINNT\system32> "e:\winnt\microsoft.net\framework\v1.1.4322\csc.exe"
/t:library /utf8output
/R:"e:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
files\Mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\464084f2\32fdf8b
5_8293c301\Mywebinterface.dll"
/R:"e:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web
..dll"
/R:"e:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll"
/R:"e:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\s
ystem.web.services.dll"
/R:"e:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml
..dll"
/R:"e:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system
..drawing.dll"
/R:"e:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\sys
tem.web.mobile.dll" /R:"e:\winnt\microsoft.net\framework\v1.1.4322\temporary
asp.net
files\Mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\24513897\9efd1a9
9_42f8c301\Mywebinterface_nexusdb.dll"
/R:"e:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.da
ta.dll"
/R:"e:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d5
0a3a\system.enterpriseservices.dll"
/R:"e:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll"
/R:"e:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
files\Mywebinterface_nexusdb\fe7356c1\5423ab61\9xqkxlsx.dll"
/out:"E:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\9cswzlnb.dll" /DEBUG
/debug+ /optimize- /warnaserror /w:1
"E:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\9cswzlnb.0.cs"
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\9cswzlnb.0.cs(29,39): error
CS1595: 'MyWebInterface.Secure.MyHeader' is defined in multiple places;
using definition from 'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET
Files\Mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\464084f2\32fdf8b
5_8293c301\MyWebInterface.DLL'
The complete compilation source is
<<
Line 1:
//--------------------------------------------------------------------------
----
Line 2: // <autogenerated>
Line 3: // This code was generated by a tool.
Line 4: // Runtime Version: 1.1.4322.573
Line 5: //
Line 6: // Changes to this file may cause incorrect behavior and will
be lost if
Line 7: // the code is regenerated.
Line 8: // </autogenerated>
Line 9:
//--------------------------------------------------------------------------
----
Line 10:
Line 11: namespace ASP {
Line 12: using System;
Line 13: using System.Collections;
Line 14: using System.Collections.Specialized;
Line 15: using System.Configuration;
Line 16: using System.Text;
Line 17: using System.Text.RegularExpressions;
Line 18: using System.Web;
Line 19: using System.Web.Caching;
Line 20: using System.Web.SessionState;
Line 21: using System.Web.Security;
Line 22: using System.Web.UI;
Line 23: using System.Web.UI.WebControls;
Line 24: using System.Web.UI.HtmlControls;
Line 25: using ASP;
Line 26:
Line 27:
Line 28:
[System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 29: public class MyHeader_ascx : MyWebInterface.Secure.MyHeader {
Line 30:
Line 31: private static bool __initialized = false;
Line 32:
Line 33: public MyHeader_ascx() {
Line 34: if ((ASP.MyHeader_ascx.__initialized == false)) {
Line 35: ASP.MyHeader_ascx.__initialized = true;
Line 36: }
Line 37: }
Line 38:
Line 39: protected override bool SupportAutoEvents {
Line 40: get {
Line 41: return false;
Line 42: }
Line 43: }
Line 44:
Line 45: protected ASP.Global_asax ApplicationInstance {
Line 46: get {
Line 47: return
((ASP.Global_asax)(this.Context.ApplicationInstance));
Line 48: }
Line 49: }
Line 50:
Line 51: public override string TemplateSourceDirectory {
Line 52: get {
Line 53: return "/MyWebInterface_NexusDB";
Line 54: }
Line 55: }
Line 56:
Line 57: private System.Web.UI.Control __BuildControllbHome() {
Line 58: System.Web.UI.WebControls.LinkButton __ctrl;
Line 59:
Line 60: #line 4
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 61: __ctrl = new System.Web.UI.WebControls.LinkButton();
Line 62:
Line 63: #line default
Line 64: #line hidden
Line 65: this.lbHome = __ctrl;
Line 66:
Line 67: #line 4
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 68: __ctrl.ID = "lbHome";
Line 69:
Line 70: #line default
Line 71: #line hidden
Line 72: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 73:
Line 74: #line 4
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 75: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("Home"));
Line 76:
Line 77: #line default
Line 78: #line hidden
Line 79: return __ctrl;
Line 80: }
Line 81:
Line 82: private System.Web.UI.Control __BuildControlhlinkPublic()
{
Line 83: System.Web.UI.WebControls.HyperLink __ctrl;
Line 84:
Line 85: #line 5
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 86: __ctrl = new System.Web.UI.WebControls.HyperLink();
Line 87:
Line 88: #line default
Line 89: #line hidden
Line 90: this.hlinkPublic = __ctrl;
Line 91:
Line 92: #line 5
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 93: __ctrl.ID = "hlinkPublic";
Line 94:
Line 95: #line default
Line 96: #line hidden
Line 97:
Line 98: #line 5
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 99: __ctrl.NavigateUrl = "~/public/PublicMain.aspx";
Line 100:
Line 101: #line default
Line 102: #line hidden
Line 103: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 104:
Line 105: #line 5
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 106: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("Public"));
Line 107:
Line 108: #line default
Line 109: #line hidden
Line 110: return __ctrl;
Line 111: }
Line 112:
Line 113: private System.Web.UI.Control __BuildControlhrefSecure()
{
Line 114: System.Web.UI.HtmlControls.HtmlAnchor __ctrl;
Line 115:
Line 116: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 117: __ctrl = new System.Web.UI.HtmlControls.HtmlAnchor();
Line 118:
Line 119: #line default
Line 120: #line hidden
Line 121: this.hrefSecure = __ctrl;
Line 122:
Line 123: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 124: __ctrl.ID = "hrefSecure";
Line 125:
Line 126: #line default
Line 127: #line hidden
Line 128:
Line 129: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 130: __ctrl.HRef = "~/Secure/Main.aspx";
Line 131:
Line 132: #line default
Line 133: #line hidden
Line 134: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 135:
Line 136: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 137: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n\t\t\tSecure"));
Line 138:
Line 139: #line default
Line 140: #line hidden
Line 141: return __ctrl;
Line 142: }
Line 143:
Line 144: private System.Web.UI.Control __BuildControlspnSecure() {
Line 145: System.Web.UI.HtmlControls.HtmlGenericControl __ctrl;
Line 146:
Line 147: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 148: __ctrl = new
System.Web.UI.HtmlControls.HtmlGenericControl("span");
Line 149:
Line 150: #line default
Line 151: #line hidden
Line 152: this.spnSecure = __ctrl;
Line 153:
Line 154: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 155: __ctrl.ID = "spnSecure";
Line 156:
Line 157: #line default
Line 158: #line hidden
Line 159:
Line 160: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 161: this.__BuildControlhrefSecure();
Line 162:
Line 163: #line default
Line 164: #line hidden
Line 165: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 166:
Line 167: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 168: __parser.AddParsedSubObject(this.hrefSecure);
Line 169:
Line 170: #line default
Line 171: #line hidden
Line 172:
Line 173: #line 6
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 174: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" | "));
Line 175:
Line 176: #line default
Line 177: #line hidden
Line 178: return __ctrl;
Line 179: }
Line 180:
Line 181: private System.Web.UI.Control __BuildControlhrefAdmin() {
Line 182: System.Web.UI.HtmlControls.HtmlAnchor __ctrl;
Line 183:
Line 184: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 185: __ctrl = new System.Web.UI.HtmlControls.HtmlAnchor();
Line 186:
Line 187: #line default
Line 188: #line hidden
Line 189: this.hrefAdmin = __ctrl;
Line 190:
Line 191: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 192: __ctrl.ID = "hrefAdmin";
Line 193:
Line 194: #line default
Line 195: #line hidden
Line 196:
Line 197: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 198: __ctrl.HRef = "~/Secure/Admin/AdminMain.aspx";
Line 199:
Line 200: #line default
Line 201: #line hidden
Line 202: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 203:
Line 204: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 205: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n\t\t\tAdmin"));
Line 206:
Line 207: #line default
Line 208: #line hidden
Line 209: return __ctrl;
Line 210: }
Line 211:
Line 212: private System.Web.UI.Control __BuildControlspnAdmin() {
Line 213: System.Web.UI.HtmlControls.HtmlGenericControl __ctrl;
Line 214:
Line 215: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 216: __ctrl = new
System.Web.UI.HtmlControls.HtmlGenericControl("span");
Line 217:
Line 218: #line default
Line 219: #line hidden
Line 220: this.spnAdmin = __ctrl;
Line 221:
Line 222: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 223: __ctrl.ID = "spnAdmin";
Line 224:
Line 225: #line default
Line 226: #line hidden
Line 227:
Line 228: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 229: this.__BuildControlhrefAdmin();
Line 230:
Line 231: #line default
Line 232: #line hidden
Line 233: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 234:
Line 235: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 236: __parser.AddParsedSubObject(this.hrefAdmin);
Line 237:
Line 238: #line default
Line 239: #line hidden
Line 240:
Line 241: #line 8
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 242: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" | "));
Line 243:
Line 244: #line default
Line 245: #line hidden
Line 246: return __ctrl;
Line 247: }
Line 248:
Line 249: private System.Web.UI.Control __BuildControllbLogOut() {
Line 250: System.Web.UI.WebControls.LinkButton __ctrl;
Line 251:
Line 252: #line 10
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 253: __ctrl = new System.Web.UI.WebControls.LinkButton();
Line 254:
Line 255: #line default
Line 256: #line hidden
Line 257: this.lbLogOut = __ctrl;
Line 258:
Line 259: #line 10
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 260: __ctrl.ID = "lbLogOut";
Line 261:
Line 262: #line default
Line 263: #line hidden
Line 264: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 265:
Line 266: #line 10
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 267: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("Log Out"));
Line 268:
Line 269: #line default
Line 270: #line hidden
Line 271: return __ctrl;
Line 272: }
Line 273:
Line 274: private System.Web.UI.Control __BuildControllblURL() {
Line 275: System.Web.UI.WebControls.Label __ctrl;
Line 276:
Line 277: #line 11
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 278: __ctrl = new System.Web.UI.WebControls.Label();
Line 279:
Line 280: #line default
Line 281: #line hidden
Line 282: this.lblURL = __ctrl;
Line 283:
Line 284: #line 11
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 285: __ctrl.ID = "lblURL";
Line 286:
Line 287: #line default
Line 288: #line hidden
Line 289: return __ctrl;
Line 290: }
Line 291:
Line 292: private void __BuildControlTree(System.Web.UI.Control
__ctrl) {
Line 293: System.Web.UI.IParserAccessor __parser =
((System.Web.UI.IParserAccessor)(__ctrl));
Line 294:
Line 295: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 296: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n<H2 align=\"center\"><font
color=\"darkred\">My Regional Data Integration Onli" +
Line 297: "ne</font>\r\n</H2>\r\n<P align=\"center\">"));
Line 298:
Line 299: #line default
Line 300: #line hidden
Line 301:
Line 302: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 303: this.__BuildControllbHome();
Line 304:
Line 305: #line default
Line 306: #line hidden
Line 307:
Line 308: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 309: __parser.AddParsedSubObject(this.lbHome);
Line 310:
Line 311: #line default
Line 312: #line hidden
Line 313:
Line 314: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 315: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" | \r\n\t"));
Line 316:
Line 317: #line default
Line 318: #line hidden
Line 319:
Line 320: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 321: this.__BuildControlhlinkPublic();
Line 322:
Line 323: #line default
Line 324: #line hidden
Line 325:
Line 326: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 327: __parser.AddParsedSubObject(this.hlinkPublic);
Line 328:
Line 329: #line default
Line 330: #line hidden
Line 331:
Line 332: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 333: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" | \r\n\t"));
Line 334:
Line 335: #line default
Line 336: #line hidden
Line 337:
Line 338: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 339: this.__BuildControlspnSecure();
Line 340:
Line 341: #line default
Line 342: #line hidden
Line 343:
Line 344: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 345: __parser.AddParsedSubObject(this.spnSecure);
Line 346:
Line 347: #line default
Line 348: #line hidden
Line 349:
Line 350: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 351: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n\t"));
Line 352:
Line 353: #line default
Line 354: #line hidden
Line 355:
Line 356: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 357: this.__BuildControlspnAdmin();
Line 358:
Line 359: #line default
Line 360: #line hidden
Line 361:
Line 362: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 363: __parser.AddParsedSubObject(this.spnAdmin);
Line 364:
Line 365: #line default
Line 366: #line hidden
Line 367:
Line 368: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 369: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("\r\n\t"));
Line 370:
Line 371: #line default
Line 372: #line hidden
Line 373:
Line 374: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 375: this.__BuildControllbLogOut();
Line 376:
Line 377: #line default
Line 378: #line hidden
Line 379:
Line 380: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 381: __parser.AddParsedSubObject(this.lbLogOut);
Line 382:
Line 383: #line default
Line 384: #line hidden
Line 385:
Line 386: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 387: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl(" \r\n\t"));
Line 388:
Line 389: #line default
Line 390: #line hidden
Line 391:
Line 392: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 393: this.__BuildControllblURL();
Line 394:
Line 395: #line default
Line 396: #line hidden
Line 397:
Line 398: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 399: __parser.AddParsedSubObject(this.lblURL);
Line 400:
Line 401: #line default
Line 402: #line hidden
Line 403:
Line 404: #line 1
"e:\inetpub\wwwroot\MyWebInterface_NexusDB\MyHeader.ascx"
Line 405: __parser.AddParsedSubObject(new
System.Web.UI.LiteralControl("</P>\r\n<H2>\r\n\t<HR width=\"100%\"
SIZE=\"1\">\r\n</H2>\r\n"));
Line 406:
Line 407: #line default
Line 408: #line hidden
Line 409: }
Line 410:
Line 411: protected override void FrameworkInitialize() {
Line 412: this.__BuildControlTree(this);
Line 413: }
Line 414: }
Line 415: }
Line 416:
Any suggestions on what is going wrong here? It works in the original, but
not in the copy.
Thanks!
Lauchlan M