Изучаю базовую авторизацию.
Прошу помочь ответить на вопросы:
Как сделать так, чтобы 1 метод сервиса НЕ использовал базовую авторизацию, а остальные методы ее использовали? Такое вообще возможно?
Как убрать во всем сервисе базовую авторизацию? Я пробовал убирать serviceAuthorizationManagerType, но решения не нашел.
Спасибо.
Контракт сервиса:
[ServiceContract]
public interface IGms
{
[OperationContract]
[WebInvoke(UriTemplate = "SendSmsStatus",
Method = "POST",
ResponseFormat = WebMessageFormat.Xml)]
string SendSmsStatus(Stream postData);
[OperationContract]
[WebInvoke(UriTemplate = "SendShortNumber",
Method = "POST",
ResponseFormat = WebMessageFormat.Json)]
ShortNumberResponse SendShortNumber(ShortNumberRequest request);
//Viber-статус
[OperationContract]
[WebInvoke(UriTemplate = "SendViberStatus",
Method = "POST",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
RequestFormat = WebMessageFormat.Json
)]
SendViberStatusResponse SendViberStatus (SendViberStatusRequest request);
//test
[WebInvoke(Method = "GET",
ResponseFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "GetStatus?client={client}&password={password}&messageId={messageId}")]
string GetStatusHttpGet(string client, string password, string messageId);
}
======================================================================
Веб. конфиг:
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>
<system.serviceModel>
<client>
<endpoint address="https://webservices.bank.lan:4457/PrepaidWCF.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpsBinding_IPrepaid"
contract="prepaidWCF.IPrepaid" name="BasicHttpsBinding_IPrepaid" />
<endpoint address="https://webservices.bank.lan:4457/PrepaidWCF.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpsBinding_FZCoreModuleContract_2_1"
contract="prepaidWCF.FZCoreModuleContract_2_1" name="BasicHttpsBinding_FZCoreModuleContract_2_1" />
</client>
<services>
<service name="GmsProvider.Gms" behaviorConfiguration="ServiceBehaviour">
<endpoint address="" binding="webHttpBinding" contract="GmsProvider.IGms" behaviorConfiguration="web" bindingConfiguration="WebHttpBinding"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
<serviceAuthorization serviceAuthorizationManagerType="GmsProvider.BasicAuthorization, GmsProvider"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpsBinding_IPrepaid">
<security mode="Transport" />
</binding>
<binding name="BasicHttpsBinding_FZCoreModuleContract_2_1">
<security mode="Transport" />
</binding>
</basicHttpBinding>
<webHttpBinding>
<binding name="WebHttpBinding">
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
Помогите, пожалуйста, как реализовать scrollbar на winforms c#? Я добавила элемент на форму, но что нужно сделать, чтобы он двигался?
Мне нужно иметь два способа запуска моей программы: обычный запуск с отображением формы, и скрытый запуск без отображения формы - при запуске...
Есть запрос на выборку данных, которые отправляются в dataGrid WPF: