powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Помогите решить проблему с Web Service
13 сообщений из 13, страница 1 из 1
Помогите решить проблему с Web Service
    #35476471
Ахмед
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Имеется веб служба размещенная на удаленном компе на IIS 6.0. Одна из функций веб службы - вернуть Dataset заполненный данными.
У себя на компе в проекте я указываю reference к это службе, всё коннектится нормально, но когда я вызываю этот самый метод студия выдает следующую ошибку:

"Запрос HTTP не разрешен для схемы проверки подлинности клиента "Anonymous". От сервера получен заголовок проверки подлинности "Negotiate,NTLM,Digest qop="auth",algorithm=MD5-sess,nonce="33488f3a7ff8c801b61d47ef277ea034e40fcbc434c66bd4ec93ee6bed7b69596f38cd23f16114ff",charset=utf-8,realm="aero.loc"". "

Насколько я понял, что-то с авторизацией на IIS-e. В настройках IIS анонимный доступ отключен, включена проверка подлинности Windows и включена краткая проверка серверов домена с привязкой к моему домену.

Помоигте решить проблему. В инете почти ничего не нашел.
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476502
Nisus
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
а если этот метод запросить ручками из браузера он нормально отвечает?
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476532
Ахмед
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
В каком смысле? Если просто вбить адрес службы в браузере (http://webdatabase к примеру) то там появляется этот метод, при щелкании на него появляется страница с примерами SOAP 1.1 и SOAP 1.2.

P.S. Я с веб службами почти не работал, мне дали готовую службу для того чтобы я к ней законнектился.
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476646
Nisus
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
а что за тип проекта у вас - веб-сайт? Вообще уточните под какой учетной записью работает ваше приложение (string currentUserName = WindowsIdentity.GetCurrent().Name ?? Environment.UserDomainName ?? Environment.UserName;), по идее чтобы достучаться до удаленной веб-службы это должен быть доменный пользователь.
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476649
razon
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
у вас наверняка служба на WCF - надо определить какая безопасность используется (на уровне транспорта и/или сообщений) и какой тип авторизации. Приведите config службы и клиента (или код, если данные настройки задаются в коде)
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476666
Nisus
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Рекомендую для ознакомления, ситуация аналогичная, просто у вас вместо базы данных - веб-сервис - http://blog.devstone.com/aaron/2008/07/14/AccessingARemoteDatabaseInASPNETWorkingAroundTheDoubleHopConundrum.aspx
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476685
Ахмед
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Тип проекта - веб сайт.
Логично что доменный пользователь.
Перечисленные вами свойства выдают всё верно, мой домен и моя учетка.
Пробовал в веб.конфиг добавлять вот это:

Код: plaintext
1.
        	<authentication mode="Windows"/>
		<identity impersonate="true"/>

не помогло....

Код веб.конфига сервиса:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
<?xml version="1.0"?>

<configuration>



    <configSections>
      <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
            <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
            <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
            <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          </sectionGroup>
        </sectionGroup>
      </sectionGroup>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="WebDataBase.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
    </configSections>  

  
    <appSettings/>
    <connectionStrings>
        <add name="DB_Alfa0_1ConnectionString" connectionString="Data Source=AEK-350\SQLEXPRESS;Initial Catalog=DB_Alfa0.1;Integrated Security=True"
            providerName="System.Data.SqlClient" />
        <add name="DB_AlfaConnectionString" connectionString="Data Source=AEK-350\SQLEXPRESS;Initial Catalog=DB_Alfa;Integrated Security=True"
            providerName="System.Data.SqlClient" />
    </connectionStrings>
  
    <system.web>
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
        <compilation debug="true">

          <assemblies>
            <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          </assemblies>

        </compilation>
        <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
        	<authentication mode="Windows"/>
		<identity impersonate="true"/>
        <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->

      <pages>
        <controls>
          <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </controls>
      </pages>

      <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      </httpHandlers>
      <httpModules>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </httpModules>


    </system.web>

    <system.codedom>
      <compilers>
        <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
                  type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <providerOption name="CompilerVersion" value="v3.5"/>
          <providerOption name="WarnAsError" value="false"/>
        </compiler>
      </compilers>
    </system.codedom>

    <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services  7 . 0 .  It is not necessary for previous version of IIS.
    -->
    <system.webServer>
      <validation validateIntegratedModeConfiguration="false"/>
      <modules>
        <remove name="ScriptModule" />
        <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </modules>
      <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <remove name="ScriptHandlerFactory" />
        <remove name="ScriptHandlerFactoryAppServices" />
        <remove name="ScriptResource" />
        <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
             type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
             type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </handlers>
    </system.webServer>

    <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
          <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
          <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
          <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
      </assemblyBinding>
    </runtime>

<system.serviceModel>
<bindings>
  <customBinding>
    <binding name="Service1Binding">
      <transactionFlow />
      <textMessageEncoding />
      <httpTransport authenticationScheme="Ntlm" />
    </binding>
  </customBinding>
</bindings>
<client>
      <endpoint address="" binding="customBinding" bindingConfiguration="Service1Binding" contract="IService1" />
</client>
</system.serviceModel>
    <applicationSettings>
        <WebDataBase.Properties.Settings>
            <setting name="Setting" serializeAs="String">
                <value />
            </setting>
        </WebDataBase.Properties.Settings>
    </applicationSettings>
</configuration>

веб.конфиг клиента:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
	<configSections>
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				</sectionGroup>
			</sectionGroup>
		</sectionGroup>
	</configSections>
	<appSettings>
	</appSettings>
	<connectionStrings>
		<add name="DB_Alfa0.1ConnectionString" connectionString="Data Source=AEK-350\SQLEXPRESS;Initial Catalog=DB_Alfa0.1;Integrated Security=True" providerName="System.Data.SqlClient"/>
		<add name="DB_Alfa0.1ConnectionString2" connectionString="Data Source=AEK-350\SQLEXPRESS;Initial Catalog=DB_Alfa0.1;Integrated Security=True" providerName="System.Data.SqlClient"/>
	</connectionStrings>
	<system.web>
		<globalization uiCulture="ru" culture="ru-RU"/>
		<!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
		<compilation debug="true">
			<assemblies>
				<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
			</assemblies>
		</compilation>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    <authentication mode="Windows"/>
    <identity impersonate="true"/>
		<!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
		<!--в дальнейшем изменить ситуацию с validateRequet = "false" -->
		<pages theme="BasicTheme" validateRequest="false">
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			</controls>
		</pages>
		<httpHandlers>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
		</httpHandlers>
		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</httpModules>
	</system.web>
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="WarnAsError" value="false"/>
			</compiler>
			<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="OptionInfer" value="true"/>
				<providerOption name="WarnAsError" value="false"/>
			</compiler>
		</compilers>
	</system.codedom>
	<!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services  7 . 0 .  It is not necessary for previous version of IIS.
    -->
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<remove name="ScriptModule"/>
			<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</modules>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<remove name="ScriptHandlerFactory"/>
			<remove name="ScriptHandlerFactoryAppServices"/>
			<remove name="ScriptResource"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</handlers>
	</system.webServer>
	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
		</assemblyBinding>
	</runtime>
	<system.serviceModel>
		<behaviors>
			<endpointBehaviors>
				<behavior name="ClassRelationAspNetAjaxBehavior">
					<enableWebScript/>
				</behavior>
			</endpointBehaviors>
		</behaviors>
		<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
		<services>
			<service name="ClassRelation">
				<endpoint address="" behaviorConfiguration="ClassRelationAspNetAjaxBehavior" binding="webHttpBinding" contract="ClassRelation"/>
			</service>
		</services>
		<bindings>
   <basicHttpBinding>
    <binding name="Service1Soap" closeTimeout="00:01:00" openTimeout="00:01:00"
     receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
     bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
     maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
     messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
     useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
      maxBytesPerRead="4096" maxNameTableCharCount="16384" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None"
       realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
    <binding name="Service1Soap1" closeTimeout="00:01:00" openTimeout="00:01:00"
     receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
     bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
     maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
     messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
     useDefaultWebProxy="true">
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
      maxBytesPerRead="4096" maxNameTableCharCount="16384" />
     <security mode="None">
      <transport clientCredentialType="None" proxyCredentialType="None"
       realm="" />
      <message clientCredentialType="UserName" algorithmSuite="Default" />
     </security>
    </binding>
   </basicHttpBinding>
   <customBinding>
    <binding name="Service1Binding">
     <transactionFlow />
     <textMessageEncoding />
     <httpTransport authenticationScheme="Ntlm" />
    </binding>
   </customBinding>
  </bindings>
		<client>
   <endpoint address="http://localhost:1953/S.asmx" binding="basicHttpBinding"
    bindingConfiguration="Service1Soap" contract="ServiceReferenceWeb.Service1Soap"
    name="Service1Soap" />
   <endpoint address="http://webdatabase/S.asmx" binding="customBinding"
    bindingConfiguration="Service1Binding" contract="IService1" />
   <endpoint address="http://webdatabase/S.asmx" binding="basicHttpBinding"
    bindingConfiguration="Service1Soap1" contract="WebServiceGratingData.Service1Soap"
    name="Service1Soap1" />
    </client>
	</system.serviceModel>
</configuration>
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476825
Ахмед
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Я в тупике! Хоть кто-нибудь может помочь?
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476888
Фотография ХреноРедька
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
при вызове веб-службы попробуй явно задать Credentials (логин/пароль) - см. одноименное свойство у проки-класса веб-службы.
тогда все вызовы сервиса будут идти от имени одного пользователя.
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35476925
Ахмед
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Не помогло.
Поставлю вопрос по другому:
"Как мне сделать тип аутентификации NTLM для коннекта к веб службе?"
в веб конфиге у секции "endpoint" есть подсекция "identity", но я не знаю имена атрибутов чтобы записать туда что-нибудь. itellisense показыват дулю.
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35477019
Nisus
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
When you use NT LanMan (NTLM) for authentication, the service identity is not checked because, under NTLM, the client is unable to authenticate the server. NTLM is used when computers are part of a Windows workgroup, or when running an older version of Windows that does not support Kerberos authentication.http://msdn.microsoft.com/en-us/library/ms733130.aspx
Пул приложения работает под вашими правами? Что там на закладке Identity у него? Не пробовали ручками устанавливать права для потока перед вызовом службы, как это показано в примере в предыдущем моем посте?
...
Рейтинг: 0 / 0
Помогите решить проблему с Web Service
    #35478092
Ахмед
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Большое спасибо всем за помощь! Решил сделать по-проще, включил только анонимный доступ на IIS и добавил нужную учетную запись в SQL Servere для доступа к БД, всё работает.
Хотя думаю всё таки придется в будущем пользователей идентифицировать...
...
Рейтинг: 0 / 0
Период между сообщениями больше года.
Помогите решить проблему с Web Service
    #37936491
hex.style
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Возникла схожая проблема. Продолбался 6 часов к ряду!!!
Решил так:

Конфиг службы
Код: xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
  <system.web>
    <compilation debug="false" targetFramework="4.0" />
    <authentication mode="Windows"/>
  </system.web>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpEndpointBinding">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service name="AdminWCF.Actions.Modules" behaviorConfiguration="bh" >
        <clear />
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding"
                  name="BasicHttpEndpoint" contract="AdminWCF.Contracts.IModules" >
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="bh">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>



Затем включаю только анонимуса (для метаданных) и Windows-аутентификацию (для точки доступа).
Потом в пуле приложений Advanced Settings\Identity прописываю конкретного пользователя, который есть в именах входа в SQL SERVER.
В итоге: сервис запускается с пинка рендомного пользователя по его учетным данным из-под сервисного пользователя, который логинится в базу данных.
...
Рейтинг: 0 / 0
13 сообщений из 13, страница 1 из 1
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Помогите решить проблему с Web Service
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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