Hi,
I posted this in the web service news group, but there is no activity in
there so I try this here instead. Hope you don't mind.
I recently took the web services certification test, and afterward I looked
at some braindump-question to see if I answered som question correct.
However, I
still don't know the correct answer and hope you can help me :) Here are 5
questions I want to know if I answered them correctly:
/Jonny
1. You create an XML Web service named TimeService. Each time TimeService is
started, it checks for the existence of an event log named TimeServiceLog.
If TimeServiceLog does not exist, TimeService creates it.
You discover that when TimeService creates TimeServiceLog, it throws a
System.Security.SecurityException. The exception includes the following
message: "Requested registry access is not allowed". You need to resolve
this problem.
What should you do?
A . Configure Inetinfo.exe to run as the local administrator user account.
B . Create an installer for TimeService, and create the new event log in the
installer code.
C . Modify the Web.config file by adding an identity element to impersonate
the LOGON user specified by Internet Information Services (IIS).
D . Modify the permissions of the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Eventlog registry key
to give full control to the IUSR_computername user account.
2. You create version 1.0.0.0 of an assembly named Assembly. You register
theassembly in the global assembly cache. Assembly consists of two .NET
Remoting objects named RemoteObject1 and RempoteObject2 These objects are
configured in the App.config file of Assembly as shown in the following code
segment:
You create an application named App that resides on a different computer
than Assembly. App references version 1.0.0.0 of Assembly. App contains code
that activates instances of RemoteObject1 and RemoteObject2 to use their
services.
Due to changes in business needs, you must update Assembly. You create
version 2.0.0.0 of Assembly, which is backward compatible, but you do not
update any information in the App.config file of Assembly. You register
version 2.0.0.0 of Assembly in the global assembly cache. You then rebuild
App.
Which version of the remote object will MyApp activate?
A . Version 1.0.0.0 of RemoteObject1; version 1.0.0.0 of RemoteObject2.
B . Version 1.0.0.0 of RemoteObject1; version 2.0.0.0 of RemoteObject2.
C . Version 2.0.0.0 of RemoteObject1; version 1.0.0.0 of RemoteObject2.
D . Version 2.0.0.0 of RemoteObject1; version 2.0.0.0 of RemoteObject2.
3. You are creating a serviced component named UserManager. UserManager adds
user accounts to multiple transactional data sources.
The UserManager class includes the following code segment:
[Transaction(TransactionOption.Required)]
[SecurityRole("Admin")]
public class UserManager : ServicedComponent {
public void AddUser(string name, string password) { // Code to add the user
to data sources goes here. }
}
You must ensure that the AddUser method reliably saves the new user to
either all data sources or no data sources.
What should you do?
A . To AddUser, add the following attribute: [AutoComplete()]
B . To UserManager, add the following attribute:
[JustInTimeActivation(false)]
C . To the end of AddUser, add the following line of code:
ContextUtil.EnableCommit();
D . To the end of AddUser, add the following line of code:
ContextUtil.MyTransactionVote = true;
4. You are creating a serviced component named UserManager. UserManager adds
user accounts to multiple transactional data sources.
The UserManager class includes the following code segment:
[Transaction(TransactionOption.Required)] [SecurityRole("Admin")] public
class UserManager : ServicedComponent { public void AddUser(string name,
string password) { // Code to add the user to data sources goes here. } }
You must ensure that the AddUser method reliably saves the new user to
either all data sources or no data sources.
What should you do?
A . To AddUser, add the following attribute: [AutoComplete()]
B . To UserManager, add the following attribute:
[JustInTimeActivation(false)]
C . To the end of AddUser, add the following line of code:
ContextUtil.EnableCommit();
D . To the end of AddUser, add the following line of code:
ContextUtil.MyTransactionVote = true;
5. You create an XML Web service named Fulton1. You use the Debug.Assert
method in your code to verify parameter values and ranges.
You find that Service1 does not display assertion failure messages. Instead,
Fulton1 returns an HTTP 500 error message when an assertion fails. You want
to view the assertion failure messages.
What should you do?
A . Modify the Web.config file to stop the Debug.Assert method from
displaying a message box.
B . Modify the compilation element of the Web.config file by setting the
debug attribute to "true".
C . In the constructor for Fulton1, set the Debug.AutoFlush property to
false.
D . In the constructor for Fulton1, add an EventLogTraceListener object to
the Listeners property of the Debug class.