473,320 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VS 2005 Converted Header causing error when publishing

VS 2005 Converted Header causing error when publishing

After converting from Visual Studio 2003 to 2005, I have had several
issues with a header that is used throughout the project. The conversion
automatically created an abstract base class for the header in the
Migrated folder of the App_Code directory. One of the major problems
this caused was regarding the fact that I pass the header to a standard
error handling class to process the error and print an appropriate error
message in the header. This results in the following compilation error:

Error 107 Option Strict On disallows narrowing from type 'Header' to
type 'ASP.header_ascx' in copying the value of 'ByRef' parameter
'PageHeader' back to the matching argument.

So to get around this I cast the object to the ASP.header_ascx type it
is looking for and this allows it to build and run correctly. The
header_ascx refers to my header.ascx file, although I'm not sure how
this type ends up under the ASP namespace. Anyway, when I try to publish
the website, which I need to do to create the dll(s) necessary for
deploying I receive a build error for certain pages, ASP.header_ascx
type not found. It is odd that I receive this error when building to
publish but not when just building. If I take out the CType conversion
for certain pages the error seems to go away and builds fine, but if I
try taking it away for all pages then I receive the first error again.

Publishing error: Error 1 Type 'ASP.header_ascx' is not defined.

I have a smaller project that uses a similar header, where the
conversion created the stub the same way, but I have been able to get it
to build/publish correctly without casting the Header. (Although I did
run into the same problems originally)

I cannot find any differences between the way I have the pages
configured in the small project and in the larger one. And in the larger
project I cannot see any differences between the way the pages are
configured, where it can find ASP.header_ascx and those it cant

Has anyone run into similar problems/have any suggestions?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 5 '06 #1
2 1685

One other thing I did in the smaller project was change the name of
Header.ascx to PHeader.ascx with a class name of PHeader and the base
class name to Page_Header just in case the name Header was being
confused with Header in a different namespace.

I attempted the same thing on the bigger project, but am still having
the same problem.
- If I cast header references to ASP.pheader_ascx then it builds, but on
publish it gives a error: Type 'ASP.pheader_ascx' is not defined. for
certain pages.
- If I remove the cast for the pages that have this error I get the
error for other pages, and if I remove for these I get the error for
other pages stil and so on.
- If I remove the cast for all pages I get build errors for certain
pages like: Option Strict On disallows narrowing from type 'Page_Header'
to type 'ASP.pheader_ascx' in copying the value of 'ByRef' parameter
'PageHeader' back to the matching argument.
- If I place the cast back in for pages with these errors I get the
errors on other pages and so on.

Obviously I have a circular problem, but I am having a hard time
tracking down the root of it.

Any thoughts???
*** Sent via Developersdex http://www.developersdex.com ***
Jul 7 '06 #2


I turned Option Strict Off to see if I could get it to work this way,
which opened up a few more errors which weren't showing before. Once
these errors were resolved, I was able to both build and publish
successfully. Unfortunately when I turn Option Strict back on I receive
the type not found errors again. It is desired for this web project to
have Option Strict setting on. Any suggestions?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: sathyashrayan | last post by:
Following are the selected thread from the date:30-jan-2005 to 31-jan-2005. I did not use any name because of the subject is important. You can get the original thread by typing the subject...
1
by: Robert | last post by:
I have a large web site converted from 1.1 to 2.0 and in VS 2005, the IDE complains that in the ASPX file (html source): Error 1 Element 'stylesheet' is not a known element. This can...
12
by: Nathan Sokalski | last post by:
I recently upgraded to from Visual Studio .NET 2003 to Visual Studio .NET 2005. In Visual Studio .NET 2003 when I would select 'Build' it would add a *.dll with the name of the Project to a /bin/...
2
by: Geek | last post by:
Guys, I have a question regarding publishing web site using visual studio 2005. As usual I am running in to issues using visual studio 2005. I have build a web site and when I publish to the...
3
by: Learner | last post by:
Hello, I recently converted a VS 2003 application to VS 2005. When I compile it in VS 2005 every thing gets compiled with no errors. But when I try publishing the website I get all different...
5
by: rmgalante | last post by:
I've been using the VS2005 Publish utility on one of my projects for about six months. I have a large site with hundreds of files, thousands if you include the code behind files. So I thought...
0
by: rmgalante | last post by:
I was developing a large web site in VS 2005 as a web site project. I was having problems with the VS 2005 publish tool. It was slow, and provided no feedback. It has other issues as outlined...
6
by: Patient Guy | last post by:
I am a newcomer to using PHP but not to programming (C, C++, Javascript). I am playing around with classes and wanted to make a function that has a method simply for producing either plain text...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.