473,840 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP .NET 2.0 Unanswered questions...

I've asked this before, but not gotten any clear answers, so I'd figure I'd
try again.

I am an experienced ASP .NET 1.1 developer and I understand the differences
between an ASP .NET 2.0 "Web Site" vs an ASP .NET 2.0 "Web Application"
(among other things, all compiled code placed in several assembly files vs.
one assembly file).

Here are my 2 questions:

ASP .NET 2.0 "Web Application Project"
=============== ==============
In ASP .NET 1.1, when you use a DataAdapter (say with the DataAdapter
Configuration Wizard), you'd be able to see all the wizard's generated code
in the code-behind and perhaps tweak it. In ASP .NET 2.0 Web Application
Project, if I use a TableAdapter and configure it using the designer, I
can't find any code (yes, I know to look in the designer.vb file, rather
than the code-behind) for it.

Where is the code that makes all this new cool ASP .NET stuff work with some
configuration? I know I can't just see the underlying code for the class,
but I want to see the code for the instance. Where is it?!

ASP .NET 2.0 "Web Site"
=============== ===
Where are the compiled assembly files placed? I don't see them anywhere in
my site's directory structure.
No offense, but please only respond if you *know* the answers, not if you
just have suggestions on where I *could* look.

Thanks,

Scott
Oct 12 '07
22 1468
Thanks Phil.
"Phil H" <go****@philpha ll.me.ukwrote in message
news:11******** *************@v 23g2000prn.goog legroups.com...
One other point worth mentioning Scott. There are two different ways
of deploying an ASP.NET 2.0 web site - copying and "publish"

There is a tool for copying the web site in VS2005 which is a very
convenient way to deploy if you want to do incremental updates. It
does mean that no DLL assemblies are uploaded but caching on the web
server should compensate on a reasonably busy site where the traffic
is not spread among too many different pages.

The publish option does create a deployed site in a manner very
similar to the "release" version of ASP.NET 1.1 (i.e. a bin directory)
but according to Microsoft this method is not necessary unless it is a
very large site where traffic is spread over a lot if different pages.

HTH
On 12 Oct, 21:25, "Chad Scharf" <chadsch...@com munity.nospamwr ote:
>Yes, that's what I meant. Sorry.

"Scott M." <s-...@nospam.nosp amwrote in message

news:%2******* *********@TK2MS FTNGP05.phx.gbl ...
It seems to me that by having to generate the code for, say a
TableAdapter
at runtime, the application execution would be slowed. Do you mean
that
this code is generated at build time and then added to the assembly?
Thanks Chad!
"Chad Scharf" <chadsch...@com munity.nospamwr ote in message
news:ON******* *******@TK2MSFT NGP04.phx.gbl.. .
I will attempt to answer your questions here without upsetting you too
much as I'm pretty sure I "know" the answers to your questions:
>1, Where's the data adapter code?
>In 2.0, in the web application project, XSD designers including data
adapters are considered partial classes. They are also compiled and
the
code is generated for them at run-time. Therefore, there is no code to
view. If you want to override a method or property, add attributes,
directives or change the way those adapters work or map outside of the
designer, simply create a new code file in your App_Code directory and
define a class (in your dataset adapters namespace) called the exact
same
name as the data adapter and mark it as partial (e.g. public partial
class MyDataTableAdap ter), no need for inheritence, this will already
be
set up for you, you can however add interfaces if you wish. Then you
will
notice when typing "override", you are provided with the virtual
methods
and properties from your data adapter and can manipulate the class
without having to "inherit" from it.
>2, Where have all the assemblies gone?
>C:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\Temporary ASP.NET
Files\%app name%\
and then followed by intertwined assembly directories and cache
created
by the runtime, e.g. agentonline\88a b2d2c\588ae2f5\ and then you will
find your assemblies such as App_Browsers.dl l, App_Code.dll,
App_Web_wu_bfb z-.dll, etc.
>Hope this helps you out.
>Regards,
Chad
>"Scott M." <s-...@nospam.nosp amwrote in message
news:uT****** ********@TK2MSF TNGP04.phx.gbl. ..
I've asked this before, but not gotten any clear answers, so I'd
figure
I'd try again.
>>I am an experienced ASP .NET 1.1 developer and I understand the
differences between an ASP .NET 2.0 "Web Site" vs an ASP .NET 2.0
"Web
Application " (among other things, all compiled code placed in several
assembly files vs. one assembly file).
>>Here are my 2 questions:
>>ASP .NET 2.0 "Web Application Project"
============= =============== =
In ASP .NET 1.1, when you use a DataAdapter (say with the DataAdapter
Configurati on Wizard), you'd be able to see all the wizard's
generated
code in the code-behind and perhaps tweak it. In ASP .NET 2.0 Web
Application Project, if I use a TableAdapter and configure it using
the
designer, I can't find any code (yes, I know to look in the
designer.vb
file, rather than the code-behind) for it.
>>Where is the code that makes all this new cool ASP .NET stuff work
with
some configuration? I know I can't just see the underlying code for
the
class, but I want to see the code for the instance. Where is it?!
>>ASP .NET 2.0 "Web Site"
============= =====
Where are the compiled assembly files placed? I don't see them
anywhere
in my site's directory structure.
>>No offense, but please only respond if you *know* the answers, not if
you just have suggestions on where I *could* look.
>>Thanks,
>>Scott- Hide quoted text -

- Show quoted text -


Oct 12 '07 #11
I hope all of you got this right by now before sa**********@gm ail.com comes
back in.

keep on going if you have some more true facts to add and 100% sure of your
answers.

Thanks by the way.
"Scott M." <s-***@nospam.nosp amwrote in message
news:uT******** ******@TK2MSFTN GP04.phx.gbl...
I've asked this before, but not gotten any clear answers, so I'd figure
I'd try again.

I am an experienced ASP .NET 1.1 developer and I understand the
differences between an ASP .NET 2.0 "Web Site" vs an ASP .NET 2.0 "Web
Application" (among other things, all compiled code placed in several
assembly files vs. one assembly file).

Here are my 2 questions:

ASP .NET 2.0 "Web Application Project"
=============== ==============
In ASP .NET 1.1, when you use a DataAdapter (say with the DataAdapter
Configuration Wizard), you'd be able to see all the wizard's generated
code in the code-behind and perhaps tweak it. In ASP .NET 2.0 Web
Application Project, if I use a TableAdapter and configure it using the
designer, I can't find any code (yes, I know to look in the designer.vb
file, rather than the code-behind) for it.

Where is the code that makes all this new cool ASP .NET stuff work with
some configuration? I know I can't just see the underlying code for the
class, but I want to see the code for the instance. Where is it?!

ASP .NET 2.0 "Web Site"
=============== ===
Where are the compiled assembly files placed? I don't see them anywhere
in my site's directory structure.
No offense, but please only respond if you *know* the answers, not if you
just have suggestions on where I *could* look.

Thanks,

Scott

Oct 12 '07 #12

"IfThenElse " <sq**********@h otmail.comwrote in message
news:ex******** ******@TK2MSFTN GP05.phx.gbl...
>I hope all of you got this right by now before sa**********@gm ail.com comes
back in.

keep on going if you have some more true facts to add and 100% sure of
your answers.
?????
Oct 13 '07 #13
Smile; Just kidding....

Thanks for all the good info


"Scott M." <s-***@nospam.nosp amwrote in message
news:eK******** *****@TK2MSFTNG P06.phx.gbl...
>
"IfThenElse " <sq**********@h otmail.comwrote in message
news:ex******** ******@TK2MSFTN GP05.phx.gbl...
>>I hope all of you got this right by now before sa**********@gm ail.com
comes back in.

keep on going if you have some more true facts to add and 100% sure of
your answers.

?????

Oct 13 '07 #14
I would if I understood any of what you saying.
"IfThenElse " <sq**********@h otmail.comwrote in message
news:%2******** *********@TK2MS FTNGP06.phx.gbl ...
Smile; Just kidding....

Thanks for all the good info


"Scott M." <s-***@nospam.nosp amwrote in message
news:eK******** *****@TK2MSFTNG P06.phx.gbl...
>>
"IfThenElse " <sq**********@h otmail.comwrote in message
news:ex******* *******@TK2MSFT NGP05.phx.gbl.. .
>>>I hope all of you got this right by now before sa**********@gm ail.com
comes back in.

keep on going if you have some more true facts to add and 100% sure of
your answers.

?????


Oct 13 '07 #15
1 dll per page:
it is correct. the confusion most people have, is they look at the
source folders. a web site does not run from there. asp.net copies the
folder to tempormay folders, then compiles it. how much compiling is
required depends whether the site was precomplied. even a precomplied
site needs to be jit'd.

in a web application the code behind files are compiled into one
assembly placed in the bin folder by visual studio via the proper
language compiler. but the asp pages still need to be compiled into
partial classes. for this visual studio uses the aspnet_compiler for
final compilation.

this gives visual studio few options, as it has to follow the
apnet_compiler rules: where code is located, where dll are located, what
assemblies are produced.

the .aspx, .acx and .master files are compiled into assemblies with
hashed names. actually depending on compiler options some batching (just
like in 1.1) can occur where several aspx pages are compiled into one
assembly. a small site can have all pages compiled into one assembly and
user controls into another, but you can not count on this.

the batching behavior is what leads to reference bugs which are only
seen in production. if two pages reference each other and end up in the
same batch, the compiler is happy, but if they end up in different
batches then a compile error occurs.

currently web application are kind of hacky, because visual studio has
to hide the code behind files from the aspnet_compiler or they would be
included twice. it does this by creating yet another temporary folder
system to do compiles in. this is because unlike other compilers which
you can give a list of files to compile and their references, the
aspnet_complier compiles a folder.

so in general, a web application will produce more final assemblies then
a web site.

also a web application will take a little more disk space. this is
because at runtime, a folder is created for each page and all referenced
dll's are copied to the folder. the web application codebehind dll will
be duplicated in each assembly folder.
the asp.net compilation model is very complex due to its goals of
allowing page recompiles without recycling. it complicated due to the
fact that .net does not allow unloading of assemblies, except via domain
unload (recycle in asp.net). this means to recompiel a page, a new dll
must be created with a new name, then loaded into memory. you don;t want
these dll's to be too large, because the virtual memory is not given up
until the recycle.

for example, on a 32bit machine if the page assembly was over a gig,
then a recompile of the page would automatically cause a recycle,
because the load of the new page would cause an out of memory error
(only 2gb of memeory is avaiable in user space). this is extreme, but
assembly memory usage is competing with in-proc session memory.
-- bruce (sqlwork.com)

Mark Rae [MVP] wrote:
"Rory Becker" <Ro********@new sgroup.nospamwr ote in message
news:b0******** *************** ***@msnews.micr osoft.com...
>>also just like 1.1 a assembly is created per page
erm .. unless I'm missing something serious..... that's just wrong..

It is wrong.
>My understanding is that this is now true for a "web site" in ASP.Net
2.0 but was not true for ASP.Net 1.1 and is not true for ASP.Net "Web
Applications "

That is correct.
>"Web applications" and "Web Sites" are 2 different project types in VS
2005.

Correct.
>I thought that Web Applications followed the Old rules(1 Dll per
project) and that the Web Sites followed the alternative view of 1 dll
per page.
This was originally the only web project type in VS2005 and Web
Applications were then added back by popular demand via a ctp (or
something like that) and then later made more concrete via SP1.

Right again.
>Did I miss somthing?

Not really, though Web Deployment Projects add some extra options...

Oct 13 '07 #16
"bruce barker" <no****@nospam. comwrote in message
news:e7******** ******@TK2MSFTN GP02.phx.gbl...
>1 dll per page:
1 DLL per web application.
it is correct.
No it isn't.
in a web application the code behind files are compiled into one assembly
placed in the bin folder by visual studio via the proper language
compiler.
Indeed - one DLL.
but the asp pages still need to be compiled into partial classes.
That's correct, but irrelevant to the number of DLLs created.
for this visual studio uses the aspnet_compiler for final compilation.
Again correct, but again irrelevant - a web application will compile into
one assembly.
so in general, a web application will produce more final assemblies then a
web site.
Incorrect.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 13 '07 #17
Bruce....

....can you point to any references to back this up?

Whilst I am interested in all versions of ASP.Net, I would be very interested
for you to provide a reference which suggests that an ASP.Net 1.1 application
produces 1 assembly per page as I do not believe this is the case.

Likewise I have not seen this behaviour for ASP.Net 2.0 "Web Applications"

All shadow copied assemblies appear to be literally copies of those found
in a Bin directory of the Web Applications source.

Also I believe that with the exception of NGen (whose native images are ignored
by ASP.Net 1.1 anyway.) Jit compiling does not produce further assemblies
as it is an in-memory process only.

Thanks

--
Rory

Oct 13 '07 #18
"Rory Becker" <Ro********@new sgroup.nospamwr ote in message
news:b0******** *************** ***@msnews.micr osoft.com...
Whilst I am interested in all versions of ASP.Net, I would be very
interested for you to provide a reference which suggests that an ASP.Net
1.1 application produces 1 assembly per page as I do not believe this is
the case.
It isn't...
Likewise I have not seen this behaviour for ASP.Net 2.0 "Web Applications"
Of course you haven't...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 13 '07 #19
My previous reply to Bruce regarding his interesting claims was merely the
politest version of the original text i came up with.

I hasten to add that at no point did I think of writing anything which I
would have wanted to cause upset.
we're talking things like....

-----------------------------
Bruce man you're smoking some good shit.
-----------------------------
...Or..
-----------------------------
I call Bullshit
-----------------------------

The thing is they just seemed a bit antagonistic.

However I would like to thank Bruce and yourself because I had not discovered
any of the Web Deployment Project /ASPNet_Compiler references before they
were mentioned by yourselves.

So all in all it's been very interesting so far....

I am still interested to hear bruces take on things.....

It's amazing how language barriers etc can lead to misunderstandin gs of various
kinds.

Perhaps Bruce does not mean what he appears to be saying. :)
--
Rory

Oct 13 '07 #20

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

Similar topics

15
1514
by: S.Tobias | last post by:
In the past weeks I asked two questions concerning unions, and I got not a single reply to either. What should I do next? Re-post them? Ask them again in csc? -- Stan Tobias sed 's///g' to email
3
1091
by: CanoeGuy | last post by:
Why do some questions go unanswered? I'm trying to get some help with a problem that I'm having and am getting nowhere!!!! -- Joe Goeke
2
1311
by: =?Utf-8?B?Um9nZXI=?= | last post by:
Hello, I have a big bunch of unanswered questions, most of them really old. Should they have to be answered as they are from MANAGED newsgroups ? By the way, I hope that, at least, THIS question will be answered 8-D Thanks --
1
1061
by: Lysander | last post by:
Not sure if this is the right place for this. If I go into Control Panel I can see any responses to messages I have subscribed to. Is there a way to do the opposite. i.e. I want to go into the Access forums and see all messages that have had no replies. (I am looking for messages that I might be able to help with, so start with looking at ones no-one else has replied to) Linked to this, where on this site should questions/queries about...
0
9856
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10916
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10657
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10299
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9436
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7836
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3136
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.