MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_01C9B796.6A9EA8D0" This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®. ------=_NextPart_01C9B796.6A9EA8D0 Content-Location: file:///C:/EA821A05/ReadMe.htm Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="us-ascii"
Stonehenge/Apache .Net ReadMe
Stonehenge .Net StockTrader for Apache is a subset and fork of Microsoft's .NET= StockTrader Sample Application on MSDN. The or= iginal StockTrader can be used as a reference. It is l= ocated at h= ttp://msdn.microsoft.com/en-us/netframework/bb499684.aspx. A main difference is that this version does NOT include the configuration management features of the MSDN = .Net StockTrader. Configuration is done manually. The expected audience is an experienced developer with knowledge of C# and SOA = with WCF.
1.= = Get software from https://svn.apache.org/repos/asf/incubator/stonehenge/trunk/s= tocktrader/dotnet/
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
a. &nb=
sp;
I recommend you use ank=
hSVN
and open project from VisualStudio
2.= = As a prerequisite you should
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
a. &nb=
sp;
Install .net 3.5 SP1
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
b. &nb=
sp;
IIS - Web Service Role with Static Content
feature enabled
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
c. &nb=
sp;
Install SQL Server 2008 with mixed mode
authentication
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
d. &nb=
sp;
Enable the sa
account with a password.
i.= = You will need to edit the SetupActions.exe.config file to add that password later
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
e. &nb=
sp;
Install asp.net 3.5
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
f. &nb=
sp;
If you setup IIS before this you may need to=
run
setup\util\servicemodelreg64.cmd (or servicemod=
el.cmd
if you run 32 bit)
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
g. &nb=
sp;
Optional: You may want to enable network
discovery so you can browse to shares with code. this=
span>
may not be needed for a single server install but if you are going to use m=
ore
than one machine then this is a good option.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
h. &nb=
sp;
Install Visual Studio 2008
3.= = Seed the database and create accounts
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
a. &nb=
sp;
In the directory:
C:\StockTraderDemo\setup_utilities\SetupActions
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
b. &nb=
sp;
Edit the .config=
file
to set the right "dbPassword" for the sa account. This is App.c=
onfig
in your solution. When you build it is renamed to [program name].exe.config.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
c. &nb=
sp;
Set the dbserver
variable to point to your MSSQL instance. You might be able to set it to &q=
uot;." for the simplest
case. If you use SQLExpress or a named instance=
it
will be different (eg. “.\SQLExpress<=
/span>”).
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
d. &nb=
sp;
Compile the project
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
e. &nb=
sp;
From a console run SetupActions.exe (with
elevated privilege - i.e. run as admin)
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
f. &nb=
sp;
Open ports 8000 and 9000 on your firewall.=
p>
i.= = Control Panel->Windows Firewall->"Allow a program through the fire wall"
ii= . = You will get to a dialog, choose exceptions Tab
ii= i. Click Add Port
iv= . Name it "8000" and put 8000 in the port Number field
v.= = Ok
vi= . Repeat for 9000
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
g. &nb=
sp;
Refresh the password in the trade account s/=
b 'yyy'
i.= = In Microsoft SQL Server Management Studio = p>
ii= . = Security->Logins->Trade
ii= i. Right click on trade->properties
iv= . Edit password
4.= = In IIS manager , Under Default Website, Add a Virtual Application for TRADE and point it to C:\StockTraderDemo\trader_client\trade
5.= = Installing a Test Certificate per Documentation\Configuration.pdf page 49.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
a. &nb=
sp;
Install three certificates: \\[stocktrader
installation dir]\setup utilities\util\stocktra=
derpfxfile.pfx,
BSLClient.pfx, OPSHost.pfx
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
b. &nb=
sp;
Use mmc
->Certificates and choose Computer account (to access the computer accou=
nt
you will need to start mmc as an administrator)=
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
c. &nb=
sp;
Now, open the Certificates Folder, and then =
open
the Trusted People folder.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
d. &nb=
sp;
Right click on the Trusted People folder, and
choose All Tasks, Import.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
e. &nb=
sp;
This brings up the Import wizard.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
f. &nb=
sp;
Choose Next, then=
click
Browse.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
g. &nb=
sp;
Make sure to change the displayed file types=
to
“Personal Information Exchange (*.pfx; *p12) file types.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
h. &nb=
sp;
Browse to and select the \[stocktrader
installation dir]\setup_utilities\util\stocktraderpfxfile.pfx
file.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
i. &nb=
sp;
Click Next.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
j. &nb=
sp;
You will be prompted for a password. The password is ‘yyy’. This is the StockTra=
der
db password NOT the sa
password.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
k. &nb=
sp;
Click Next, Next and Finish to
import the certificate to the \local computer\Trusted People certifi=
cate
store.
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
l. &nb=
sp;
Repeat for BSLClient.pfx, OPSHost.pfx
certificates
6.= = Build The solutions - It is expected that you have Visual Studio 2008 installed= p>
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
a. &nb=
sp;
It is strongly recommended you use this tree
structure or else you will have to change the post build commands
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
b. &nb=
sp;
Build in order
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
c. &nb=
sp;
OrderProcessorSolution.sln
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
d. &nb=
sp;
BusinessServiceSolution.sln
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
e. &nb=
sp;
StockTraderWebAppSolution.sln
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
f. &nb=
sp;
Binaries are copied by build to order_processor\bin\Debug, busin=
ess_service\bin\Debug,
trade_client\bin\Debug respectively
7.= = To run
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
a. &nb=
sp;
You will need to create a virtual application
directory for our web app. (Step 4 above)
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
b. &nb=
sp;
Default setup will be M=
sec_http
(all config files will be in sync for this)
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
c. &nb=
sp;
In a console (with elevated privilege - i.e.=
run
as admin), In the ..\order_=
processor\bin\Debug
directory run Trade.OrderProcessorConsoleHost.exe
i.&n=
bsp;
Con=
sole
App should remain open and active (do not exit application!)
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
d. &nb=
sp;
In a console(with
elevated privilege - i.e. run as admin), in the ..\business_service\bin\Debug directory run
Trade.BusinessServiceConsole.exe
i.&n=
bsp;
Con=
sole
App should remain open and active (do not exit application!)
&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp;
e. &nb=
sp;
In a browser, run the Web app http://localhost/trade/
II= . Configuration:
As built this StockTrader = version supports four modes of operation. These are configurable via the config files in the C directories listed below
· "Http_WebService_MSecurity= ": This is WS* with security and is the Default Configuration
· "Http_WebService&qu= ot;: This is normal HTTP.
· “InProcess": In this mode all the processes run inside the web application process.
· "Http_WSO= 2_WebService_MSecurity": This is a hook left for various connections with WSO2 components. [Is this deprecated since the WSO2 implementation is WS-* compliant now isn’t = it? If so shouldn’t the document state that this is deprecated and should= not be used?]
In general you edit the configurations, save them and restart the applications
· Edit the \trader_client= \Trade\Web.config
<add key=3D"ACCESS_MODE" value= =3D"Http_WebService_MSecurity"/>
<add key=3D"ORDER_PROCESSING_MODE&quo= t; value=3D"ASync_Http_MSecurity"/>= p>
· Edit the \business_service\bin\debug\Trade.BusinessServiceConsole.exe.config
<add key=3D"ORDER_PROCESSING_MODE" value= =3D"ASync_Http_MSecurity" />
· Edit the \order_processor\bin\debug\Trade.OrderProcessorConsoleHost.exe.config
<add key=3D"ORDER_PROCESSING_MODE" value= =3D"ASync_Http_MSecurity" />
· Edit the \trader_client= \Trade\Web.config
<add key=3D"ACCESS_MODE" value= =3D"Http_WebService"/>
<add key=3D"ORDER_PROCESSING_MODE&quo= t; value=3D"ASync_Http"/>
· Edit the \business_service\bin\debug\Trade.B= usinessServiceConsole.exe.config
<add key=3D"ORDER_PROCESSING_MODE" value= =3D"ASync_Http" />
· Edit the \order_processor\bin\debug\Trade.Or= derProcessorConsoleHost.exe.config
<add key=3D"ORDER_PROCESSING_MODE" value= =3D"ASync_Http" />
· Edit the \trader_client= \Trade\Web.config
<add key=3D"ACCESS_MODE" value= =3D"Http_InProcess"/>
<add key=3D"ORDER_PROCESSING_MODE&quo= t; value=3D"Sync_Inprocess"/>
· Edit the\business_service\bin\debug\Trade.Bu= sinessServiceConsole.exe.config
<add key=3D"ORDER_PROCESSING_MODE" value= =3D" Sync_Inprocess" />
· Edit the \order_processor\bin\debug\Trade.Or= derProcessorConsoleHost.exe.config
<add key=3D"ORDER_PROCESSING_MODE" value= =3D" Sync_Inprocess" />
These are place holders f=
or
any WSO2 configuration desired.
· Edit the \trader_client= \Trade\Web.config
<add key=3D"ACCESS_MODE" value=3D"Http_WebService_WSO2_MSecurity"/>
<add key=3D"ORDER_PROCESSING_MODE&quo= t; value=3D"ASync_WSO2_Http_MSecurity"/>
· Edit the \business_service\bin\debug\Trade.B= usinessServiceConsole.exe.config
<add key=3D"ORDER_PROCESSING_MODE" value=3D"ASync_WSO2_Http_MSecurity" />
· Edit the \order_processor\bin\debug\Trade.Or= derProcessorConsoleHost.exe.config
<add key=3D"ORDER_PROCESSING_MODE" value=3D"ASync_WSO2_Http_MSecurity" />