![]() |
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? |
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? > > > |
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? >> >> >> |
If your web service anonymous authentication is
turned off you must enable that Otherwise you have to pass username and password |
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.