Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

Microsoft 70-310 Exam - Cheat-Test.com

Free 70-310 Sample Questions:

1.You are creating an XML Web service named CustomerService. This service receives an XML file of customer information in the following format:
<CustomerData>
<Customers>
<CustomerID>1234</CustomerID>
<CompanyName>Adventure Works</CompanyName>
</Customers>
<Customers>
<CustomerID>2345</CustomerID>
<CompanyName>Coho Winery</CompanyName>
</Customers>
</CustomerData>
You want to parse the XML file to build a flat file that will be used by another application. The flat file should be in the following format:
CustomerID=1234
CompanyName=Adventure Works
CustomerID=2345 CompanyName=Coho Winery
You write the following code:
Dim myXMLDoc As New XmlDocument()
myXMLDoc.Load("C:\TableSchemaXML.xml")
Dim myRootNode As XmlNode = myXMLDoc.FirstChild
Dim customerOutput As String
Dim curNode As XmlNode Dim i As Integer
You need to write the code that will parse the document and build the customerOutput string that will be used to write each row in the file.
Which code segment should you use?
A: Dim myNodeList As XmlNodeList = _
myRootNode.SelectNodes("/CustomerData/Customers")
For Each curNode In myNodeList
If curNode.HasChildNodes Then
customerOutput = ""
For i = 0 To curNode.ChildNodes.Count-1
customerOutput = curNode.ChildNodes(i).Name & _
"=" + curNode.ChildNodes(i).InnerText
' Code to write the output file goes here.
Next i
End If
Next
B: Dim myNodeList As XmlNodeList = _
myRootNode.SelectNodes("/CustomerData/Customers")
For Each curNode In myNodeList
If curNode.HasChildNodes Then
customerOutput = ""
For i = 0 To curNode.ChildNodes.Count-1
customerOutput = curNode.ChildNodes(i).Name & _
"=" + curNode.ChildNodes(i).Value
' Code to write the output file goes here.
Next i
End If
Next
C: Dim myNodeList As XmlNodeList = _
myRootNode.SelectNodes("/Customers")
For Each curNode In myNodeList
If curNode.HasChildNodes Then
customerOutput = ""
For i = 0 To curNode.ChildNodes.Count-1
customerOutput = curNode.ChildNodes(i).Name & _
"=" + curNode.ChildNodes(i).InnerText
' Code to write the output file goes here.
Next i
End If
Next
D: Dim myNodeList As XmlNodeList = _
myRootNode.SelectNodes("/Customers")
For Each curNode In myNodeList
If curNode.HasChildNodes Then
customerOutput = ""
For i = 0 To curNode.ChildNodes.Count-1
customerOutput = _
curNode.ChildNodes(i).Attributes(0).value + "=" &_
curNode.ChildNodes(i).Attributes(1).Value
' Code to write the output file goes here.
Next i
End If
Next
Answer: A

2.You are creating an XML Web service named WeatherService that provides the current weather conditions for cities around the world. Your development cycle includes three stages: development, testing, and production. In each stage, WeatherService will be deployed on a different server. For testing, you create an ASP.NET application named WeatherTest. To WeatherTest, you add a Web reference to WeatherService. You then build a user interface and add the necessary code to test the service. The WeatherService interface will not change between testing and deployment. You want to ensure that you do not have to recompile WeatherTest every time WeatherService is moved from one server to another. What should you do?
A: Each time WeatherService is moved, set the URL property of the generated proxy class to the new location.
B: Each time WeatherService is moved, set the Web Reference URL property of the generated proxy class to the new location.
C: Set the URLBehavior property of the generated proxy class to dynamic. Each time WeatherService is moved, update the appropriate key in
the Web.config file to indicate the new location.
D: Take the location of WeatherService as input to WeatherTest, and set the Proxy property of all proxy class instances to that location.
Answer: C

3.You are troubleshooting a Visual Studio .NET application that was developed by a former colleague. You find the following code segment within a large assembly:
Dim theElement As XmlElement
Dim anotherElement As XmlElement
Dim doc As New XmlDocument()
Dim theDecl As XmlDeclaration
theDecl = doc.CreateXmlDeclaration("1.0", Nothing, Nothing)
doc.AppendChild(theDecl)
theElement = doc.CreateElement("Library")
doc.AppendChild(theElement)
theElement = doc.CreateElement("Book")
theElement.SetAttribute("type", "Mystery")
anotherElement = doc.CreateElement("Title")
anotherElement.InnerText = "Book Title"
anotherElement.AppendChild(theElement)
doc.DocumentElement.AppendChild(theElement)
Which XML output is produced by this code segment?
A: <?xml version="1.0"?>
<Library />
B: <?xml version="1.0"?>
<Library>
<Book type="Mystery" />
</Library>
C: <?xml version="1.0"?>
<Library>
<Book type="Mystery">
<Title>Book Title</Title>
</Book>
</Library>
D: <?xml version="1.0"?>
<Library>
<Title>Book Title<Book type="Mystery" /></Title>
</Library>
Answer: B

4.You create a .NET Remoting object named ChatServer. ChatServer is the central server for a group of chat client applications.
Client applications send string chat messages to ChatServer. ChatServer then broadcasts each message to all registered chat client applications. ChatServer uses an HTTP remoting channel to communicate with the client applications.
The ChatServer class includes the following code segment:
' The event class code follows.
<Serializable()> _
Public Class SubmissionEventArgs
Inherits EventArgs
Public Property User() As String
' Property code goes here.
End Property
Public Property Message() As String
' Property code goes here.
End Property
' Remaining implementation goes here.
End Class
' The delegate code follows.
Public Delegate Sub SubmissionEventHandler( _
ByVal sender As Object, _
ByVal submissionArgs As SubmissionEventArgs)
' The event code follows and
' appears within the ChatServer class.
Public Event SubmissionEventHandler( _
ByVal sender As Object, _
ByVal submissionArgs As SubmissionEventArgs)
You need to write a client application that includes a class named ChatClient to communicate with ChatServer. You want ChatClient to send and display chat messages.
What should you do ?
A: Implement the IDeserializationCallback interface in ChatClient.
Implement an event handler for the Submission event.
B: Derive ChatClient from System.Object.
Implement the ISerializable interface.
Implement an event handler for the Submission event.
C: Implement the ISerializable interface in ChatClient.
Implement an event handler for the Submission event.
Host ChatClient in Internet Information Services (IIS) by using a Web.config file.
D: Derive ChatClient from MarshalByRefObject.
Implement an event handler for the Submission event.
Configure ChatClient to listen on an HttpChannel.
Answer: D

5.Your company provides a credit card processing application for its customers. The current application supports only computers that run on a Microsoft Windows operating system.
You are asked to rewrite the current application as a .NET application. This .NET application does not need to be backward compatible with the current application.
You must ensure that this new application meets the following requirements:
Must support asynchronous processing.
Must be able to pass data through firewalls.
Must pass only SOAP-compliant formatted data validated by using an XSD schema.
Must not be limited to client computers running on a Microsoft operating system.
You want to accomplish this task by using the minimum amount of development effort.
Which type of .NET application should you use?
A: Windows service
B: XML Web service
C: serviced component
D: .NET Remoting object
Answer: B

6.You create a strongly typed DataSet object named customerDataSet. This object contains a single DataTable object named Customers. Customers has a column named CustomerID that contains a unique identifier for each row in Customers. You want to add a primary key to Customers. Which code segment should you use?
A: <xs:key name="CustomerKey" msdata:PrimaryKey="true">
<xs:selector xpath=".//Customers" />
<xs:field xpath="CustomerID" />
</xs:key>
B: <xs:element name="CustomerID" type="xs:string" msdata:PrimaryKey="true"/>
C: <xs:key name="CustomerKey">
<xs:selector xpath=".//Customers" />
<xs:field xpath="CustomerID" />
</xs:key>
D: <xs:unique name="CustomerKey">
<xs:selector xpath=".//Customers" />
<xs:field xpath="CustomerID" />
</xs:unique>
Answer: A

7.You are using Visual Studio .NET to develop an application that uses a non-COM DLL named UsefulFunctions.dll. This DLL is written in unmanaged code.
The DLL contains a function that parses a string into an array of string words and an array of numbers. A call to the function includes the following pseudocode:
input = "A string with 6 words and 2 numbers"
words = Nothing
numbers = Nothing
Parse(input, words, numbers)
After execution, words contains all string words found in input and numbers contains all integers found in input. You need to enable your application to call this function.
Which code segment should you use?
A: Declare Function Parse Lib "UsefulFunctions.dll" _
(ByVal input As String, ByVal words() As String,
ByVal numbers() As Integer) As Integer
B: Declare Function Parse Lib "UsefulFunctions.dll" _
(ByVal input As String, ByRef words() As String,
ByRef numbers() As Integer) As Integer
C: Declare Function Parse Lib "UsefulFunctions.dll" _
(ByRef input As String, ByVal words() As String,
ByVal numbers() As Integer) As Integer
D: Declare Function Parse Lib "UsefulFunctions.dll" _
(ByRef input As String, ByRef words() As String,
ByRef numbers() As Integer) As Integer
Answer: B

8.You are developing an application that loads two DataReader objects from a Microsoft SQL Server database. The DataReader objects are named customersDataReader and productsDataReader.
The customersDataReader object is loaded from the Customers table. The productsDataReader object is loaded from the Products table.
You create a SqlCommand object named myCommand and a SqlConnection object named myConnection. You write the following code segment. (Line numbers are included for reference only.)
01 myCommand.Connection = myConnection
02 Dim customersDataReader As SqlDataReader
03 Dim productsDataReader As SqlDataReader
04 myCommand.CommandText = "SELECT * FROM Customers"
05 myConnection.Open()
06 customersDataReader = myCommand.ExecuteReader
07 ' Code to process the data reader goes here.
08 ' Insert new code.
09 myCommand.CommandText = "SELECT * FROM Products"
10 productsDataReader = myCommand.ExecuteReader
11 ' Code to process the data reader goes here.
You run the application and an exception is thrown on line 10. To correct the problem, you need to insert additional code on line 08.
Which code segment should you use?
A: myCommand.ResetCommandTimeout()
B: myCommand.Dispose()
C: customersDataReader.NextResult()
D: customersDataReader.Close()
Answer: D

9.You create an XML Web service named WeatherService. This service contains a Web method named RetrieveWeather. RetrieveWeather takes as input a city name and returns the current weather conditions for that city. You need to provide callers of this service with the URL they need to issue an HTTP-GET against WeatherService. Which URL should you provide?
A: http://ServerName/AppPath/WeatherService.asmx/cityname=somecity
B: http://ServerName/AppPath/WeatherService.asmx/RetrieveWeather?cityname=somecity
C: http://ServerName/AppPath/WeatherService/RetrieveWeather.asmx?cityname=somecity
D: http://ServerName/AppPath/WeatherService/RetrieveWeather?cityname=somecity
Answer: B

10.You create an XML Web service named PhoneService that returns telephone information to its customers. You configure the Web.config file and Internet Information Services (IIS) to use Basic authentication to authenticate calls to the Web service.
You are now creating a Windows-based application named MyWinApp to test PhoneService. To MyWinApp, you add a Web reference to PhoneService. You add a Windows Form named Form1 to MyWinApp.
You write the following code segment in the Form1_Load event. (Line numbers are included for reference only.)
01 Dim phoneService As New MyService.PhoneService()
02 Dim phoneNumber As String
03 ' Insert new code beginning here.
04 phoneNumber = phoneService.GetPhoneNumber("Alex")
You run MyWinApp. However, when line 04 executes, an exception is thrown indicating that access is denied. You need to add code beginning on line 03 to ensure that MyWinApp runs without exceptions.
Which code segment should you use?
A: Dim credCache As New CredentialCache()
phoneService.Credentials = credCache
B: Dim credCache As New CredentialCache()
credCache.Add(New Uri(phoneService.Url), "Basic", New _
NetworkCredential(myUser, userPassword))
phoneService.Credentials = credCache
C: Dim credCache As New CredentialCache()
Dim creds As New NetworkCredential()
credCache.Add(New Uri(phoneService.Url), userPassword, _
creds)
phoneService.Credentials = creds
D: Dim credCache As New CredentialCache()
Dim creds As New NetworkCredential()
credCache.Add(New Uri(phoneService.Url), "Basic", creds)
phoneService.Credentials = credCache
Answer: B


© 2014 Cheat-Test.com, All Rights Reserved