Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Why WebService Access Denied (http://www.velocityreviews.com/forums/t121768-why-webservice-access-denied.html)

ad 03-17-2006 01:46 PM

Why WebService Access Denied
 
I have a virtual which is a web service.
When I use the IP to get the web service, it return a access denied message:
http://xxx.xxx.xxx.xxx/HealthService/Service.asmx

but if I use local host, it is ok
http://localhost/HealthService/Service.asmx

I have set the virtual directory to allow anonymous. Why it still can't be
accessed?



=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBNVlA=?= 03-17-2006 02:13 PM

RE: Why WebService Access Denied
 
Most likely Windows 2003 (Not sure about XP SPs; they may do the same). Open
the machine.config file ...

Look for:
<webServices>
<protocols>
<add name="HttpSoap1.2" />
<add name="HttpSoap" />
<!-- <add name="HttpPost" /> -->
<!-- <add name="HttpGet" /> -->
<add name="HttpPostLocalhost" />
<add name="Documentation" />
</protocols>
<soapExtensionTypes>
</soapExtensionTypes>
<soapExtensionReflectorTypes>
</soapExtensionReflectorTypes>
<soapExtensionImporterTypes>
</soapExtensionImporterTypes>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
<serviceDescriptionFormatExtensionTypes>
</serviceDescriptionFormatExtensionTypes>
</webServices>

And change to:

<webServices>
<protocols>
<add name="HttpSoap1.2" />
<add name="HttpSoap" />
<add name="HttpPost" />
<add name="HttpGet" />
<add name="HttpPostLocalhost" />
<add name="Documentation" />
</protocols>
<soapExtensionTypes>
</soapExtensionTypes>
<soapExtensionReflectorTypes>
</soapExtensionReflectorTypes>
<soapExtensionImporterTypes>
</soapExtensionImporterTypes>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
<serviceDescriptionFormatExtensionTypes>
</serviceDescriptionFormatExtensionTypes>
</webServices>

NOTE: This is not wise on a production environment that is not externally
exposed to partners. Hiding the web services from non-soap calls leaves the
box harder to poke at. At default setting, a person cannot get the WSDL
through a POST or GET or test the web service. This is the reason the
settings changed for 1.1 under Windows 2003.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


"ad" wrote:

> I have a virtual which is a web service.
> When I use the IP to get the web service, it return a access denied message:
> http://xxx.xxx.xxx.xxx/HealthService/Service.asmx
>
> but if I use local host, it is ok
> http://localhost/HealthService/Service.asmx
>
> I have set the virtual directory to allow anonymous. Why it still can't be
> accessed?
>
>
>


ad 03-17-2006 06:26 PM

Re: Why WebService Access Denied
 
Thanks,
I am using dotNetFramework 2.0
I can't not find the <webServices> in the machine.config of dotNetFramework
2.0, it just in dotNetFramework 1.1

I trid copy the section to the machine.config of dotNetFramework 2.0, the
system ask me to change HttpSoap1.2 to HttpSoap12, and I did, but it also
access denied when access with IP.



"Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@comcast.netNoSpamM> ¼¶¼g©ó¶l¥ó·s»D:9CFADA9C-5769-40F6-B816-F5C59D4696C5@microsoft.com...
> Most likely Windows 2003 (Not sure about XP SPs; they may do the same).
> Open
> the machine.config file ...
>
> Look for:
> <webServices>
> <protocols>
> <add name="HttpSoap1.2" />
> <add name="HttpSoap" />
> <!-- <add name="HttpPost" /> -->
> <!-- <add name="HttpGet" /> -->
> <add name="HttpPostLocalhost" />
> <add name="Documentation" />
> </protocols>
> <soapExtensionTypes>
> </soapExtensionTypes>
> <soapExtensionReflectorTypes>
> </soapExtensionReflectorTypes>
> <soapExtensionImporterTypes>
> </soapExtensionImporterTypes>
> <wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
> <serviceDescriptionFormatExtensionTypes>
> </serviceDescriptionFormatExtensionTypes>
> </webServices>
>
> And change to:
>
> <webServices>
> <protocols>
> <add name="HttpSoap1.2" />
> <add name="HttpSoap" />
> <add name="HttpPost" />
> <add name="HttpGet" />
> <add name="HttpPostLocalhost" />
> <add name="Documentation" />
> </protocols>
> <soapExtensionTypes>
> </soapExtensionTypes>
> <soapExtensionReflectorTypes>
> </soapExtensionReflectorTypes>
> <soapExtensionImporterTypes>
> </soapExtensionImporterTypes>
> <wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
> <serviceDescriptionFormatExtensionTypes>
> </serviceDescriptionFormatExtensionTypes>
> </webServices>
>
> NOTE: This is not wise on a production environment that is not externally
> exposed to partners. Hiding the web services from non-soap calls leaves
> the
> box harder to poke at. At default setting, a person cannot get the WSDL
> through a POST or GET or test the web service. This is the reason the
> settings changed for 1.1 under Windows 2003.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ***************************
> Think Outside the Box!
> ***************************
>
>
> "ad" wrote:
>
>> I have a virtual which is a web service.
>> When I use the IP to get the web service, it return a access denied
>> message:
>> http://xxx.xxx.xxx.xxx/HealthService/Service.asmx
>>
>> but if I use local host, it is ok
>> http://localhost/HealthService/Service.asmx
>>
>> I have set the virtual directory to allow anonymous. Why it still can't
>> be
>> accessed?
>>
>>
>>




shijobaby 02-06-2010 08:25 AM

If your web service anonymous authentication is


turned off you must enable that

Otherwise you have to pass username and password

shijobaby 02-06-2010 08:26 AM

If your web service anonymous authentication is


turned off you must enable that

Otherwise you have to pass username and password


All times are GMT. The time now is 06:53 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


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