473,804 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Batch Deployment

I was wondering what practices people have come up with for
deployment. I want to precompile the application and encrypt portions
of the web.config.

In 1.0 I just did a batch file that would
copy %source%\*.aspx %web%\*.*
copy %source%\bin\*. dll %web%\bin\*.*
rem copy %source%\web.co nfig %web%\*.*

Would rem out web.config because of changes in web.config. Such as
pointing to the production servers versus the development ones and
encrypting of the connections strings using the DPAPI and the machine
key.

In 2.0 was thinking of doing the same with a batch file

aspnet_compiler -v /<websitename> -p <source> <destination>
aspnet_regiis.e xe -pef "connectionStri ngs" %website% –prov
"DataProtection ConfigurationPr ovider"

An issue I was having is where to automatically find the latest and
greatest version of the compiler. I know they are stored at:
%WinDir%\Micros oft.NET\Framewo rk\<versionNumb er>
How can I automatically get the location of the most recent one to run
in my .bat file.

Or is there an easier more reliable way to precompile the app and
encrypt the web.config.
thanks,
Apr 11 '06 #1
4 1633
Hi Chuck,

Welcome to the ASP.NET newsgroup.

As for the .net framework, the runtime and framework library is always
installed under the

%WinDir%\Micros oft.NET\Framewo rk\<versionNumb er>

also each released framework will have fixed version number. For .net 2.0,
it's v2.0.50727. So you can just reference the target framework's dir
through the above path (with correct version number). And when you use the
asp.net_compile r tool to compile website application, make sure the
compiler's framework version is identical to the target IIS application
virtual directory's ASP.NET version.

Also, as for publishing and deploying ASP.NET 2.0 web application, the
ASP.NET dev team has provided a new project for deploying asp.net 2.0 web
application, it has supplied us web.config file section replacing funciton,
we can use this to replace some certain cofiguration sections in the
web.config during publish/deploy time. Also, this deployment project can be
automated through MSBUILD tool in command line(through the XML based
project file):

#Visual Studio 2005 Web Deployment Projects (Beta V2 Preview)
http://msdn.microsoft.com/asp.net/re...structure/wdp/

And here are some web articles about configuration encrypting in ASP.NET
2.0:

#How To: Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI
http://msdn.microsoft.com/library/en...5.asp?frame=tr
ue

#Encrypting Configuration Information in ASP.NET 2.0 Applications
http://aspnet.4guysfromrolla.com/articles/021506-1.aspx

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Apr 12 '06 #2
Thanks Steven,

The build stuff was interesting, I'd like to keep it simple with a no
learning curve method, AKA a batch file.

I understand the net framework has been historically installed at
%WinDir%\Micros oft.NET\Framewo rk\<versionNumb er>. Is there a
progamatic way to determine where the most current version of the
netframe work is installed. I know VS figures it out somehow. Perhaps
there is a registry entry with the current version. Or a registry
entry with an enumeration?

thanks,
On Wed, 12 Apr 2006 07:05:19 GMT, st*****@online. microsoft.com (Steven
Cheng[MSFT]) wrote:
Hi Chuck,

Welcome to the ASP.NET newsgroup.

As for the .net framework, the runtime and framework library is always
installed under the

%WinDir%\Micro soft.NET\Framew ork\<versionNum ber>

also each released framework will have fixed version number. For .net 2.0,
it's v2.0.50727. So you can just reference the target framework's dir
through the above path (with correct version number). And when you use the
asp.net_compil er tool to compile website application, make sure the
compiler's framework version is identical to the target IIS application
virtual directory's ASP.NET version.

Also, as for publishing and deploying ASP.NET 2.0 web application, the
ASP.NET dev team has provided a new project for deploying asp.net 2.0 web
application, it has supplied us web.config file section replacing funciton,
we can use this to replace some certain cofiguration sections in the
web.config during publish/deploy time. Also, this deployment project can be
automated through MSBUILD tool in command line(through the XML based
project file):

#Visual Studio 2005 Web Deployment Projects (Beta V2 Preview)
http://msdn.microsoft.com/asp.net/re...structure/wdp/

And here are some web articles about configuration encrypting in ASP.NET
2.0:

#How To: Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI
http://msdn.microsoft.com/library/en...5.asp?frame=tr
ue

#Encrypting Configuration Information in ASP.NET 2.0 Applications
http://aspnet.4guysfromrolla.com/articles/021506-1.aspx

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
============== =============== =============== ======

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

============== =============== =============== ======
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Apr 12 '06 #3
I found and enviromnet variable that has a cool batch file at the
location

call "%VS80COMNTOOLS %vsvars32.bat"

this tells me where everything is and the version!

On Wed, 12 Apr 2006 07:05:19 GMT, st*****@online. microsoft.com (Steven
Cheng[MSFT]) wrote:
Hi Chuck,

Welcome to the ASP.NET newsgroup.

As for the .net framework, the runtime and framework library is always
installed under the

%WinDir%\Micro soft.NET\Framew ork\<versionNum ber>

also each released framework will have fixed version number. For .net 2.0,
it's v2.0.50727. So you can just reference the target framework's dir
through the above path (with correct version number). And when you use the
asp.net_compil er tool to compile website application, make sure the
compiler's framework version is identical to the target IIS application
virtual directory's ASP.NET version.

Also, as for publishing and deploying ASP.NET 2.0 web application, the
ASP.NET dev team has provided a new project for deploying asp.net 2.0 web
application, it has supplied us web.config file section replacing funciton,
we can use this to replace some certain cofiguration sections in the
web.config during publish/deploy time. Also, this deployment project can be
automated through MSBUILD tool in command line(through the XML based
project file):

#Visual Studio 2005 Web Deployment Projects (Beta V2 Preview)
http://msdn.microsoft.com/asp.net/re...structure/wdp/

And here are some web articles about configuration encrypting in ASP.NET
2.0:

#How To: Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI
http://msdn.microsoft.com/library/en...5.asp?frame=tr
ue

#Encrypting Configuration Information in ASP.NET 2.0 Applications
http://aspnet.4guysfromrolla.com/articles/021506-1.aspx

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
============== =============== =============== ======

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

============== =============== =============== ======
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Apr 12 '06 #4
Thanks for your response Chunk,

Glad that you've found the tool. Also, this tool is contained in the
VS80(2005) common tools. BTW, we can also find the installed .net framework
version info under the following registry key:

HKEY_LOCAL_MACH INE\SOFTWARE\Mi crosoft\.NETFra mework\policy

If there is anything else we can help, please feel free to post here.

Good luck!

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 13 '06 #5

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

Similar topics

12
3507
by: Moosebumps | last post by:
So, after reading some messages about os.system, and looking at the popen stuff and trying it a bit, I still have not found a way to keep a command window open for several commands (on Windows 2000/XP), while seeing the normal output in a command window. All I want to do is do what a batch file does, but I want to actually have functions and associative arrays and all the other niceties of python. What's the deal with that? I thought...
4
47547
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup) 4) Once the copy is complete, the batch file opens the Access database again 5) EXIT should close out the cmd window but it does not execute that line
3
1247
by: Oscar Thornell | last post by:
Hi, Any suggestions on best practices on implementing batch process functionality in a web app? The idea is to run a batch of order processing at night when the site load is low. I would like to contain the logic within the web application for deployment reasons.. An event has to be fired at a specific time or other threeshold.
6
11240
by: Charles Neitzel | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running programs and executing registry entries. The majority of my buttons work however, I have come upon a problem. I need a few of the buttons to run DOS batch files, the batch files in turn run program installers (specifically windows update runtime .exe...
1
3205
by: Charles | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running programs and executing registry entries. The majority of my buttons work however, I have come upon a problem. I need a few of the buttons to run DOS batch files, the batch files in turn run program installers (specifically windows update runtime .exe...
2
1641
by: Blippy | last post by:
I want to create a small look up program that searches for a certain date and the batch number that is represented by that day. For instance if i wanted to find the batch for 20/08/05 i would choose that date and then the program would tell me that it was batch 125. The batch number are incremented by 1 everyday apart from SUNDAYS. Is there an easy way that I can do this??? Here are some demo batch numbers to show it all works...
1
24312
by: steve | last post by:
Hi all, Here's some work in progress that should allow you to run a batch file as a custom action in a VS deployment project. Yup I know you can use js or wsh, but the target may not have either.. Essentially it's just a wrapper for the Process class and a command interpreter. Warning, it only partly works. I had wanted to pass in (a) The name of the batch file (through "BatchFileName"), and
4
3664
ck9663
by: ck9663 | last post by:
hi guys this is a little challenging, at least for me...here goes... i have to run a DOS batch file from a server. with some parameters that i need to pass. these parameters can be found on a sql-server table. which means i need to build the string that will be used to call the batch file (set @var = 'callbatch.bat ' + @var1 + ' ' + @var2). then call the batch file using the xp_cmdshell command. each batch file runs about 4-5 hours. i don't...
14
12834
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in case it's a question, i want to popup a messageBox or something, and bring back to the batch file the result (Yes\No question). I know how to excute the batch file and get all the Standard output at the end, but i don't know who can i read it line by...
0
9705
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
10323
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10074
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
9138
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
7613
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
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4292
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
2988
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.