Why cann't pass the database login infomation to the Installer class during the custom installation

K

Kemin

Recently I built an ASP.NET application Installation program for deployment.
The ASP.NET app use a Sql Server db, I package it into the installation file
too.

The general step of building an installation are:
1.Add an install class to the deployed project and imperment the custom
action
2.Add a "Data Entry Dialog Boxes" in the User Interface Editor of the
deployment project(my examply has two textbox,thier property are DBUSER and
DBPASSWORD)
3.Add a install custom action in Custom Actions view and select the main
output program which inherit install class to perform that action, set the
"CustomActionData"(my examply the CustomActionData is /dbuser=[DBUSER]
/dbpassword=[DBPASSWORD])
for detail refer to http://www.codeproject.com/dotnet/SetupAndDeployment.asp

I can sure the steps of my installation project has no error, because I can
throw the parameter data
passed from the "Custom Actions" (installer class couldn't be debug). But
the problem is the parameter
data is the defaul value of textbox, not the value set in "Data Entry Dialog
Boxes" during
installation running, what's up?
the debug code below:
public override void Install(IDictionary stateSaver){
base.Install(stateSaver);
throw new InstallException("installing the database fail, please
check.." + Context.Parameters

["dbuser"] + Context.Parameters["dbpassword"] );
......
}

I am so confused, later i build a simple test project following the example
in

http://www.codeproject.com/dotnet/SetupAndDeployment.asp
and found that it can work correctly!
I seem that the other content in my project impact the result, it's so
unreasonable!!
anyone has an ideal and has encount similar problem, drop a note pls,
thanks!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top