473,651 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to precompile a web application?

a previous long thread brought this up.

I can find no way to precompile a web application from visual studio. by
precompile I mean all the aspx code is converted to assemblies by visual
studio, not at runtime by asp.net. if you view the compiled aspx page it
should only contain the line:

This is a marker file generated by the precompilation tool, and should
not be deleted!

replacing all the original aspx source, and of course a page assembly
should exist in the bin folder thats the compiled aspx.

vs2005 & vs2008 support this for websites (all i use), but was looking
for the out of the box web application solution.

note: this a asp.net 2.0+ feature and does not exist for 1.1

-- bruce (sqlwork.com)
Oct 16 '07 #1
7 3115
"bruce barker" <no****@nospam. comwrote in message
news:el******** ******@TK2MSFTN GP04.phx.gbl...
I can find no way to precompile a web application from visual studio.
Not sure about natively, but Web Deployment Projects does this (I never use
anything else for deployment).

It's a simple matter of unchecking the "Allow this precompiled site to be
updatable" checkbox in the WDP's Compilation options...
by precompile I mean all the aspx code is converted to assemblies by
visual studio, not at runtime by asp.net. if you view the compiled aspx
page it should only contain the line:

This is a marker file generated by the precompilation tool, and should not
be deleted!
That's right.
replacing all the original aspx source, and of course a page assembly
should exist in the bin folder thats the compiled aspx.
It certainly does.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 16 '07 #2
Not to sound like a broken MP3, but if you use the Web Application Project
model you will never have to go through this B.S. - you get a /bin folder
with your entire project all compiled into a single assembly. No muss, no
fuss. And none of those silly marker files that are required for an endpoint
for each page. Works just like the original VS 2003 deal.
Cheers,
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"bruce barker" wrote:
a previous long thread brought this up.

I can find no way to precompile a web application from visual studio. by
precompile I mean all the aspx code is converted to assemblies by visual
studio, not at runtime by asp.net. if you view the compiled aspx page it
should only contain the line:

This is a marker file generated by the precompilation tool, and should
not be deleted!

replacing all the original aspx source, and of course a page assembly
should exist in the bin folder thats the compiled aspx.

vs2005 & vs2008 support this for websites (all i use), but was looking
for the out of the box web application solution.

note: this a asp.net 2.0+ feature and does not exist for 1.1

-- bruce (sqlwork.com)
Oct 16 '07 #3
i use web deployment projects with web sites, i just can not find how to
add one to a web application solution, especially for vs2008.

-- bruce (sqlwork.com)

Mark Rae [MVP] wrote:
"bruce barker" <no****@nospam. comwrote in message
news:el******** ******@TK2MSFTN GP04.phx.gbl...
>I can find no way to precompile a web application from visual studio.

Not sure about natively, but Web Deployment Projects does this (I never
use anything else for deployment).

It's a simple matter of unchecking the "Allow this precompiled site to
be updatable" checkbox in the WDP's Compilation options...
>by precompile I mean all the aspx code is converted to assemblies by
visual studio, not at runtime by asp.net. if you view the compiled
aspx page it should only contain the line:

This is a marker file generated by the precompilation tool, and should
not be deleted!

That's right.
>replacing all the original aspx source, and of course a page assembly
should exist in the bin folder thats the compiled aspx.

It certainly does.

Oct 16 '07 #4
if you are not using marker files, then your site is compiled at runtime
on the first page request (just like 1.1). web deployment projects are
used to build precompiled sites, I'm just missing how to create a web
deployment project for a web application. though it is easy to
precompile a web application project manually.
-- bruce (sqlwork.com)
Peter Bromberg [C# MVP] wrote:
Not to sound like a broken MP3, but if you use the Web Application Project
model you will never have to go through this B.S. - you get a /bin folder
with your entire project all compiled into a single assembly. No muss, no
fuss. And none of those silly marker files that are required for an endpoint
for each page. Works just like the original VS 2003 deal.
Cheers,
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"bruce barker" wrote:
>a previous long thread brought this up.

I can find no way to precompile a web application from visual studio. by
precompile I mean all the aspx code is converted to assemblies by visual
studio, not at runtime by asp.net. if you view the compiled aspx page it
should only contain the line:

This is a marker file generated by the precompilation tool, and should
not be deleted!

replacing all the original aspx source, and of course a page assembly
should exist in the bin folder thats the compiled aspx.

vs2005 & vs2008 support this for websites (all i use), but was looking
for the out of the box web application solution.

note: this a asp.net 2.0+ feature and does not exist for 1.1

-- bruce (sqlwork.com)
Oct 16 '07 #5
"bruce barker" <no****@nospam. comwrote in message
news:uR******** ******@TK2MSFTN GP03.phx.gbl...
I use web deployment projects with web sites, i just can not find how to
add one to a web application solution
1) Right-click the project name in Solution Explorer

2) Click Add Web Deployment Project...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 16 '07 #6
if only it was so easy, the menu pick appears for a web site, but not
for a web application. But I'll take your word for it. I really wanted
to look at the msbuild file it generated to compare to the one produced
for web sites, to see what differences it had (if any) and if it had an
option to run the merge utility.

also I'm more interested in vs2008's approach to web deployments.
-- bruce (sqlwork.com)
Mark Rae [MVP] wrote:
"bruce barker" <no****@nospam. comwrote in message
news:uR******** ******@TK2MSFTN GP03.phx.gbl...
>I use web deployment projects with web sites, i just can not find how
to add one to a web application solution

1) Right-click the project name in Solution Explorer

2) Click Add Web Deployment Project...

Oct 16 '07 #7
"bruce barker" <no****@nospam. comwrote in message
news:e4******** *****@TK2MSFTNG P04.phx.gbl...
the menu pick appears for a web site, but not for a web application.
It most certainly does appear for a web application - I'm sitting looking at
it right now...

I never go anywhere near web sites - all my ASP.NET projects are web
applications, and they all have a WDP added in precisely this way...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 16 '07 #8

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

Similar topics

11
29834
by: Steve Franks | last post by:
I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I placed in my /App_Code directory. Everything runs fine locally. However when I use the "Copy Web" function to upload the site to the production server, I get the following error when trying to run the page on production: "System.Web.HttpException: The directory '/App_Code' is not allowed because the application is precompiled." Anyone know this works fine locally but...
8
1524
by: Mike Owen | last post by:
Hi, I am trying to pre-compile a project prior using ASP.Net 2.0, VS 2005, to putting it onto a live server. The reason for doing this is that other people have access to the server, and I thereofre want to keep the code secure. If I use the 'Build/Publish Web Site' option, it asks me to tell it the 'Target location' which in this case is 'C:\Temp\PrecompiledWeb\Project1'
2
1796
by: Shimon Sim | last post by:
I tried to use Precompile.axd to compile my site but got HTTP404 (The resource cannot be found) instead. I am running ASP.NET Version:2.0.50727.42 .. Any suggestions? Thank you, Shimon.
3
6090
by: Bragadiru | last post by:
Hi, I have 2 pbs : 1. When I'm using VS2005->Publish Web site => everything is pre-compiled fine (App_global.asax.dll is generated, too), except that I don't find Global.asax file in my destination folder and I need to copy it there manually. What is strange : Global.asax.resx file is copied. Use fixed naming and single page assemblies - checked Enable strong naming on precompiled assemblies - unchecked
1
1739
by: Tessa | last post by:
Hi, Is there a way to use aspnet_compiler to precompile an existing asp.net 2.0 web application that is on another server? I need to initiate the precompile programmatically from another .net windows program running on a different machine. thanks for any info
0
1294
by: =?Utf-8?B?Q2hyaXMgRmFsdGVy?= | last post by:
My goal is to have my web service precompiled when I build my solution, so that some of our reflection code can call GetAssembly (using the name of the precompiled DLL), instantiate a class that implements the right interface, and use the interface. A Web Setup project is not of interest, since it does not fit in with our build script design, which compiles a solution, then performs an xcopy from the appropriate source directory to the...
3
2008
by: Scott M. | last post by:
Scenario: ASP .NET 2.0 Web "Site" All but one page is written using inline VB .NET code. One page is written using VB .NET code-behind. MSBuild options are set at the default (allow pages to be updateable) When I "publish" the site and take a look at the precompiled folder that is generated by this process, I see a /bin folder has been created with one file in it "App_Web_pccpykfu.dll".
1
3850
by: Alex | last post by:
Hi This might seem an unusual request! Does anybody know how to rebuild an ASP.NET 1.1 application on server without Visual studio (i.e. compile on the server itself). It would be fine if it was an ASP.NET 2.0 application I guess (would recompile on the fly).
1
171
by: Gabriel Pineda | last post by:
hi everybody, i have an issue for you: i have an operative site wich i'm trying to precompile to protect the code that will be installed on client. the issue is: if i run the precompile (aspnet_compiler) it throw me some errors: ex: Name 'CN' is not declared. this is because the variable es declared in another page, that includes the one which throw the error. how can i bypass these "errors" ? how can i precompile the site? is it...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8792
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
8457
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
8571
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...
1
6157
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
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
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
2
1585
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.