powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Сертификация и обучение [игнор отключен] [закрыт для гостей] / TK 70-320. Вопросы по вопросам
11 сообщений из 11, страница 1 из 1
TK 70-320. Вопросы по вопросам
    #33764269
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Как обычно провожу зачистку подозрительных вопросов.


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 TestKname, string TestKpassword){
// 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;


и ответ.

Answer: C

Explanation: The TransactionOption.Required shares a transaction, if one exists, and creates a new transaction, if necessary. We should commit this transaction at the end of AddUser with ContextUtil.EnableCommit ( ) statement.

Reference: .NET Framework Class Library, ContextUtil Methods

Incorrect Answers
A: Autocomplete is out of context here.
B: Just-in-time (JIT) activation is a COM+ service that enables you to create an object as a nonactive, context-only object. JIT does not apply here.
D: Not useful.


Так вот с тем что Required делает я еще согласен, а вот про EnableCommit, для подтверждения транзакции это уже по-моему лажа. Он всего лишь разрешит коммит, а если эксепшн приключится, то вообще не понятно что будет...

Я бы сказал A.

Кукуруз АУ!!! :-) Комментс а велкоме!
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33764589
Bigheadman
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
AutoComplete можно считать эквивалентом следующего кода:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
try
{
   //.....
   ContextUtil.SetComplete();
}
catch
{
   ContextUtil.SetAbort();
}
EnableCommit грубо говоря всего лишь разрешает сделать Commit, но не делает его.
Так что можно смело отвечать A.
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33766874
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Еще один. Но здесь все более очевидно.


You are creating an online application using C# to manage meetings for MeetingMakers Inc. This application will contain two fields: Date and Time. Which of these codes will create a unique constraint named Events for the table named Calendar?

A.
<xs:unique name=" Calendar ">
<xs:field xpath="Date" />
<xs:field xpath="Time" />
<xs:field xpath="Location" />
</xs:unique>

B.
<xs:unique name="Events">
<xs:selector xpath=".//Calendar" />
<xs:field xpath="Date" />
<xs:field xpath="Time" />
<xs:field xpath="Location" />
</xs:unique>

C.
<xs:unique name="Events">
<xs:selector xpath=".//Calendar" />
<xs:field xpath="Location" />
</xs:unique>

D.
<xs:unique name="Events">
<xs:field xpath="Calendar" />
<xs:field xpath="Time" />
<xs:field xpath="Location" />
</xs:unique>


Их ответ B. Что в общем-то правильно, теоретически, но будет три поля, вместо двух...
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33767324
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Прокомментируйте плиз!


You are preparing to deploy a serviced component named ProductAvailability. This component will be used by multiple client applications to look up the current availability of products. Some of these client applications were written by other developers and are installed on computers at other locations.
You need to maximize the security on the deployment computer. You want to configure the component’s COM+ application to run under a restricted user account named OutsideUser.

What should you do?

A. Implement the ISecurityIdentityColl interface in ProductAvailability.

B. Use the Component Services tool to manually set the Identity property of the COM+ application to OutsideUser.

C. To the ProductAvailability assembly, add the following attributes:
[assembly: ApplicationAccessControl(ImpersonationLevel = ImpersonationLevelOption.Impersonate)]
[assembly: SecurityRole(“OutsideUser”)]

D. To the ProductAvailability assembly, add the following attributes:
[assembly: ApplicationAccessControl(ImpersonationLevel = ImpersonationLevelOption.Identify)]
[assembly: ApplicationName(“OutsideUser”)]


TK - C. Думается потому что ничего не конфигурируется для компонента в приведенных примерах.
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33767327
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
автор
Your ASP.Net application using C# retrieves data from a Web service. You want to enable tracing on all but seven of the application's pages. It is important that only those pages that you select for tracing display trace information on the page.

Which actions will not contribute to the solution? (Each choice presents a part of the solution.) (Select 2 choices.)

A. Set the value of the @ Page directive's Trace attribute to true on each page that should display trace information.
B. Configure the Web.config file in your application's root directory so that the Trace element's pageOutput attribute is set to false.
C. Configure the Web.config file in your application's root directory so that the Trace element's pageOutput attribute is set to true.
D. Set the value of the @ Page directive's Trace attribute to false on the two pages that should not display trace information.
E. Configure the Web.config file in your application's root directory so that the Trace element's enabled attribute is set to true.

Answer: A, B

Explanation:
In order to display trace information on most pages in your application, you should configure your application's Web.config file so that the Trace element's enabled attribute is set to true and the pageOutput attribute is set to true. You should also set the value of the @ Page directive's Trace attribute to false on each page that should not display trace information. The application's Web.config file, which is found in the application's root directory, can enable tracing for all pages through a single setting.


Что-то мне кажется не правильно либо с вопросом либо с ответом. Если бы они предлагали выбрать 3, то тогда бы было все логично...
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33778420
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Вот еще один интересный.

Your company, SpeechTK specializes in providing speech theraphy. Your XML web services application using C# is to monitor participant’s progress week by week. Your application will analyse data on a weekly basis.

Which of the following techniques can be used to send both the previous and the current week’s results with the least amount of effort? (Select the best choice.)

A. Serialize the DataSet object as a DiffGram.
B. Send the information in two table structures in the DataSet object.
C. Add a flag field to the rows in the DataSet object to indicate which rows belong to the original route and which rows belong to the new route.
D. Serialize the DataSet object using the WriteSchema flag.


TK - A.

Explanation:
You should serialize the DataSet object as a DiffGram. DiffGram structures include both the original and current values of data held in a DataSet object. In this scenario, you could query the existing route, allow the application to update the DataSet, and then serialize the DataSet object into DiffGram format to be returned to the client application.


Мне что-то совсем не кажется что это будет простейший путь. Да, можно сделать с одной таблицей, но зачем же ее редактировать?
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33781814
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
You are a software developer at TestKing.com You create a .NET Remoting object named TestKingRemoteObject in an XML Web service named TestKingWebService. All method calls made on TestKingRemoteObject are routed to a single instance of this object. The state of TestKingRemoteObject must be maintained between method calls. You need to register TestKingRemoteObject as a well-known object provided by TestKingWebService. You want to accomplish this goal by adding code to the Web.config file of TestKingWebService.

Which code segment should you use?

A. <wellknown mode=“Singleton” type=“TestKingRemoteObject, TestKingWebService” objectUri=“TestKingWebService.rem” />

B. <wellknown mode=“Singleton” type=“TestKingWebService.TestKingRemoteObject, TestKingWebService” objectUri=“TestKingRemoteObject.rem” />

C. <wellknown mode=“SingleCall” type=“TestKingRemoteObject, TestKingWebService” objectUri=“TestKingWebService.rem” />

D. <wellknown mode=“SingleCall” type”TestKingWebService.TestKingRemoteObject, TestKingWebService” objectUri=“TestKingRemoteObject.rem” />


TK - A
Почему не указывается сборка в данном случае? Вроде дока горорит что full type name должно быть использовано. Поэтому B выглядит более логично.
Может объяснит кто?
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33781871
Bigheadman
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
А с чего вы взяли, что TK - непреложная истина? Если уж взялись за него, то советую не верить всему, что написано, а самому анализировать.

По последнему вопросу. В "А" сборка указана, но не указан неймспейс. Но его может и не быть. Про то, что класс описан в каком-то неймспейсе, в вопросе ни слова нет.
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33781940
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Вот я и занимаюсь проверкой.
Только я работаю в VS, там конечно неймспейс по-умолчанию будет как имя сборки. Это часто сбивает с толку, так как просто привык уже.
Спасибо за разъяснения!
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33786366
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
You are developing an ASP.NET application that consumes an XML Web service named AccountInformation. AccountInformation exposes a Web method named GetAccountBalance that requires encrypted user credentials to be passed in the SOAP header. AccountInformation also exposes a public class named AuthenticateUser. AuthenticateUser has two properties named Username and Password that are both defined as string. In the application, you create two local variables named encryptedUsername and encryptedPassword that you will use to pass user credentials to GetAccountBalance. You need to write code that will execute the GetAccountBalance Web method.

Which code segment should you use?

A. AccountInformation tkAccountInformation = new AccountInformation();
AuthenticateUser tkAuthenticateUser = new AuthenticateUser();
tkAuthenticateUser.Username = encryptedUsername;
tkAuthenticateUser.Password = encryptedPassword;
tkAccountInformation.AuthenticateUserValue = tkAuthenticateUser;
string accountBalance;
accountBalance = tkAccountInformation.GetAccountBalance();

B. AccountInformation tkAccountInformation = new AccountInformation();
AuthenticateUser tkAuthenticateUser = new AuthenticateUser();
tkAuthenticateUser.Username = encryptedUsername;
tkAuthenticateUser.Password = encryptedPassword;
string accountBalance;
accountBalance = tkAccountInformation.GetAccountBalance();

C. AccountInformation tkAccountInformation = new AccountInformation();
AuthenticateUser tkAuthenticateUser = new AuthenticateUser();
SoapHeaderAttribute Username = new SoapHeaderAttribute(“Username”);
Username.MemberName = encryptedUsername;
SoapHeaderAttribute Password = new SoapHeaderAttribute(“Password”);
Password.MemberName= encryptedPassword;
string accountBalance;
accountBalance = tkAccountInformation.GetAccountBalance();

D. AccountInformation tkAccountInformation = new AccountInformation();
AuthenticateUser tkAuthenticateUser = new AuthenticateUser();
tkAuthenticateUser.Username = encryptedUsername;
tkAuthenticateUser.Password = encryptedPassword;
SoapHeaderCollection tkSoapHeader collection = new SoapHeaderCollection();
tkSoapHeaderCollection.Add(tkAuthenticateUser);
string accountBalance;
accountBalance = tkAccountInformation.GetAccountBalance();


TK говорит A. Но мне кажется это лажа.
Наиболее осмысленно IMHO выглядит С, так как заголовки именно для подобных вещей задуманы. Что скажет почтенная публика?
...
Рейтинг: 0 / 0
TK 70-320. Вопросы по вопросам
    #33786372
Mike Evteev
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Посыпаю голову пеплом! TK так прав. В прокси эта проперти будет сгенерирована.
...
Рейтинг: 0 / 0
11 сообщений из 11, страница 1 из 1
Форумы / Сертификация и обучение [игнор отключен] [закрыт для гостей] / TK 70-320. Вопросы по вопросам
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]