About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Wednesday, September 27, 2006

BizTalk Questions: Migrating BTS 2002 to BTS 2004

Well, I'm starting to read a article on migrating BT2002 to BT2004 and seen these questions and answers.

What is a promoted property?


Property promotion enables you to flag schema nodes at design time for promotion to the MessageBox at run time. In addition to any custom metadata you explicitly define by promoting properties, BizTalk Server 2004 has several pre-existing properties that it tracks by default. These pre-existing properties are not defined by instance schemas.


What is a binding file?


Binding files are shortcuts so that you can bind once using the BizTalk Explorer, export that binding, and then import it when you need to assign the binding subsequent times. For example, if you install and deploy your development environment and save a binding file, when it is time to go into production, you can script the Deployment Wizard and specify the binding file to use to create the bindings for the ports. For messaging migration, the Migration Wizard only generates one binding file for the send or receive locations in a solution.


Can I have multiple schemas with the same root node?


No. The messaging engine relies on the root node to resolve an XML instance to a schema at run time. (This is possible in BizTalk Server 2002.)


Can I add an orchestration within my migration project?


Yes, it is possible, but not recommended because you have to manually create a send/receive port to/from an orchestration, thereby complicating the migration of your messaging solution.


Is it possible to create an orchestration that receives a non-XML message (a binary large object (BLOB) for instance) through a pipeline with a custom disassembler and promote properties in the blob?


You can pass type-less [aka: un-type] messages through orchestrations by declaring them as an XmlDocument. If you want to retrieve their data, you need to pass them to a .NET object as XLANGPart/XLANGMessage and call part.RetrieveAs(typeof(Stream) ); by using part.LoadFrom( myStream ), you can also construct non-XML messages in an orchestration.


How do I create a dynamic send port?


You can create a dynamic send port either using BizTalk Explorer or within an orchestration:

BizTalk Explorer – Create the port using BizTalk Explorer, and then assign values to the transport properties in BizTalk Editor using the global property schema. You can then select the appropriate schema from references. By default, BizTalk Server 2004 references Microsoft.BizTalk GlobalPropertySchema. Values to the transport properties come from your document. You need to promote elements from your schema using the global property schema.

Orchestration – You can create dynamic ports in an orchestration, and, after you deploy it, the port is accessible from BizTalk Explorer. In the orchestration, you need to assign the address (transport) using an Expression shape.


Will the Migration Wizard migrate custom script functoids?


No. Any maps that are migrated that contain custom script functoids need to be opened and functoids re-coded.


Will the Migration Wizard migrate my queue receive functions?


Yes. BizTalk Server supports all types of receive functions including BizTalk message queuing (MSMQ) file receive. BizTalk Server supports the conventional HTTP receive function, but not the HTTP file receive function because it has no meaningful use in the product.


Will the Migration Wizard migrate my pre-processor?


No. You must update your project by manually migrating any components such as pre-processors not migrated by the Migration Wizard.


Will the Migration Wizard migrate my channel routing and filter configurations?


No, with one exception. BizTalk Server 2004 automatically migrates routing and filtering configurations for channels that use dynamic routing or filtering. Custom routing done in a channel requires that you promote the properties and create the filters.


Will the Migration Wizard migrate orchestrations?

No. The Migration Wizard only migrates the following items.
  • BTS 2002 document definitions to BTS 2004 schemas

  • BTS 2002 maps to BTS 2004 maps

  • BTS 2002 receive functions to BTS 2004 receive locations

  • BTS 2002 ports and channels to BTS 2004 ports and pipelines

  • BTS 2002 port groups (distribution lists) to BTS 2004 send port groups


The content in this section is provided by Ben Goeltz, Brandon Gross, and Stephen Roger of Equarius, Inc. For more information about Equarius, Inc., see http://go.microsoft.com/fwlink/?LinkId=26941, published in September 2004.

Monday, September 25, 2006

MS ASP.Net Assessment Question: Comparing DataSet Tables

You are using the DataSet designer to create a DataSet. The DataSet contains two related tables. You create a table named Products. Products contains a VendorID column that is not unique. You also create a table named Vendors. Vendors contains a VendorID column that is the primary key.

You need to create a relationship between the two tables. Every value in the Product table's VendorID column must have a corresponding value in the Vendor table's VendorID column.

What should you do?

A)Drag a Relation object onto the designer. Set the parent table to Products. Set the child table to Vendors. Select VendorID as the column for both tables. Click Both Relation and Foreign Key Constraint.

B)Right-click the VendorID column on the Vendors table. Click Set Primary Key.

C)Drag a Relation object onto the designer. Set the parent table to Vendors. Set the child table to Products. Select VendorID as the column for both tables. Click Foreign Key Constraint Only.

D)Drag a Relation object onto the designer. Set the parent table to Products. Set the child table to Vendors. Select VendorID as the column for both tables. Click Foreign Key Constraint Only.

E)Drag a Relation object onto the designer. Set the parent table to Vendors. Set the child table to Products. Select VendorID as the column for both tables. Click Relation Only.

A) Product shouldn't be the parent table.
B) Won't solve the relationship problem.
C) Best answer, by setting the restraints, this could be used to enforced the relationship rules, so that it enforces rules about how updates and deletes to related tables are propagated.
D) Products shouldn't be the parent table.
E) There is no relation only contraint.

MS ASP.Net Assessment Question: Validate Email Address

You create a Web Form that enables users to confirm their e-mail addresses.

You need to validate that users type e-mail addresses on the Web Form and that the e-mail addresses exist in a database.

What should you do?

A) Configure a RequiredFieldValidator control, a RegularExpressionValidator control, and a CustomValidator control.
B) Configure a RegularExpressionValidator control.
C) Configure a CompareValidator control.
D) Configure a RequiredFieldValidator control and a RegularExpressionValidator control.

A)Best Answer, by having the controls use for checking for populating textboxes and valid email address, then you will have to use the custom validator to check if both textboxes are also similar.
B)Wrong, since the regular expression validator doesn't check unless data has been entered into the textbox.
C)Wrong, only compares two textboxes, won't check if they are correct.
D) Wrong, would check for populate field and correct format for email, but not if two textboxes are similar.

MS ASP.Net Assessment Question: Web and Mobile pages.

You create a Web application. The Web application has 10 pages that only mobile devices access. It also has 25 pages that only standard Web browsers access.

You need to implement the Web application by using the minimum amount of custom code.

What should you do?

A) Create all Web pages from the System.Web.UI.Page base class. Create custom device adapters for ASP.NET server controls.
B) Create all Web pages from the System.Web.UI.MobileControls.MobilePage base class. Add controls from the Mobile namespace.
C) Create all Web pages from the System.Web.UI.Page base class and use a master page.
D) Create a set of pages from the System.Web.UI.Page class. Then create a set of pages from the System.Web.UI.MobileControls.MobilePage base class.

A) To much work, and don't know if it would work.
B) Easiest, would generate HTML if web pages and WML/HTML for mobile devices.
C) Wrong, most mobile devices can not display HTML, only WML.
D) Would work, but it might be take to much work compared to B.

MS ASP.Net Assessment Question: Giving permissions

You develop a Web application. The Web application accesses resources. You create a Microsoft Windows(R) account named AppUser. You grant AppUser appropriate permissions to the resources.

You need to configure the Web application so that it always runs in the context of the AppUser account.

Which code segment should you use?

A)<identity
impersonate="true"
userName="CONTOSO\AppUser"
password="pwd"/>
B)<appSettings>
<add key="userName" value="CONTOSO\AppUser"/>
<add key="password" value="pwd"/>
</appSettings>
C)<identity
impersonate="false"
userName="registry:HKLM\Software\AspNetProcess,Pwd"
password="registry:HKLM\Software\AspNetProcess,Name"/>
D)<identity
impersonate="false"
userName="registry:HKLM\Software\AspNetProcess,Name"
password="registry:HKLM\Software\AspNetProcess,Pwd"/>

A) This would give the user the appropriate permissions on the account.
B) This is more like a global variable that can be used throughout the asp.net pages. For example, setting the database connection information in the web.config.
C & D) Well to impersonate you will need it to be true, and these lines actually save the information to the registry. This is good for storing the user's name and password for the site.

Saturday, September 23, 2006

MS ASP.Net Assessment Question: Constant deployment of a web page.

You deploy an intranet Web application that is updated daily.

After performance testing, you decide to precompile the Web application to improve page-loading speed. Currently, the source files are deployed with the Web application for ease of maintenance.

You need to precompile the Web application by using the minimum amount of administrative effort.

What should you do?

A) Create a Web Setup project.
B) Create a batch file that uses MSBuild.exe.
C) Use the Copy Web tool.
D) Load the following URL into a Web browser.
http://localhost/mywebsitename/precompile.axd

A: The web setup project is a great solution when you want to import and deploy to a server, but there are alot of step and seems to be other simpiler, quicker ways.
B: MSBuild.exe will build the project. This would work as long as the IIS and VS.Net are on the same server.
C: The copy web tool copys a website to another location on a different server, for example. This of course doesn't precompile, and would be ok as long as there is nothing complicated in the design. However, if you think your website is going too slow, then this would not be the answer.
D: This will precompile the website and give a message if successful. This seems to be the best answer. This might not always be the best solution: http://dotnetgeek.blogspot.com/2004/10/pre-compilation-in-aspnet-v11.html

Friday, September 22, 2006

SQL Interview Questions: Definitions

Questions:
1) What is a SARGABLE predicate?
2) What is DAS? What is NAS? What is a SAN? Name the two main types of SAN networks. What is the common name for the device used to interface to a SAN?
3) What is a LUN? How is it used with a SAN?
4) What is a RAID? What RAID format is the recommended best practice for SQL Server, and why?
5) What is an INSTEAD-OF trigger used for?
6) What is a LOB?





Answers?:
1) Predicates that do searching, like Year > 2000.
2) Direct Attached Storage, Network Attached Storage, Storage Area Network, Fibre Channel and iSCSI, Host Bus Adapter.
3) Logical Unit Number , Each device(or LUN) on the storage area network (SAN) is "owned" by a single computer (or initiator)
4) RAID (Redundant Array of Independent Disks). A collection of disk drives that offers increased performance and fault tolerance. There are a number of different RAID levels. The three most commonly used are 0, 1, and 5. Microsoft recommends a RAID that would provide the best write performance. For each write request a RAID0 would write once, RAID1 or RAID10 would write twice, and RAID5 would write 4 times. RAID 0 is never recommended, so this leaves RAID10 as the recommended.

Here are the RAIDs:
Level 0: striping without parity (spreading out blocks of each file across multiple disks).
Level 1: disk mirroring or duplexing.
Level 2: bit-level striping with parity
Level 3: byte-level striping with dedicated parity. Same as Level 0, but also reserves one dedicated disk for error correction data. It provides good performance and some level of fault tolerance.
Level 4: block-level striping with dedicated parity
Level 5: block-level striping with distributed parity
Level 6: block-level striping with two sets of distributed parity for extra fault tolerance
Level 7: Asynchronous, cached striping with dedicated parity

5) There are 3 types of triggers: BEFORE, AFTER and INSTEAD OF. BEFORE is used to affect the row before the trigger event executes. AFTER is used to trigger actions are activiated for the affected rows. INSTEAD OF is used to triggers its action for each row in the affected row instead of using the trigger event.

6) Locator OBject.

SQL Interview Questions:

Questions:
1) What is the name of the SQL Server query language?
2) What is the difference between DML and DDL?
3) Name the four main types of DML Query operations.
4) Name three reasons to use a stored procedure.
5) What is the difference between a stored procedure and an extended stored procedure? Where is an extended stored procedure stored?
6) What is the difference between "Truncate" and "Delete From"?
7) What is a SQL Server Page, and how is it used? How big is a page? How much data space is available on each SQL Server Page?


Answers:
1) Transact-SQL (used by Microsoft and Sybase)
2)
DDL is Data Definition Language statements. Some examples:

CREATE - to create objects in the database
ALTER - alters the structure of the database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
COMMENT - add comments to the data dictionary
GRANT - gives user's access privileges to database
REVOKE - withdraw access privileges given with the GRANT command

DML is Data Manipulation Language statements. Some examples:

SELECT - retrieve data from the/a database
INSERT - insert data into a table
UPDATE - updates existing data within a table
DELETE - deletes all records from a table, the space for the records remain
CALL - call a PL/SQL or Java subprogram
EXPLAIN PLAN - explain access path to data
LOCK TABLE - control concurrency

3) From above most popular are Select, Insert, Update and Delete.

4)
Encapsulation - changing the inner implementation as often you like.
Security - secured at a database level, and help prevent SQL Injection attacks.
Performance - Improving network traffic, etc..

5)Extended store procedure is accessed as though it was a compiled SQL program. They are not written in Transact-SQL, they reside in DLLs.

6)
Truncate is DDL and drops all rows no ROLLBACK possible, no WHERE clauses possible. Truncate drops blocks created for the table without erasing the definition of the table, delete just the content of those blocks. Aditional to this, clustered tables cannot be truncated. DELETE is DML and uses various memory structures allowing ROLLBACK and WHERE clauses.

DELETE from table_name where... ;
TRUNCATE table table_name;

7) Pages exist to store records. A database page is an 8192-byte (8KB) chunk of a database data file. They are aligned on 8KB boundaries within the data files, starting at byte-offset 0 in the file. Pages are the basic unit of IO that SQL server uses. 8060-bytes are used for storing data.

MS ASP.Net assessment Question: Verify XML from Schema

You load an XML document into an instance of the XmlDocument class. You add elements to it.

You need to validate the changes that you made to the XML document against a schema. You do not want to create a new instance of the Document Object Model (DOM).

What should you do?

A) Create an XmlNodeReader by using the XML document. Set the validation settings on the XmlReaderSettings object. Create a validating reader that wraps the XmlNodeReader object.
B) Save the contents of the XML document to the file system. Create a new instance of the XmlDocument class. Call the Load method, and pass in the file path of the recently modified XML document.
C) Create an XmlNodeReader by using the elements of the XML document that changed. Set the validation settings on the XmlReaderSettings object. Create a validating reader that wraps the XmlNodeReader object.
D) Save the contents of the XML document to a string. Create a new instance of the XmlDocument class. Call the LoadXml method, and pass in the string representation of the recently modified XML document.

A- seems to be correct, the XmlReaderSettings allows for setting the schema to be used and you can then just use a XmlReader that would use that. I am assuming that the XmlNodeReader could do the same.
B- would work, but seems excessive amount of time to accomplish.
C- Same as A, but only looks at the newly created nodes, this seems to be the quickest. The XmlNodeReader is suppose to keep track of where in the schema the current not would be referencing.
D- inefficient, holding xml in string is probably not the best choice.

A good way of doing this was found on MSDN: http://support.microsoft.com/kb/318504/

MS ASP.Net Assessment Question: Using RequiredFieldValidator

You create a Web Form. The Web Form contains a text box that has the ID txtName. The Web Form also contains a button named btnSave.

You need to use the RequiredFieldValidator control to ensure that the text box contains a value before it is submitted to the server.

What should you do?

A) Set the RequiredFieldValidator control's ControlToValidate property to txtName.
B) Set the RequiredFieldValidator control's InitialValue property to txtName.Text.
C) Set the RequiredFieldValidator control's EnableClientScript property to False. Add code to the form's btnSave_Click event that checks whether the text box contains a value. If it does not, set the RequiredFieldValidator's IsValid property to False.
D) Set the text box's CausesValidation property to True. Set its ValidationGroup to the ID of the RequiredFieldValidator control.

A - obvious answer, the ControlToValidate tells what control it will be checking to see if a value exist.
B - Wrong, sets the inital value to what is in the textbox.
C - kinda wrong, since you are setting the EnableClientScript to false, it would only check during the postback event that is thrown from the button. It might show you that the field is required or not only during postback though.
D - kinda wrong, this is better used on webcontrols that are not easily validated like a set of radio buttons.

Thursday, September 21, 2006

MS ASP.Net Assessment Question: Specify for browser type.

You create a Web Form. The Web Form will be viewed by both mobile and desktop browsers. You add a Label control to the page. You use the following code segment.



When mobile browsers view the page, the Label must render "Name" instead of "Enter Your First Name."

You need to ensure that the Label renders correctly.

What should you do?

A) Add the following XML segment to Ie.browser. <capability name="mobile" value="true" />
B) Use device filters to specify alternate text in the Label definition.
C) Create a new file named All.browser, and add it to the browser's directory. Specify browser capabilities in All.browser.
D)Add the following attribute to the Label. EnableTheming="True"

A - Just states that IE can handle mobile, but don't know if capability is an actual tag.
B - I would think a device filter would be easy, by just checking for WML
C - Creating a All.browser will allow for the page to specify how it is render based on the browser used by the user, but don't think it would allow small cosmetic changes.
D - EnableTheming would just use the theme for that page.

Found this on a 2004 MSDN article which would be nice to use instead:
<asp:label runat="server" text="some browser" IE:text="any IE browser"
IE5:text="the IE 5 browser" PIE:text="the Pocket PC browser" />

Wednesday, September 20, 2006

MS ASP.Net Assessment Question: Cancelling a logon event.

You create a Web Form. The Web Form allows users to log on to an application. You include a Login control named Login1. You want to be able to cancel the logon process when a user clicks the Log on button in the Login1 control.

You need to write code in one of Login1's event handlers to cancel the logon process.

What should you do?

A)Write code in the Login1_Load event handler.
B)Write code in the Login1_LoginError event handler.
C)Write code in the Login1_LoggedIn event handler.
D)Write code in the Login1_LoggingIn event handler.
E)Write code in the Login1_Authenticate event handler.


A is wrong since there is no Load event for the Login Control.
B is wrong since this only occurs when the login event throws an error.
C is wrong since the user is logged into the site and is authenticated.
D is probably the best answer since the process of logging on is still taking place and authentication has not occured yet.
E is wrong because the user would have already been authenicated by then.

MS ASP.Net Assessment Question: Store custom events in a database.

You manage a remote Web site that is experiencing random errors.

You need to implement an event tracking process that enables custom events to be stored in a database.

What should you do?

A) Log a message into a MessageQueue.
B) Implement ICallbackEventHandler.
C) Derive a class from WebBaseEvent.
D) Derive a class from EventInstance.

A, the MSMQ allows for communication over networks and allows server-side applications running within ASP.NET to use MSMQ. Storing messages into a database can be done with MSMQ.

B is wrong because ICallbackEventHandler is used for calling codebehind from a javascript function.

C the WebBaseEvent allows the monitoring of performance of an app, diagnose failing apps and/or systems and appraising significant events during the lifecycle of a the given app. Using SqlWebEventProvider as your event provider and inherit from the WebBaseEvent to customize them if you wanted.

D) is wrong. EventInstance is for 3.0, not 2.0. Allows for writing messages based on the localized language on the machine and writes the entry to the event log.

So it could be A or C (IMO), but I would take the guest of C in this case.

MS ASP.Net Assessment Question: Extract data from XML Node.

You have an application that reads the following XML document with an instance of the XmlReader class.
<bookstore>
<books>
<book genre="'reference'" id="'23'">
<title>World Atlas</title>
<author status="bestseller">
<first-name>Joe</first-name>
<last-name>Worden</last-name>
</author>
<price>8.99</price>
</book>
</books>
</bookstore>

You advance the XmlReader to the author XmlNode.
You need to extract the values of the author XmlNode and all of its children as a string.
What should you do?

A) Use the ReadInnerXml method of the XmlReader.
B) Use the ReadOuterXml method of the XmlReader.
C) Use the ReadString method of the XmlReader.
D) Use the Value property of the XmlReader

A would be wrong since it would only get the children information.
B is correct since it would give the children tags and the current start tag.
C would return a string, but only the data up to the first end tag.
D this would only return the attribute of the author in this case.

MS ASP.Net Assessment Questions: Setting cursor inside textbox on page loading.

You are developing a Web Form. The Web Form allows users to insert personal information.
You need to set the cursor inside the given name text box when the Web Form is first displayed.
What should you do?

A) Call the SetFocus method of the Page inside the text box control's Init event.
B) Set the text box control's TabIndex property to 0.
C) Call the Focus method of the text box control inside the page load event.
D) Set the text box control's Enabled attribute to True inside the form's source view.

My answer would be C, since it just makes sense to set focus to the control during the page_load event.

A is wrong (IMO): because SetFocus is not a defined method and the Page_Init only initializes the page when it is first called. The Page_Load event is then called once the request has been processed, and all of the controls are updated.

B is wrong because the TabIndex only tells what order of the controls on the page are sequentially access when the tab button is pressed.

D is wrong because setting a control to enabled only allows the user to enter information into that control.

Sunday, September 10, 2006

Kerberos

Well, I don't know much about Kerberos other then that it allows single authentication within a system. So here are some helpful websites to keep in mind:

http://www.hitmill.com/computers/kerberos.html

http://www.microsoft.com/technet/prodtechnol/windows2000serv/deploy/confeat/kerberos.mspx

http://support.microsoft.com/?id=319723

Friday, September 08, 2006

An Interview Question: Whats the difference between an EXE and DLL?

The distinction between EXE and DLL files is entirely one of semantics. They both use the exact same PE [Portable Executable] format. The only difference is a single bit that indicates if the file should be treated as an EXE or as a DLL. Even the DLL file extension is artificial. You can have DLLs with entirely different extensions—for instance .OCX controls and Control Panel applets (.CPL files) are DLLs.
-- Matt Pietrek

Thursday, September 07, 2006

VI Search Engine

Ok, this is very cool, especially using the insert and deleting of results, too bad it doesn't support ex commands so I can search within the results. Well here is the link:

http://www.visearch.com/

Lunch started out innocently enough for Snap.com colleagues Brad Haugaard, Joe Chen, Ken Yeh. While discussing Snap's very visually oriented search engine, they collectively wondered, "What about people who don't really care about pictures?"

Somebody said, "How about 'visearch'? We could combine a vi editor with a search engine."

The three mused that you could move up and down with the "j" and "k" keys. You might also delete bad listings with "dd" or insert comments into the listing with an "i".

With suggestions from Haugaard and Yeh, Chen programmed a working system over the next few weeks. Chen and Yeh are both software engineers, while Haugaard is a customer service manager.
-- from http://www.linuxplanet.com/linuxplanet/reviews/6306/1/