Ask a Question related to ASP.NET General, Design and Development.
-
Thomas Connolly #1
Compile error when 2 pages use same codebehind file
I have 2 pages referencing the same codebehind file in my
project. Originally the pages referenced separate code
behind files. Once I changed the reference to the same
file, everything worked fine while the file was in the
project directory. When the obsolete file was removed
from the project directory, my application will no longer
compile. Can someone please help with this issue?
Thank in advance,
Tom
Thomas Connolly Guest
-
Custom Error Pages - 404 File not found & 301 redirect
Hello, We are preparing to launch a new site and would like to create a custom error page for 404 - File not found. I would also like to create... -
"File not found" Error Linux - cfm pages work in adminonly
Hello all. Just installed new 6.1 install w/ Apache 2.0.52 and New Version of Redhat. The admin loads just fine, but in any of the sites it throws... -
PHP 4.3.3 compile error w/GD
Anyone else have this problem compiling PHP 4.3.3 from source under Linux (I'm using Slackware 9.0)? Under PHP 4.3.2 I had no compilation... -
Need example: To create Initialize Code für a custom control in CodeBehind File.
Hallo, I create a Custom WebControl and need to create a initialize Code for that Control in the Codebehind file. my question: how can I crete... -
Error during compile of 5.8.1-RC2
I tried to send this as an email to perlbug@perl.org, but it kept bouncing. This is a compile-time error, so I can't use perlbug to report it. My... -
Thomas Connolly #2
RE: Compile Error
Yes I did get an error message saying that the source
files of the obsolete pages cannot be found.
confers no rights.>-----Original Message-----
>Hi Tom,
>
>Do you get an error when you compile? What's the error?
>
>Jim Cheshire
>Developer Support
>ASP.NET
>jamesche@online.microsoft.com
>
>This post is provided as-is with no warranties and<thomas.connolly@us.ssiworldwide.com>>
>-------------------->>Content-Class: urn:content-classes:message
>>From: "Thomas Connolly"<thomas.connolly@us.ssiworldwide.com>>>Sender: "Thomas Connolly"file>>Subject: Compile error when 2 pages use same codebehindmicrosoft.public.dotnet.framework.aspnet:162250>>Date: Fri, 25 Jul 2003 15:16:22 -0700
>>Lines: 10
>>Message-ID: <02ec01c352fa$61828070$a501280a@phx.gbl>
>>MIME-Version: 1.0
>>Content-Type: text/plain;
>> charset="iso-8859-1"
>>Content-Transfer-Encoding: 7bit
>>X-Newsreader: Microsoft CDO for Windows 2000
>>X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>>Thread-Index: AcNS+mGCgbv5w+SZStmdnoMjjLKCPA==
>>Newsgroups: microsoft.public.dotnet.framework.aspnet
>>Path: cpmsftngxa06.phx.gbl
>>Xref: cpmsftngxa06.phx.gblmy>>NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>>
>>I have 2 pages referencing the same codebehind file inlonger>>project. Originally the pages referenced separate code
>>behind files. Once I changed the reference to the same
>>file, everything worked fine while the file was in the
>>project directory. When the obsolete file was removed
>>from the project directory, my application will no>>>compile. Can someone please help with this issue?
>>
>>Thank in advance,
>>Tom
>>
>.
>Thomas Connolly Guest
-
Thomas Connolly #3
RE: Compile error when 2 pages use same codebehind file
To be more specific, here is the error:
Source file 'C:\Inetpub\wwwroot\WYIRIS\FAQ_Txt.aspx.cs'
could not be opened ('The system cannot find the file
specified. ')
confers no rights.>-----Original Message-----
>Hi Tom,
>
>Do you get an error when you compile? What's the error?
>
>Jim Cheshire
>Developer Support
>ASP.NET
>jamesche@online.microsoft.com
>
>This post is provided as-is with no warranties and<thomas.connolly@us.ssiworldwide.com>>
>-------------------->>Content-Class: urn:content-classes:message
>>From: "Thomas Connolly"<thomas.connolly@us.ssiworldwide.com>>>Sender: "Thomas Connolly"file>>Subject: Compile error when 2 pages use same codebehindmicrosoft.public.dotnet.framework.aspnet:162250>>Date: Fri, 25 Jul 2003 15:16:22 -0700
>>Lines: 10
>>Message-ID: <02ec01c352fa$61828070$a501280a@phx.gbl>
>>MIME-Version: 1.0
>>Content-Type: text/plain;
>> charset="iso-8859-1"
>>Content-Transfer-Encoding: 7bit
>>X-Newsreader: Microsoft CDO for Windows 2000
>>X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>>Thread-Index: AcNS+mGCgbv5w+SZStmdnoMjjLKCPA==
>>Newsgroups: microsoft.public.dotnet.framework.aspnet
>>Path: cpmsftngxa06.phx.gbl
>>Xref: cpmsftngxa06.phx.gblmy>>NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>>
>>I have 2 pages referencing the same codebehind file inlonger>>project. Originally the pages referenced separate code
>>behind files. Once I changed the reference to the same
>>file, everything worked fine while the file was in the
>>project directory. When the obsolete file was removed
>>from the project directory, my application will no>>>compile. Can someone please help with this issue?
>>
>>Thank in advance,
>>Tom
>>
>.
>Thomas Connolly Guest
-
Ron McNulty #4
Re: Compile error when 2 pages use same codebehind file
Open the .csproj and .sln files with a text editor, and search for
references to the obsolete file. I have had similar problems when deleting
unwanted code behind files.
Regards
Ron
"Thomas Connolly" <thomas.connolly@us.ssiworldwide.com> wrote in message
news:02ec01c352fa$61828070$a501280a@phx.gbl...> I have 2 pages referencing the same codebehind file in my
> project. Originally the pages referenced separate code
> behind files. Once I changed the reference to the same
> file, everything worked fine while the file was in the
> project directory. When the obsolete file was removed
> from the project directory, my application will no longer
> compile. Can someone please help with this issue?
>
> Thank in advance,
> Tom
Ron McNulty Guest
-
Jim Cheshire #5
RE: Compile error when 2 pages use same codebehind file
Tom,
Did you remove the reference from the Page directive? I'm asking because I
want to try and reproduce your problem and I haven't been able to do so. I
have two Webforms. I changed the second's Page directive to indicate that
the codebehind file is the first's codebehind file and I also changed the
class that it inherits. (Did you do that?) When I compile after deleting
the original codebehind, it works fine.
The only thing I can think of is that you did not change the class that
your Webform inherits from.
Jim Cheshire
Developer Support
ASP.NET
[email]jamesche@online.microsoft.com[/email]
This post is provided as-is with no warranties and confers no rights.
--------------------<x4CzZwvUDHA.2240@cpmsftngxa06.phx.gbl>>Content-Class: urn:content-classes:message
>From: "Thomas Connolly" <thomas.connolly@us.ssiworldwide.com>
>Sender: "Thomas Connolly" <thomas.connolly@us.ssiworldwide.com>
>References: <02ec01c352fa$61828070$a501280a@phx.gbl>>Subject: RE: Compile error when 2 pages use same codebehind file
>Date: Fri, 25 Jul 2003 15:53:48 -0700
>Lines: 59
>Message-ID: <1fe801c352ff$9bc4cd10$a001280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcNS/5vEu2SNKBrPRLWzprJFDjfryQ==
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:162261
>NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>To be more specific, here is the error:
>Source file 'C:\Inetpub\wwwroot\WYIRIS\FAQ_Txt.aspx.cs'
>could not be opened ('The system cannot find the file
>specified. ')
>>confers no rights.>>-----Original Message-----
>>Hi Tom,
>>
>>Do you get an error when you compile? What's the error?
>>
>>Jim Cheshire
>>Developer Support
>>ASP.NET
>>jamesche@online.microsoft.com
>>
>>This post is provided as-is with no warranties and><thomas.connolly@us.ssiworldwide.com>>>
>>-------------------->>>Content-Class: urn:content-classes:message
>>>From: "Thomas Connolly"><thomas.connolly@us.ssiworldwide.com>>>>Sender: "Thomas Connolly">file>>>Subject: Compile error when 2 pages use same codebehind>microsoft.public.dotnet.framework.aspnet:162250>>>Date: Fri, 25 Jul 2003 15:16:22 -0700
>>>Lines: 10
>>>Message-ID: <02ec01c352fa$61828070$a501280a@phx.gbl>
>>>MIME-Version: 1.0
>>>Content-Type: text/plain;
>>> charset="iso-8859-1"
>>>Content-Transfer-Encoding: 7bit
>>>X-Newsreader: Microsoft CDO for Windows 2000
>>>X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>>>Thread-Index: AcNS+mGCgbv5w+SZStmdnoMjjLKCPA==
>>>Newsgroups: microsoft.public.dotnet.framework.aspnet
>>>Path: cpmsftngxa06.phx.gbl
>>>Xref: cpmsftngxa06.phx.gbl>my>>>NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
>>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>>>
>>>I have 2 pages referencing the same codebehind file in>longer>>>project. Originally the pages referenced separate code
>>>behind files. Once I changed the reference to the same
>>>file, everything worked fine while the file was in the
>>>project directory. When the obsolete file was removed
>>>from the project directory, my application will no>>>>>>compile. Can someone please help with this issue?
>>>
>>>Thank in advance,
>>>Tom
>>>
>>.
>>Jim Cheshire Guest
-
Thomas Connolly #6
RE: Compile error when 2 pages use same codebehind file
Yes I did change both the class and the code behind file
in the page directive. Keep in mind that in the IDE,
everything runs fine. Try this, keep aspx page 2
referencing the code behind file in aspx page 1. Delete
the obsolete code behind file from the original aspx page
2. save everything. Compile. Close the IDE and manually
navigate to the page using your browser. Does it load.I'm asking because I>-----Original Message-----
>Tom,
>
>Did you remove the reference from the Page directive?able to do so. I>want to try and reproduce your problem and I haven't beento indicate that>have two Webforms. I changed the second's Page directivealso changed the>the codebehind file is the first's codebehind file and Icompile after deleting>class that it inherits. (Did you do that?) When Ithe class that>the original codebehind, it works fine.
>
>The only thing I can think of is that you did not changeconfers no rights.>your Webform inherits from.
>
>Jim Cheshire
>Developer Support
>ASP.NET
>jamesche@online.microsoft.com
>
>This post is provided as-is with no warranties and<thomas.connolly@us.ssiworldwide.com>>
>
>-------------------->>Content-Class: urn:content-classes:message
>>From: "Thomas Connolly"<thomas.connolly@us.ssiworldwide.com>>>Sender: "Thomas Connolly"codebehind file><x4CzZwvUDHA.2240@cpmsftngxa06.phx.gbl>>>References: <02ec01c352fa$61828070$a501280a@phx.gbl>>>Subject: RE: Compile error when 2 pages use samemicrosoft.public.dotnet.framework.aspnet:162261>>Date: Fri, 25 Jul 2003 15:53:48 -0700
>>Lines: 59
>>Message-ID: <1fe801c352ff$9bc4cd10$a001280a@phx.gbl>
>>MIME-Version: 1.0
>>Content-Type: text/plain;
>> charset="iso-8859-1"
>>Content-Transfer-Encoding: 7bit
>>X-Newsreader: Microsoft CDO for Windows 2000
>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>>Thread-Index: AcNS/5vEu2SNKBrPRLWzprJFDjfryQ==
>>Newsgroups: microsoft.public.dotnet.framework.aspnet
>>Path: cpmsftngxa06.phx.gbl
>>Xref: cpmsftngxa06.phx.gblcodebehind>>NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>>
>>To be more specific, here is the error:
>>Source file 'C:\Inetpub\wwwroot\WYIRIS\FAQ_Txt.aspx.cs'
>>could not be opened ('The system cannot find the file
>>specified. ')
>>>>confers no rights.>>>-----Original Message-----
>>>Hi Tom,
>>>
>>>Do you get an error when you compile? What's the error?
>>>
>>>Jim Cheshire
>>>Developer Support
>>>ASP.NET
>>>jamesche@online.microsoft.com
>>>
>>>This post is provided as-is with no warranties and>><thomas.connolly@us.ssiworldwide.com>>>>
>>>--------------------
>>>>Content-Class: urn:content-classes:message
>>>>From: "Thomas Connolly">><thomas.connolly@us.ssiworldwide.com>>>>>Sender: "Thomas Connolly">>>>Subject: Compile error when 2 pages use sameV5.50.4910.0300>>file>>>>Date: Fri, 25 Jul 2003 15:16:22 -0700
>>>>Lines: 10
>>>>Message-ID: <02ec01c352fa$61828070$a501280a@phx.gbl>
>>>>MIME-Version: 1.0
>>>>Content-Type: text/plain;
>>>> charset="iso-8859-1"
>>>>Content-Transfer-Encoding: 7bit
>>>>X-Newsreader: Microsoft CDO for Windows 2000
>>>>X-MIMEOLE: Produced By Microsoft MimeOLEcode>>microsoft.public.dotnet.framework.aspnet:16225 0>>>>Thread-Index: AcNS+mGCgbv5w+SZStmdnoMjjLKCPA==
>>>>Newsgroups: microsoft.public.dotnet.framework.aspnet
>>>>Path: cpmsftngxa06.phx.gbl
>>>>Xref: cpmsftngxa06.phx.gbl>>my>>>>NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
>>>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>>>>
>>>>I have 2 pages referencing the same codebehind file in>>>>project. Originally the pages referenced separatesame>>>>behind files. Once I changed the reference to the>>>longer>>>>file, everything worked fine while the file was in the
>>>>project directory. When the obsolete file was removed
>>>>from the project directory, my application will no>>>>>>compile. Can someone please help with this issue?
>>>>
>>>>Thank in advance,
>>>>Tom
>>>>
>>>
>>>.
>>>
>.
>Thomas Connolly Guest
-
Jim Cheshire #7
RE: Compile error when 2 pages use same codebehind file
Tom,
I am replying here so that others can see the response.
What you need to do is open each one of these pages in VS.NET after you
move the old code behind. When you do, VS.NET will update project view
with the new code behind and will put a warning icon over the old code
behind. Right-click the old code behind with the warning icon and choose
delete. After you do this for each of your files, it will work fine.
Hope that helps.
Jim Cheshire
Developer Support
ASP.NET
[email]jamesche@online.microsoft.com[/email]
This post is provided as-is with no warranties and confers no rights.
--------------------<x4CzZwvUDHA.2240@cpmsftngxa06.phx.gbl>>X-Tomcat-ID: 459707228
>References: <02ec01c352fa$61828070$a501280a@phx.gbl>
<1fe801c352ff$9bc4cd10$a001280a@phx.gbl>
<#THesiSVDHA.2112@cpmsftngxa06.phx.gbl>
<0a9a01c3552b$c5c7dbb0$a601280a@phx.gbl>>MIME-Version: 1.0
>Content-Type: text/plain
>Content-Transfer-Encoding: 7bit
>From: [email]jamesche@online.microsoft.com[/email] (Jim Cheshire (MS))
>Organization: Microsoft
>Date: Mon, 28 Jul 2003 17:55:06 GMT
>Subject: RE: Compile error when 2 pages use same codebehind file
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>Message-ID: <fSmEjFTVDHA.2112@cpmsftngxa06.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Lines: 144
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:162716
>NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
>
>Tom,
>
>Yes, both do load fine. If you have a project that you can zip up and
>e-mail to me that exhibits this problem, I'll be glad to look into it for
>you. You can e-mail me by leaving off the "online" in my e-mail address.
>
>Jim Cheshire
>Developer Support
>ASP.NET
>jamesche@online.microsoft.com
>
>This post is provided as-is with no warranties and confers no rights.
>
>--------------------><x4CzZwvUDHA.2240@cpmsftngxa06.phx.gbl>>>Content-Class: urn:content-classes:message
>>From: "Thomas Connolly" <thomas.connolly@us.ssiworldwide.com>
>>Sender: "Thomas Connolly" <thomas.connolly@us.ssiworldwide.com>
>>References: <02ec01c352fa$61828070$a501280a@phx.gbl>
><1fe801c352ff$9bc4cd10$a001280a@phx.gbl>
><#THesiSVDHA.2112@cpmsftngxa06.phx.gbl>>>>Subject: RE: Compile error when 2 pages use same codebehind file
>>Date: Mon, 28 Jul 2003 10:14:58 -0700
>>Lines: 129
>>Message-ID: <0a9a01c3552b$c5c7dbb0$a601280a@phx.gbl>
>>MIME-Version: 1.0
>>Content-Type: text/plain;
>> charset="iso-8859-1"
>>Content-Transfer-Encoding: 7bit
>>X-Newsreader: Microsoft CDO for Windows 2000
>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>>Thread-Index: AcNVK8XFx7uTIkNmSl2Zm7EXh6SFiQ==
>>Newsgroups: microsoft.public.dotnet.framework.aspnet
>>Path: cpmsftngxa06.phx.gbl
>>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:162694
>>NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>>
>>Yes I did change both the class and the code behind file
>>in the page directive. Keep in mind that in the IDE,
>>everything runs fine. Try this, keep aspx page 2
>>referencing the code behind file in aspx page 1. Delete
>>the obsolete code behind file from the original aspx page
>>2. save everything. Compile. Close the IDE and manually
>>navigate to the page using your browser. Does it load.>>I'm asking because I>>>-----Original Message-----
>>>Tom,
>>>
>>>Did you remove the reference from the Page directive?>>able to do so. I>>>want to try and reproduce your problem and I haven't been>>to indicate that>>>have two Webforms. I changed the second's Page directive>>also changed the>>>the codebehind file is the first's codebehind file and I>>compile after deleting>>>class that it inherits. (Did you do that?) When I>>the class that>>>the original codebehind, it works fine.
>>>
>>>The only thing I can think of is that you did not change>>confers no rights.>>>your Webform inherits from.
>>>
>>>Jim Cheshire
>>>Developer Support
>>>ASP.NET
>>>jamesche@online.microsoft.com
>>>
>>>This post is provided as-is with no warranties and>><thomas.connolly@us.ssiworldwide.com>>>>
>>>
>>>--------------------
>>>>Content-Class: urn:content-classes:message
>>>>From: "Thomas Connolly">><thomas.connolly@us.ssiworldwide.com>>>>>Sender: "Thomas Connolly">>codebehind file>>>>References: <02ec01c352fa$61828070$a501280a@phx.gbl>
>>><x4CzZwvUDHA.2240@cpmsftngxa06.phx.gbl>
>>>>Subject: RE: Compile error when 2 pages use same>>microsoft.public.dotnet.framework.aspnet:16226 1>>>>Date: Fri, 25 Jul 2003 15:53:48 -0700
>>>>Lines: 59
>>>>Message-ID: <1fe801c352ff$9bc4cd10$a001280a@phx.gbl>
>>>>MIME-Version: 1.0
>>>>Content-Type: text/plain;
>>>> charset="iso-8859-1"
>>>>Content-Transfer-Encoding: 7bit
>>>>X-Newsreader: Microsoft CDO for Windows 2000
>>>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>>>>Thread-Index: AcNS/5vEu2SNKBrPRLWzprJFDjfryQ==
>>>>Newsgroups: microsoft.public.dotnet.framework.aspnet
>>>>Path: cpmsftngxa06.phx.gbl
>>>>Xref: cpmsftngxa06.phx.gbl>>codebehind>>>>NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
>>>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>>>>
>>>>To be more specific, here is the error:
>>>>Source file 'C:\Inetpub\wwwroot\WYIRIS\FAQ_Txt.aspx.cs'
>>>>could not be opened ('The system cannot find the file
>>>>specified. ')
>>>>
>>>>>-----Original Message-----
>>>>>Hi Tom,
>>>>>
>>>>>Do you get an error when you compile? What's the error?
>>>>>
>>>>>Jim Cheshire
>>>>>Developer Support
>>>>>ASP.NET
>>>>>jamesche@online.microsoft.com
>>>>>
>>>>>This post is provided as-is with no warranties and
>>>>confers no rights.
>>>>>
>>>>>--------------------
>>>>>>Content-Class: urn:content-classes:message
>>>>>>From: "Thomas Connolly"
>>>><thomas.connolly@us.ssiworldwide.com>
>>>>>>Sender: "Thomas Connolly"
>>>><thomas.connolly@us.ssiworldwide.com>
>>>>>>Subject: Compile error when 2 pages use same>>V5.50.4910.0300>>>>file
>>>>>>Date: Fri, 25 Jul 2003 15:16:22 -0700
>>>>>>Lines: 10
>>>>>>Message-ID: <02ec01c352fa$61828070$a501280a@phx.gbl>
>>>>>>MIME-Version: 1.0
>>>>>>Content-Type: text/plain;
>>>>>> charset="iso-8859-1"
>>>>>>Content-Transfer-Encoding: 7bit
>>>>>>X-Newsreader: Microsoft CDO for Windows 2000
>>>>>>X-MIMEOLE: Produced By Microsoft MimeOLE>>code>>>>>>Thread-Index: AcNS+mGCgbv5w+SZStmdnoMjjLKCPA==
>>>>>>Newsgroups: microsoft.public.dotnet.framework.aspnet
>>>>>>Path: cpmsftngxa06.phx.gbl
>>>>>>Xref: cpmsftngxa06.phx.gbl
>>>>microsoft.public.dotnet.framework.aspnet:16225 0
>>>>>>NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
>>>>>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>>>>>>
>>>>>>I have 2 pages referencing the same codebehind file in
>>>>my
>>>>>>project. Originally the pages referenced separate>>same>>>>>>behind files. Once I changed the reference to the>>>>>>>>file, everything worked fine while the file was in the
>>>>>>project directory. When the obsolete file was removed
>>>>>>from the project directory, my application will no
>>>>longer
>>>>>>compile. Can someone please help with this issue?
>>>>>>
>>>>>>Thank in advance,
>>>>>>Tom
>>>>>>
>>>>>
>>>>>.
>>>>>
>>>>
>>>
>>>.
>>>
>Jim Cheshire Guest



Reply With Quote

