Sunday, March 23, 2014

WCF Service Trace Viewer Part 2

WCF Service Trace Viewer Part 2

Continuing from the previous part, now we’ll have a look at what happens when we call the service using WSHttpBinding. For this, I have to instantiate my LearnWcfService service passing the WSHttp binding endpoint to the constructor. The rest of the method runs the exact same instructions as before. I have also changed the instantiateData attribute in the app.config file to ClientLogWsHttp.svclog, just to keep the log files separate.
image_thumb11
Clearly, there are more activities than the ‘basic’ version. As done before, I click on the Construct ChannelFactory… activity and the Get ChannelEndpointElement trace and see that we’re now binding through wsHttpBinding.
image_thumb6
In addition to other things, we see an activity called ‘Set up Secure Session’. This is where a secure session information is instantiated. The next few activities – Processing message 1, 2, 3 are all related to this hand-shake.
We’ll see some details on this even on the Message tab.
image_thumb2
Just to compare, scroll up and compare the number of messages on Basic Http binding 8 : 22. I think we can account so much of data-exchange and bandwidth usage as the price paid for security. Here’s what I learned about those messages:
RST – Request Secure Token
RSTR – Request Secure Token Response
SCT – Secure Context Token
Looking at the first message, you’ll find the full ‘xml’ised version of the request that is being sent.
   1: <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
   2:     <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
   3:         <EventID>0</EventID>
   4:         <Type>3</Type>
   5:         <SubType Name="Information">0</SubType>
   6:         <Level>8</Level>
   7:         <TimeCreated SystemTime="2011-04-12T05:09:50.1644952Z" />
   8:         <Source Name="System.ServiceModel.MessageLogging" />
   9:         <Correlation ActivityID="{4e5dfe15-fb15-4097-bf66-5f1a28f85d74}" />
  10:         <Execution ProcessName="ClientApplication" ProcessID="7208" ThreadID="1" />
  11:         <Channel />
  12:         <Computer>MyComputer</Computer>
  13:     </System>
  14:     <ApplicationData>
  15:         <TraceData>
  16:             <DataItem>
  17:                 <MessageLogTraceRecord Time="2011-04-12T10:39:50.1584946+05:30" Source="ServiceLevelSendRequest" Type="System.ServiceModel.Channels.BodyWriterMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
  18:                     <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
  19:                         <s:Header>
  20:                             <a:Action s:mustUnderstand="1">http://tempuri.org/ILearnWcfService/AddInt</a:Action>
  21:                             <a:MessageID>urn:uuid:438598db-0d89-4e42-a955-11e9be43088f</a:MessageID>
  22:                             <a:ReplyTo>
  23:                                 <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
  24:                             </a:ReplyTo>
  25:                         </s:Header>
  26:                         <s:Body>
  27:                             <AddInt xmlns="http://tempuri.org/">
  28:                                 <arg1>1</arg1>
  29:                                 <arg2>2</arg2>
  30:                             </AddInt>
  31:                         </s:Body>
  32:                     </s:Envelope>
  33:                 </MessageLogTraceRecord>
  34:             </DataItem>
  35:         </TraceData>
  36:     </ApplicationData>
  37: </E2ETraceEvent>
Notice the arguments and the method call that is being mentioned in the xml. Also see the Source attribute that says ServiceLevelSendRequest. But if you continue looking at the next message for AddInt, you’ll find that the request has now been fully encrypted and totally unreadable (CipherValue element). The message is now in the TransportSend status. This is WSHttpBinding at work.
image_thumb7
The very next message (first of the AddIntResponse message) is the TransportReceive stage where the data is still encrypted and it is only in the last of the AddIntResponse messages does it come the ServiceLevelReceiveReply stage where it becomes readable. We see how WSHttp secures the data during the different layers. If you cross check, the data remains as plain- readable-text throughout the process of Basic Http binding.
   1: <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
   2:     <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
   3:         <EventID>0</EventID>
   4:         <Type>3</Type>
   5:         <SubType Name="Information">0</SubType>
   6:         <Level>8</Level>
   7:         <TimeCreated SystemTime="2011-04-12T05:10:11.9866772Z" />
   8:         <Source Name="System.ServiceModel.MessageLogging" />
   9:         <Correlation ActivityID="{c4060ea9-a788-4490-b228-03dd04f6de28}" />
  10:         <Execution ProcessName="ClientApplication" ProcessID="7208" ThreadID="1" />
  11:         <Channel />
  12:         <Computer>MyComputer</Computer>
  13:     </System>
  14:     <ApplicationData>
  15:         <TraceData>
  16:             <DataItem>
  17:                 <MessageLogTraceRecord Time="2011-04-12T10:40:11.9856771+05:30" Source="ServiceLevelReceiveReply" Type="System.ServiceModel.Security.SecurityVerifiedMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
  18:                     <HttpResponse>
  19:                         <StatusCode>OK</StatusCode>
  20:                         <StatusDescription>OK</StatusDescription>
  21:                         <WebHeaders>
  22:                             <Connection>Close</Connection>
  23:                             <Content-Length>5094</Content-Length>
  24:                             <Cache-Control>private</Cache-Control>
  25:                             <Content-Type>application/soap+xml; charset=utf-8</Content-Type>
  26:                             <Date>Tue, 12 Apr 2011 05:10:11 GMT</Date>
  27:                             <Server>ASP.NET Development Server/10.0.0.0</Server>
  28:                             <X-AspNet-Version>4.0.30319</X-AspNet-Version>
  29:                         </WebHeaders>
  30:                     </HttpResponse>
  31:                     <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
  32:                         <s:Header>
  33:                             <a:Action s:mustUnderstand="1" u:Id="_2" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:a="http://www.w3.org/2005/08/addressing">http://tempuri.org/ILearnWcfService/AddIntResponse</a:Action>
  34:                             <a:RelatesTo u:Id="_3" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:a="http://www.w3.org/2005/08/addressing">urn:uuid:438598db-0d89-4e42-a955-11e9be43088f</a:RelatesTo>
  35:                             <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
  36:                                 <u:Timestamp u:Id="uuid-5d226149-f6d5-4f95-bf27-63a2be952b57-11" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  37:                                     <u:Created>2011-04-12T05:10:11.964Z</u:Created>
  38:                                     <u:Expires>2011-04-12T05:15:11.964Z</u:Expires>
  39:                                 </u:Timestamp>
  40:                                 <c:DerivedKeyToken u:Id="uuid-5d226149-f6d5-4f95-bf27-63a2be952b57-7" xmlns:c="http://schemas.xmlsoap.org/ws/2005/02/sc" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  41:                                     <o:SecurityTokenReference>
  42:                                         <o:Reference URI="urn:uuid:c10f0ecb-1c3e-4afe-b6f3-240d19318329" ValueType="http://schemas.xmlsoap.org/ws/2005/02/sc/sct"></o:Reference>
  43:                                     </o:SecurityTokenReference>
  44:                                     <c:Offset>0</c:Offset>
  45:                                     <c:Length>24</c:Length>
  46:                                     <c:Nonce>
  47:                                         
  48:                                     </c:Nonce>
  49:                                 </c:DerivedKeyToken>
  50:                                 <c:DerivedKeyToken u:Id="uuid-5d226149-f6d5-4f95-bf27-63a2be952b57-8" xmlns:c="http://schemas.xmlsoap.org/ws/2005/02/sc" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  51:                                     <o:SecurityTokenReference>
  52:                                         <o:Reference URI="urn:uuid:c10f0ecb-1c3e-4afe-b6f3-240d19318329" ValueType="http://schemas.xmlsoap.org/ws/2005/02/sc/sct"></o:Reference>
  53:                                     </o:SecurityTokenReference>
  54:                                     <c:Nonce>
  55:                                         
  56:                                     </c:Nonce>
  57:                                 </c:DerivedKeyToken>
  58:                                 <e:ReferenceList xmlns:e="http://www.w3.org/2001/04/xmlenc#">
  59:                                     <e:DataReference URI="#_1"></e:DataReference>
  60:                                     <e:DataReference URI="#_4"></e:DataReference>
  61:                                 </e:ReferenceList>
  62:                                 <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
  63:                                     <SignedInfo>
  64:                                         <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
  65:                                         <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"></SignatureMethod>
  66:                                         <Reference URI="#_0">
  67:                                             <Transforms>
  68:                                                 <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
  69:                                             </Transforms>
  70:                                             <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
  71:                                             <DigestValue>iXK6QpgkLD0hNgV4zbd2p8UZTMk=</DigestValue>
  72:                                         </Reference>
  73:                                         <Reference URI="#_2">
  74:                                             <Transforms>
  75:                                                 <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
  76:                                             </Transforms>
  77:                                             <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
  78:                                             <DigestValue>dd5TBRTJOCia0ttk9jZrsX/BIwY=</DigestValue>
  79:                                         </Reference>
  80:                                         <Reference URI="#_3">
  81:                                             <Transforms>
  82:                                                 <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
  83:                                             </Transforms>
  84:                                             <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
  85:                                             <DigestValue>wUCHZwK/oA2Zf1DW7teWcpC60DE=</DigestValue>
  86:                                         </Reference>
  87:                                         <Reference URI="#uuid-5d226149-f6d5-4f95-bf27-63a2be952b57-11">
  88:                                             <Transforms>
  89:                                                 <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
  90:                                             </Transforms>
  91:                                             <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
  92:                                             <DigestValue>UdX3NPo64fNoC7c5BTaTu45ORvY=</DigestValue>
  93:                                         </Reference>
  94:                                     </SignedInfo>
  95:                                     <SignatureValue>9i+ypgIBP6F6GCs81fikfS/Sly8=</SignatureValue>
  96:                                     <KeyInfo>
  97:                                         <o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
  98:                                             <o:Reference ValueType="http://schemas.xmlsoap.org/ws/2005/02/sc/dk" URI="#uuid-5d226149-f6d5-4f95-bf27-63a2be952b57-7"></o:Reference>
  99:                                         </o:SecurityTokenReference>
 100:                                     </KeyInfo>
 101:                                 </Signature>
 102:                             </o:Security>
 103:                         </s:Header>
 104:                         <s:Body u:Id="_0" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
 105:                             <AddIntResponse xmlns="http://tempuri.org/">
 106:                                 <AddIntResult>3</AddIntResult>
 107:                             </AddIntResponse>
 108:                         </s:Body>
 109:                     </s:Envelope>
 110:                 </MessageLogTraceRecord>
 111:             </DataItem>
 112:         </TraceData>
 113:     </ApplicationData>
 114: </E2ETraceEvent>
Once again, the same process repeats for the AddDouble operation.
.SvcLog files used for the article
References:
http://msdn.microsoft.com/en-us/library/aa751795.aspx – Using Service Trace Viewer
http://msdn.microsoft.com/en-us/library/ms733025.aspx – Configuring Tracing
http://msdn.microsoft.com/en-us/library/ms732023.aspx – Service Trace Viewer Tool
http://msdn.microsoft.com/en-us/library/ms751526.aspx – Tracing and Message Logging
Published Friday, June 10, 2011 6:29 AM by nmarun

WCF Service Trace Viewer Part 1

WCF Service Trace Viewer Part 1

I hit upon this tool SvcTraceViewer.exe and found it quite interesting. Usually located at :\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools (for version .net 4.0), this tool helps you to locate an error that’s happening behind the scenes. It also gives you a better understanding of how things flow with a service.
I have this service that exposes two operation contracts – AddInt and AddDouble. On the client-side (a console app), all I do is to call these two operations. That’s it – a very simplistic application. The only variation I’m going to do is to make the first call through Basic Http Binding and the second one using WSHttp Binding. Let’s see the differences.
I have the following settings in my app.config file.
   1: 
   2: <system.diagnostics>
   3:     <sources>
   4:         <source name="System.ServiceModel" 
   5:                 switchValue="All">
   6:             <listeners>
   7:                 <add name="xmlTraceListener" />
   8:             </listeners>
   9:         </source>
  10:         <source name="System.ServiceModel.MessageLogging" 
  11:                 switchValue="All">
  12:             <listeners>
  13:                 <add name="xmlTraceListener" />
  14:             </listeners>
  15:         </source>
  16:     </sources>
  17:     <sharedListeners>
  18:         <add name="xmlTraceListener" 
  19:              type="System.Diagnostics.XmlWriterTraceListener" 
  20:              initializeData="ClientLogBasic.svclog" />
  21:     </sharedListeners>
  22:     <trace autoflush="true" />
  23: </system.diagnostics>
  24:  
  25: 
  26: <diagnostics>
  27:     <messageLogging maxMessagesToLog="10000"
  28:     logEntireMessage="true"
  29:     logMessagesAtServiceLevel="true"
  30:     logMalformedMessages="true"
  31:     logMessagesAtTransportLevel="true">
  32:         <filters>
  33:             <clear/>
  34:         </filters>
  35:     </messageLogging>
  36: </diagnostics>
A couple of things to note here. I’m using the XmlWriterTraceListener to log all the messages. All these messages will be written to ClientLogBasic.svclog file, set through the initializeData attribute. A switch value of ‘All’ means I’ll be logging a LOT of information. You can have a comma-separated list of the following trace levels – Critical, Error, Warning, Information, Verbose, ActivityTracing. You can also set the trace level to Off to turn off all tracing. See details on configuration settings here. You can have these settings on either the client- or the server-side config file.
I’ll begin by making a call to the WCF service using the basic Http binding.
   1: private static void CallWcfService()
   2: {
   3:     LearnWcfServiceClient learnWcfServiceClient = new LearnWcfServiceClient(BasicEndPointName);
   4:     //LearnWcfServiceClient learnWcfServiceClient = new LearnWcfServiceClient(WsHttpEndPointName);
   5:     int sumInt = learnWcfServiceClient.AddInt(1, 2);
   6:     double sumDouble = learnWcfServiceClient.AddDouble(1.1, 3.3);
   7:     Console.WriteLine("{0} - {1}", sumInt, sumDouble);
   8:     learnWcfServiceClient.Close();
   9: }
As expected the ClientLogBasic.svclog file gets created:
image
I open the file only to be a little overwhelmed! I have uploaded the .svclog files here so you can see what I’m talking here as you read through.
screenshot
So you see Activity tab on the left, a list of traces on the right top and the actual XML for these traces just below. An activity is nothing but a grouping of related traces. You can also view the message in a formatted way, but I prefer XML. I click on the second activity Construct ChannelFactory on the activity tab and GetChannelEndpointElement trace.
image
We see in the xml that it’s reading some of the elements of the config file - BasicHttpBinding_ILearnWcfService as the endpoint, ServiceProxy.ILearnWcfService as the contract, basicHttpBinding as the binding and the url of the endpoint along with a bunch of other information.
There another cool thing about this tool – it displays the flow graphically as well. Just double click on any activity and it’ll switch to the Graph tab and show a hierarchy of the trace flow.
image
Clicking on one of the messages, shows the details of the call to the AddInt operation. Let’s get to the Message tab.
image
There are a total of 8 messages here. Expand the left column in the log files and you’ll see that the first 4 belong to AddInt and the rest belong to AddDouble. You can see the full xml of the first message.
   1: <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
   2:     <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
   3:         <EventID>0</EventID>
   4:         <Type>3</Type>
   5:         <SubType Name="Information">0</SubType>
   6:         <Level>8</Level>
   7:         <TimeCreated SystemTime="2011-04-12T05:05:35.8170630Z" />
   8:         <Source Name="System.ServiceModel.MessageLogging" />
   9:         <Correlation ActivityID="{9fab5e4d-4608-490e-bbf0-4b1ba0393227}" />
  10:         <Execution ProcessName="ClientApplication" ProcessID="4144" ThreadID="1" />
  11:         <Channel />
  12:         <Computer>MyComputer</Computer>
  13:     </System>
  14:     <ApplicationData>
  15:         <TraceData>
  16:             <DataItem>
  17:                 <MessageLogTraceRecord Time="2011-04-12T10:35:35.8110624+05:30" Source="ServiceLevelSendRequest" Type="System.ServiceModel.Channels.BodyWriterMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
  18:                     <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  19:                         <s:Header>
  20:                             <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/ILearnWcfService/AddInt</Action>
  21:                         </s:Header>
  22:                         <s:Body>
  23:                             <AddInt xmlns="http://tempuri.org/">
  24:                                 <arg1>1</arg1>
  25:                                 <arg2>2</arg2>
  26:                             </AddInt>
  27:                         </s:Body>
  28:                     </s:Envelope>
  29:                 </MessageLogTraceRecord>
  30:             </DataItem>
  31:         </TraceData>
  32:     </ApplicationData>
  33: </E2ETraceEvent>
image
See that the Source attribute of the MessageLogTraceRecord element says ServiceLevelSendRequest (above). The Action element points to the operation contract and the AddInt element shows the two arguments that were passed to the method.
Coming to the second trace (left image), we see traces like ‘Sent a message over a channel’, ‘Received a message over a channel’ and ‘Received reply over the request channel’, giving us a visual of everything that’s going on to call the service and receive response from it. The Source attribute for this one says TransportSend.
The third trace shows the Source as TransportReceive and the fourth one show it as ServiceLevelReceiveReply. You see the full xml of the fourth trace below with the sum value of 3 as a return from the AddInt operation method.
   1: 
   2: <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
   3:         <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
   4:             <EventID>0</EventID>
   5:             <Type>3</Type>
   6:             <SubType Name="Information">0</SubType>
   7:             <Level>8</Level>
   8:             <TimeCreated SystemTime="2011-04-12T05:05:36.6061419Z" />
   9:             <Source Name="System.ServiceModel.MessageLogging" />
  10:             <Correlation ActivityID="{9fab5e4d-4608-490e-bbf0-4b1ba0393227}" />
  11:             <Execution ProcessName="ClientApplication" ProcessID="4144" ThreadID="1" />
  12:             <Channel />
  13:             <Computer>MyComputer</Computer>
  14:         </System>
  15:         <ApplicationData>
  16:             <TraceData>
  17:                 <DataItem>
  18:                     <MessageLogTraceRecord Time="2011-04-12T10:35:36.6061419+05:30" Source="ServiceLevelReceiveReply" Type="System.ServiceModel.Channels.BufferedMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
  19:                         <HttpResponse>
  20:                             <StatusCode>OK</StatusCode>
  21:                             <StatusDescription>OK</StatusDescription>
  22:                             <WebHeaders>
  23:                                 <Connection>Close</Connection>
  24:                                 <Content-Length>185</Content-Length>
  25:                                 <Cache-Control>private</Cache-Control>
  26:                                 <Content-Type>text/xml; charset=utf-8</Content-Type>
  27:                                 <Date>Tue, 12 Apr 2011 05:05:36 GMT</Date>
  28:                                 <Server>ASP.NET Development Server/10.0.0.0</Server>
  29:                                 <X-AspNet-Version>4.0.30319</X-AspNet-Version>
  30:                             </WebHeaders>
  31:                         </HttpResponse>
  32:                         <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  33:                             <s:Header></s:Header>
  34:                             <s:Body>
  35:                                 <AddIntResponse xmlns="http://tempuri.org/">
  36:                                     <AddIntResult>3</AddIntResult>
  37:                                 </AddIntResponse>
  38:                             </s:Body>
  39:                         </s:Envelope>
  40:                     </MessageLogTraceRecord>
  41:                 </DataItem>
  42:             </TraceData>
  43:         </ApplicationData>
  44:     </E2ETraceEvent>
The same process repeats itself for the AddDouble method.

There’s more in the next part.

Saturday, March 22, 2014

SSIS 2012 Parameters Model

SSIS Configuration objective is to make sure that the package can work on different environments and in SSIS 2012 this is achieved using new featured called parameters. Is this method new? Rather not, in previous version of SSIS (2005 to 2008 R2) we had variables in a package and 'package configuration' that allowed us to change variables from "outside".
The new method is nothing than break down of variables into:
  • Parameters which are:
    • Project Parameters 
    • Package Parameters
  • Variables (that stays the same but without functionality that was replaced by Parameters)
To give you a better picture of the new model look the picture below.
SSIS 2012 Parameters
The major difference between SSIS 2005 up to 2008 R2 is that the model changes from 'package configuration' to 'project configuration' and that means that we now create a project and add packages and parameters to it. Package on it's own can no longer be used (unless you use 'legacy' option). Package MUST be part of a project which undoubtedly will spark a few discussion (pros and cons) but I presume best practice will soon appear.
Coming back to the subject what we now have are Parameters and make note there are two types of parameters which are:
Project Parameters - They live outside of the package on project level and you parameterize your packages using project parameters (which you can also think like Global variables or Global Parameters). Project Parameters will most likely be used for things that change between environment but don't change on the same environment (during execution) which means that majority of it will be connection strings. 
Below is a screenshot of SSIS 2012 in SSDT that shows Project Parameters
Project Parameters
Package Parameters - We can also define Package Parameters and those live inside the package. Package Parameters work in a similar way as variable and the main difference is that when we execute a package for instance from another package we pass values to package parameters not directly to variables which in SSIS 2012 basically simplifies it in my opinion (as we don't have variables that do everything like in SSIS 2005 to 2008 R2)
Below is a screenshot of SSIS 2012 in SSDT that shows Package Parameters
Package Parameters
Note to myself.... write article about Package Parameters (In depth) and provide link here
Variables - They work inside the package and often change during execution of the package (loops etc) but they no longer have responsibility of managing more static values which now are managed by package parameters and project parameters.
 Important: There is one very important aspect I didn't mention and that is how to change parameter value depending on environment which is the key element of SSIS Configuration. The reason why I didn't mention it is that you cannot do that during development, which is a good thing I believe and you can do that during deployment (or take development values which I don't recommend) or after deployment and I will dedicate separate articles on this subject. What you can do during development is specify parameter design values and you can have collection of values for different purpose which will make development life easier. These values can be deploy as 'final' but I do not recommend it as it miss the point of having parameters.... I will write more about it soon but I thought I will give you a quick answer here.
So that is high level view about parameters in SSIS 2012. It is not intended to give you in-depth knowledge or knowledge to build projects using  new model but hopefully it will give you better understanding of the new model and we will write new articles soon that will go into more details.