473,396 Members | 1,784 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,396 software developers and data experts.

What is Needed to Get an ASP.NET Page to Work?

SOME BACKGROUND:

I am new to ASP.NET, but somehow managed to install a perfectly working
..aspx page on our production server that I compiled in Visual Studio.
However, I recently needed to update it, so I first added a ".old"
suffix to the MyPage.aspx, MyProject.dll, and global.asax files on the
production server so I had a backup copy of the original files in case
something went wrong. Indeed, something did go wrong when I installed
the files on the production server, so I deleted the ".old" suffixes to
return the application to its original state ... AND NOW IT DOESN"T
WORK?!!?!?!

I get Parser Error messages like "Could not load type
'MyProject.MyPage' " and "Could not load type 'MyProject.Global' " I
do not have this problem on my localhost, EXCEPT when I try to copy the
application into a different test directory on my localhost. Which
leads me to ...

MY QUESTION:

What exactly is needed on a host to make an .aspx page work? I was
under the impression that all you need are fully compiled (built)
..aspx, .dll, and .asax files. I thought you could just copy these
anywhere and they would work together (provided that they're in the
right folders).

What am I misunderstanding?

Oct 11 '06 #1
7 1729
There is other dll's that need to be included in addition to
MyProject.dll, basically everything in the bin folder after compiling,
minus the .pdb files, these are for debugging purposes.

Besides the entire bin folder, and any aspx pages, it should work fine.
The key is the entire bin folder though. Or at least this is what I
have found.

Also, everytime you compile an asp.net 2.0 website, a number of dll
files are generated that are pre-compiled aspx pages, EVERYTIME you
compile, these change. This is why you have to replace the entire bin
folder.

If you don't want it to pre-compile each aspx, you can get the "Web
Deployment Projects" from msdn that gives you additional deployment
options such as compiling all pages into a single DLL, I use that now
as it is much easier than managing all the seperate dll files.

Altemir wrote:
SOME BACKGROUND:

I am new to ASP.NET, but somehow managed to install a perfectly working
.aspx page on our production server that I compiled in Visual Studio.
However, I recently needed to update it, so I first added a ".old"
suffix to the MyPage.aspx, MyProject.dll, and global.asax files on the
production server so I had a backup copy of the original files in case
something went wrong. Indeed, something did go wrong when I installed
the files on the production server, so I deleted the ".old" suffixes to
return the application to its original state ... AND NOW IT DOESN"T
WORK?!!?!?!

I get Parser Error messages like "Could not load type
'MyProject.MyPage' " and "Could not load type 'MyProject.Global' " I
do not have this problem on my localhost, EXCEPT when I try to copy the
application into a different test directory on my localhost. Which
leads me to ...

MY QUESTION:

What exactly is needed on a host to make an .aspx page work? I was
under the impression that all you need are fully compiled (built)
.aspx, .dll, and .asax files. I thought you could just copy these
anywhere and they would work together (provided that they're in the
right folders).

What am I misunderstanding?
Oct 11 '06 #2
ASP.Net 1.1?

Check... Global.asax.cs exists and is referred to in the project.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
"Altemir" <da***********@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
SOME BACKGROUND:

I am new to ASP.NET, but somehow managed to install a perfectly working
.aspx page on our production server that I compiled in Visual Studio.
However, I recently needed to update it, so I first added a ".old"
suffix to the MyPage.aspx, MyProject.dll, and global.asax files on the
production server so I had a backup copy of the original files in case
something went wrong. Indeed, something did go wrong when I installed
the files on the production server, so I deleted the ".old" suffixes to
return the application to its original state ... AND NOW IT DOESN"T
WORK?!!?!?!

I get Parser Error messages like "Could not load type
'MyProject.MyPage' " and "Could not load type 'MyProject.Global' " I
do not have this problem on my localhost, EXCEPT when I try to copy the
application into a different test directory on my localhost. Which
leads me to ...

MY QUESTION:

What exactly is needed on a host to make an .aspx page work? I was
under the impression that all you need are fully compiled (built)
.aspx, .dll, and .asax files. I thought you could just copy these
anywhere and they would work together (provided that they're in the
right folders).

What am I misunderstanding?

Oct 11 '06 #3
Sorry, I forgot to ask if you were using asp.net 1.1 or asp.net 2.0

My response applies to asp.net 2.0

Gaurav Vaish (www.EdujiniOnline.com) wrote:
ASP.Net 1.1?

Check... Global.asax.cs exists and is referred to in the project.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
"Altemir" <da***********@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
SOME BACKGROUND:

I am new to ASP.NET, but somehow managed to install a perfectly working
.aspx page on our production server that I compiled in Visual Studio.
However, I recently needed to update it, so I first added a ".old"
suffix to the MyPage.aspx, MyProject.dll, and global.asax files on the
production server so I had a backup copy of the original files in case
something went wrong. Indeed, something did go wrong when I installed
the files on the production server, so I deleted the ".old" suffixes to
return the application to its original state ... AND NOW IT DOESN"T
WORK?!!?!?!

I get Parser Error messages like "Could not load type
'MyProject.MyPage' " and "Could not load type 'MyProject.Global' " I
do not have this problem on my localhost, EXCEPT when I try to copy the
application into a different test directory on my localhost. Which
leads me to ...

MY QUESTION:

What exactly is needed on a host to make an .aspx page work? I was
under the impression that all you need are fully compiled (built)
.aspx, .dll, and .asax files. I thought you could just copy these
anywhere and they would work together (provided that they're in the
right folders).

What am I misunderstanding?
Oct 11 '06 #4
your assumption is correct, you can move the files to a server and they should run.

".old" has special meaning in visual studio, check that the files were not altered by VS, which it sometimes will do...
"Altemir" <da***********@gmail.comwrote in message news:11**********************@m7g2000cwm.googlegro ups.com...
SOME BACKGROUND:

I am new to ASP.NET, but somehow managed to install a perfectly working
.aspx page on our production server that I compiled in Visual Studio.
However, I recently needed to update it, so I first added a ".old"
suffix to the MyPage.aspx, MyProject.dll, and global.asax files on the
production server so I had a backup copy of the original files in case
something went wrong. Indeed, something did go wrong when I installed
the files on the production server, so I deleted the ".old" suffixes to
return the application to its original state ... AND NOW IT DOESN"T
WORK?!!?!?!

I get Parser Error messages like "Could not load type
'MyProject.MyPage' " and "Could not load type 'MyProject.Global' " I
do not have this problem on my localhost, EXCEPT when I try to copy the
application into a different test directory on my localhost. Which
leads me to ...

MY QUESTION:

What exactly is needed on a host to make an .aspx page work? I was
under the impression that all you need are fully compiled (built)
.aspx, .dll, and .asax files. I thought you could just copy these
anywhere and they would work together (provided that they're in the
right folders).

What am I misunderstanding?

Oct 11 '06 #5
On 10/11/06 06:19, Sean Chambers wrote:
There is other dll's that need to be included in addition to
MyProject.dll, basically everything in the bin folder after compiling,
minus the .pdb files, these are for debugging purposes.

Besides the entire bin folder, and any aspx pages, it should work fine.
The key is the entire bin folder though. Or at least this is what I
have found.

Also, everytime you compile an asp.net 2.0 website, a number of dll
files are generated that are pre-compiled aspx pages, EVERYTIME you
compile, these change. This is why you have to replace the entire bin
folder.

If you don't want it to pre-compile each aspx, you can get the "Web
Deployment Projects" from msdn that gives you additional deployment
options such as compiling all pages into a single DLL, I use that now
as it is much easier than managing all the seperate dll files.
Sean,

I don't know if this will help your situation, but there is a setting
in the project properties that governs how the generated component DLL
files are named. I've selected "Use fixed naming and single page assemblies"
and no longer get the random DLL file names. They are named based on the
page name.

FYI.
>
Altemir wrote:
>SOME BACKGROUND:

I am new to ASP.NET, but somehow managed to install a perfectly working
.aspx page on our production server that I compiled in Visual Studio.
However, I recently needed to update it, so I first added a ".old"
suffix to the MyPage.aspx, MyProject.dll, and global.asax files on the
production server so I had a backup copy of the original files in case
something went wrong. Indeed, something did go wrong when I installed
the files on the production server, so I deleted the ".old" suffixes to
return the application to its original state ... AND NOW IT DOESN"T
WORK?!!?!?!

I get Parser Error messages like "Could not load type
'MyProject.MyPage' " and "Could not load type 'MyProject.Global' " I
do not have this problem on my localhost, EXCEPT when I try to copy the
application into a different test directory on my localhost. Which
leads me to ...

MY QUESTION:

What exactly is needed on a host to make an .aspx page work? I was
under the impression that all you need are fully compiled (built)
.aspx, .dll, and .asax files. I thought you could just copy these
anywhere and they would work together (provided that they're in the
right folders).

What am I misunderstanding?
Oct 11 '06 #6
Oh, I wasn't aware that there was an option in vs to do this.

Now I use web deployment projects which give me more control over
dev/production config section replacements, which was a large issues as
I developed one app on a pc,laptop and remote machine.

thanks!

Mark E. Hansen wrote:
On 10/11/06 06:19, Sean Chambers wrote:
There is other dll's that need to be included in addition to
MyProject.dll, basically everything in the bin folder after compiling,
minus the .pdb files, these are for debugging purposes.

Besides the entire bin folder, and any aspx pages, it should work fine.
The key is the entire bin folder though. Or at least this is what I
have found.

Also, everytime you compile an asp.net 2.0 website, a number of dll
files are generated that are pre-compiled aspx pages, EVERYTIME you
compile, these change. This is why you have to replace the entire bin
folder.

If you don't want it to pre-compile each aspx, you can get the "Web
Deployment Projects" from msdn that gives you additional deployment
options such as compiling all pages into a single DLL, I use that now
as it is much easier than managing all the seperate dll files.

Sean,

I don't know if this will help your situation, but there is a setting
in the project properties that governs how the generated component DLL
files are named. I've selected "Use fixed naming and single page assemblies"
and no longer get the random DLL file names. They are named based on the
page name.

FYI.

Altemir wrote:
SOME BACKGROUND:

I am new to ASP.NET, but somehow managed to install a perfectly working
.aspx page on our production server that I compiled in Visual Studio.
However, I recently needed to update it, so I first added a ".old"
suffix to the MyPage.aspx, MyProject.dll, and global.asax files on the
production server so I had a backup copy of the original files in case
something went wrong. Indeed, something did go wrong when I installed
the files on the production server, so I deleted the ".old" suffixes to
return the application to its original state ... AND NOW IT DOESN"T
WORK?!!?!?!

I get Parser Error messages like "Could not load type
'MyProject.MyPage' " and "Could not load type 'MyProject.Global' " I
do not have this problem on my localhost, EXCEPT when I try to copy the
application into a different test directory on my localhost. Which
leads me to ...

MY QUESTION:

What exactly is needed on a host to make an .aspx page work? I was
under the impression that all you need are fully compiled (built)
.aspx, .dll, and .asax files. I thought you could just copy these
anywhere and they would work together (provided that they're in the
right folders).

What am I misunderstanding?
Oct 11 '06 #7
I finally got it to work but I'm not sure exactly what fixed it! But
I'm pretty sure it had to do with the MyProject.dll not being in the
right place.

Previously (i.e., before the update), the .dll was in the wwwroot/bin
folder. There were no .dlls in the wwwroot/MyProject folder and there
was no wwwroot/MyProject/bin folder at all. Yet it worked!!

I went to update the .aspx and .dll files and it stopped working. I
was eventually able to fix it simply by copying the bin folder into
wwwroot/MyProject. But I also noticed that the bin folder contains, in
addition to MyProject.dll, a subfolder named "_vti_cnf", that itself
contains an ADDITIONAL copy of MyProject.dll.

So at this point, I'm not sure which actually fixed the problem:
wwwroot/MyProject/bin/MyProject.dll or
wwwroot/MyProject/bin/_vti_cnf/MyProject.dll. I also don't understand
why it worked before without any .dlls in the MyProject folder. Which
leads me to ask:

1) How does the .aspx file know where its .dll is located?

2) What is the role of the _vti_cnf folder and its contents?

Thank for all your help!

P.S. I am using ASP.NET 2.0

Oct 12 '06 #8

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

Similar topics

125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
17
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in...
10
by: eLisHa | last post by:
i have an arraylist that gets it's values dynamiclly from the database, after paging, searching & more in the ASP.net file. What im trying to do, is sort the results that are sorted in the...
28
by: Ian Davies | last post by:
Hello I would appreciate some help from someone who has knowledge of working with css, php javascript and how they interact. Ive been working on a task for the last few days and have started to...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
13
tpgames
by: tpgames | last post by:
What is the onload event handler needed to get # assigned to parent variable? What I tried didn't work! Code is from JS bible, page 127-8 with some minor alterations by me. Parent Page (in part)...
16
by: SirG | last post by:
I'm looking for an explanation of why one piece of code works and another does not. I have to warn you that this is the first piece of Javascript I've ever written, so if there is a better way or a...
16
by: raylopez99 | last post by:
I am running out of printing paper trying to debug this...it has to be trivial, but I cannot figure it out--can you? Why am I not printing text, but just the initial string "howdy"? On the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.