473,396 Members | 1,813 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's different between asp application and web site

Hi,

I posted this in wrong group, so just re-post here.
There are two ways to create web-based application or web service, from VS
start page, click on File and New, two options you can choose, one is
Projects which leads you to create ASP.NET Web Application or ASP.NET Web
Service Application. Another one is Web Site which leads you to create
ASP.NET Web Site or ASP.NET Web Service.
My question is what is the difference between these two ways. Especially in
terms of production performance, maintainance, resource consuming.
I got an answer saying compatibility is slightly different from VS2003.
Anyway what's the real difference except compatibility?
The reason I'm asking this question is that I am designing an upgrading
system from VB6 to .NET, it will be web-based SOA system. I used VS2003 for
developing web application and web service, when I deploy them, I deploy all
BLL assemblies at centrolized location on application server instead of
having a copy of them under web bin folder. But in VS2005, if I use creating
web site approach, all referenced dlls will be included under bin folder, and
any time if any dll has been changed, I need to deploy it both places.
Thanks.

William

Nov 7 '07 #1
6 2423
http://msdn2.microsoft.com/en-us/lib...80(VS.80).aspx


"william" <wi*****@discussions.microsoft.comwrote in message
news:DC**********************************@microsof t.com...
Hi,

I posted this in wrong group, so just re-post here.
There are two ways to create web-based application or web service, from VS
start page, click on File and New, two options you can choose, one is
Projects which leads you to create ASP.NET Web Application or ASP.NET Web
Service Application. Another one is Web Site which leads you to create
ASP.NET Web Site or ASP.NET Web Service.
My question is what is the difference between these two ways. Especially
in
terms of production performance, maintainance, resource consuming.
I got an answer saying compatibility is slightly different from VS2003.
Anyway what's the real difference except compatibility?
The reason I'm asking this question is that I am designing an upgrading
system from VB6 to .NET, it will be web-based SOA system. I used VS2003
for
developing web application and web service, when I deploy them, I deploy
all
BLL assemblies at centrolized location on application server instead of
having a copy of them under web bin folder. But in VS2005, if I use
creating
web site approach, all referenced dlls will be included under bin folder,
and
any time if any dll has been changed, I need to deploy it both places.
Thanks.

William

Nov 7 '07 #2
a web application has a project file, and visual studio compiles the
codebehinds into a dll, and the asp.net (or the aspnet_compiler in
precompiled sites) compiles the aspx pages into dll's. this is more
compatible with vs2003 projects as codebehind files can refer to publics
in each other.

a web site has no project file, and asp.net (or the aspnet_compiler if
precomplied) includes the codebehind with the page dlls. this means
pages can not refer to each other, interfaces should be used (the 2003
conversion wizard would do this).

in either case you should should use a deployment project which will
maintain the the pages and binaries needed to deploy in a separate
folder system (say your application server). deployment projects can
also edit the web.config settings.

-- bruce (sqlwork.com)

william wrote:
Hi,

I posted this in wrong group, so just re-post here.
There are two ways to create web-based application or web service, from VS
start page, click on File and New, two options you can choose, one is
Projects which leads you to create ASP.NET Web Application or ASP.NET Web
Service Application. Another one is Web Site which leads you to create
ASP.NET Web Site or ASP.NET Web Service.
My question is what is the difference between these two ways. Especially in
terms of production performance, maintainance, resource consuming.
I got an answer saying compatibility is slightly different from VS2003.
Anyway what's the real difference except compatibility?
The reason I'm asking this question is that I am designing an upgrading
system from VB6 to .NET, it will be web-based SOA system. I used VS2003 for
developing web application and web service, when I deploy them, I deploy all
BLL assemblies at centrolized location on application server instead of
having a copy of them under web bin folder. But in VS2005, if I use creating
web site approach, all referenced dlls will be included under bin folder, and
any time if any dll has been changed, I need to deploy it both places.
Thanks.

William
Nov 7 '07 #3
"william" <wi*****@discussions.microsoft.comwrote in message
news:DC**********************************@microsof t.com...

As Bruce has correctly said, using a Web Deployment Project will greatly
assist you in all your deployment tasks - WDP aren't perfect, but they're a
huge improvement on the built-in functionality.

I never use anything else...

http://www.google.co.uk/search?sourc...nt+Projects%22
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 7 '07 #4
Can you explain what this means?
>a web site has no project file, and asp.net (or the aspnet_compiler if
precomplied) includes the codebehind with the page dlls. this means pages
can not refer to each other, interfaces should be used (the 2003 conversion
wizard would do this).
I have read articles and listened to webcast from Microsoft and haven't
heard anything about pages not being able to refer to each other. Also,
what do you mean by "includes the codebehind with the page dlls"?

Thank you.
Nov 7 '07 #5
if vs compiles all the codebehind files into 1 assembly, all public
variables and methods can see each other without requiring a reference.

note: .net does not allow 2 assemblies to reference each other (called a
circular reference).

for example

page1.aspx's codebehind has a static method page1call() and page2.aspx's
codebehind has a static method page2call().

in vs2003 and in a web application, page1.aspx can call page2call() and
page2.aspx can call page1call() because they are in the same assembly.

in a web application page1.aspx will method not found, unless you add a
reference (page directive) to page2.aspx. if you add the refence page1
can call page2call(), but page2 cannot call page1call(), nor can you add
the reference because this would be circular.

this may seem like a limitation, but its not. good coding practice would
require the methods be extracted in a public class anyway. in a web
application, all files in the appcode folder go into one dll (assembly).

with a server transfer you often want to access properties on previous
page. in a web application you can access public properties defined in
the codebehind by casting the previous page to the right type.

in a web applicaton, you define a formal interface in the appcode
folder, then the page implements the interface. he caller then cats the
page to the inteface. this allows mulitple pages to implement the same
interface and is considered the correct approach even in a web application.
one dll per page:

in asp.net version 1 and 2, the aspx page is compiled into an assembly
(dll) and loaded at runtime. in version 1 this was at runtime in a temp
folder. in version 2 this can be done at runtime or precompiled. in a
precompiled web site/application the aspx page are empty, just place
holders for iis authentication. the compiled assemblies end up in the
bin folder.

note: you can run the merge utility to bundle all the separate dlls into
one to make deployment easier.
-- bruce (sqlwork.com)

Scott M. wrote:
Can you explain what this means?
>a web site has no project file, and asp.net (or the aspnet_compiler if
precomplied) includes the codebehind with the page dlls. this means pages
can not refer to each other, interfaces should be used (the 2003 conversion
wizard would do this).

I have read articles and listened to webcast from Microsoft and haven't
heard anything about pages not being able to refer to each other. Also,
what do you mean by "includes the codebehind with the page dlls"?

Thank you.

Nov 8 '07 #6
Thanks Bruce. I am aware of all this, but what you've now written is
contradictory to your first statement:
"this means pages can not refer to each other", which is what I was
objecting to. The statement was just unclear. It should have said:

"Without an assembly making a reference to another that it wishes to use the
codebase from, it won't be able to. Web Application Projects don't have to
make these references when they want to refer to code from another page in
the site."

-Scott

"bruce barker" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
if vs compiles all the codebehind files into 1 assembly, all public
variables and methods can see each other without requiring a reference.

note: .net does not allow 2 assemblies to reference each other (called a
circular reference).

for example

page1.aspx's codebehind has a static method page1call() and page2.aspx's
codebehind has a static method page2call().

in vs2003 and in a web application, page1.aspx can call page2call() and
page2.aspx can call page1call() because they are in the same assembly.

in a web application page1.aspx will method not found, unless you add a
reference (page directive) to page2.aspx. if you add the refence page1 can
call page2call(), but page2 cannot call page1call(), nor can you add the
reference because this would be circular.

this may seem like a limitation, but its not. good coding practice would
require the methods be extracted in a public class anyway. in a web
application, all files in the appcode folder go into one dll (assembly).

with a server transfer you often want to access properties on previous
page. in a web application you can access public properties defined in the
codebehind by casting the previous page to the right type.

in a web applicaton, you define a formal interface in the appcode folder,
then the page implements the interface. he caller then cats the page to
the inteface. this allows mulitple pages to implement the same interface
and is considered the correct approach even in a web application.
one dll per page:

in asp.net version 1 and 2, the aspx page is compiled into an assembly
(dll) and loaded at runtime. in version 1 this was at runtime in a temp
folder. in version 2 this can be done at runtime or precompiled. in a
precompiled web site/application the aspx page are empty, just place
holders for iis authentication. the compiled assemblies end up in the bin
folder.

note: you can run the merge utility to bundle all the separate dlls into
one to make deployment easier.
-- bruce (sqlwork.com)

Scott M. wrote:
>Can you explain what this means?
>>a web site has no project file, and asp.net (or the aspnet_compiler if
precomplied) includes the codebehind with the page dlls. this means
pages can not refer to each other, interfaces should be used (the 2003
conversion wizard would do this).

I have read articles and listened to webcast from Microsoft and haven't
heard anything about pages not being able to refer to each other. Also,
what do you mean by "includes the codebehind with the page dlls"?

Thank you.
Nov 8 '07 #7

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

Similar topics

3
by: F. GEIGER | last post by:
When I start a py2exe-ed application I get the error 'ascii' codec can't encode character u'\xe9' in position 10: ordinal not in range(128) This is how I run py2exe: setup.py py2exe -O1...
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...
3
by: Spencer | last post by:
One of the things that I have become interested in lately is questioning in general what percentage of DB2 UDB implementations are configured to run at least near optimally given the hardware...
12
by: VM | last post by:
I'm looking for an ASP.Net web hoster for my page and I'd like to know what I should consider when making my decision. Since I'm an independent software consultant, my short-term goal is to...
1
by: SatishPasala | last post by:
Hi I am developing a .net application. For my local system I use http://localhost/<directory>/filename. As for the testing server it runs at the root of the webserver "/". Is there any way I...
1
by: Javier Ros | last post by:
Hi, I´m developing different web applications (each one located in a different web site), and sometimes we need to call a web page in a different application to retrieve some information. We...
1
by: Knoxy | last post by:
Hi folks, Just a quick post to see if anyone had any thoughts on branding a website for completely different website designs. I have a site at the minute that gets installed with another...
14
by: salad | last post by:
XML seems to be a hot technology buzzword. And it appears XML is supported in A2003. I am wondering if it could be used in the following scenario. I create an order record for the customer. ...
11
by: =?Utf-8?B?UGF0Qg==?= | last post by:
Is there a way in ASP.NET 2.0 to have different connection strings settings in a web.config files that are dynamically used based upon the server that the web application is running on? For...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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...
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.