Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Why WebService Access Denied

Reply
Thread Tools

Why WebService Access Denied

 
 
ad
Guest
Posts: n/a
 
      03-17-2006
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?


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBNVlA=?=
Guest
Posts: n/a
 
      03-17-2006
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?
>
>
>

 
Reply With Quote
 
 
 
 
ad
Guest
Posts: n/a
 
      03-17-2006
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" <(E-Mail Removed)> glsD:(E-Mail Removed)...
> 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?
>>
>>
>>



 
Reply With Quote
 
shijobaby shijobaby is offline
Junior Member
Join Date: Dec 2009
Posts: 7
 
      02-06-2010
If your web service anonymous authentication is


turned off you must enable that

Otherwise you have to pass username and password
 
Reply With Quote
 
shijobaby shijobaby is offline
Junior Member
Join Date: Dec 2009
Posts: 7
 
      02-06-2010
If your web service anonymous authentication is


turned off you must enable that

Otherwise you have to pass username and password
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
calling a webservice cause access denied error only from remote computer! Jj ASP .Net 1 02-18-2004 01:24 AM



Advertisments