I am trying to build a desktop application that uses client application services to authenticate users through an ASP.Net MVC web app. The trouble is I can't seem to get the value for "Authentication service location" correct. It has something to do with the fact that I cannot find Authentication_JSON_AppService.axd when I browse to the default URL which is http://localhost55555/Authentication_JSON_AppService.axd.
Please can somebody help me implement this correctly.
Add this to your web.config:
<system.web.extensions>
<scripting>
<webServices>
<authenticationService enabled="true" requireSSL="false"/>
</webServices>
</scripting>
</system.web.extensions>
Also check your web.config for:
<httpHandlers>
....
<add verb="*" path="*_AppService.axd" validate=...
....
Related
I've created a web service, using vs 2017, .net 4.61. The web service works like a charm when I browse from the server using iis, but if I test on my local machine, the invoke button disappears.
I've tried adding in the following code, just above the section in the web.config file -
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
but I get an error "The configuration section 'webServices' cannot be read because it is missing a section declaration".
Where am I going wrong?
The following was added after the connectionStrings section -
<system.web>
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" />
<webServices>
<protocols>
<add name="HttpSoap12"/>
<add name="HttpSoap"/>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
My .asmx web services is accessible to outside. So anybody can see methods by access url. Is there anyway to hide those methods to see outside, but accessible to project?
suggestions please.
To disable the documentation protocol ( hide The operations that are supported , The parameters that each operation accepts, The type of data that should be passed in those parameters ) for Web services follow any one of these 2 steps
add this in ur web.config
<system.web>
<webServices>
<wsdlHelpGenerator href="helpPage.aspx"></wsdlHelpGenerator>
</webServices>
</system.web>
Use following in web.config
<system.web>
<webServices>
<protocols>
<remove name="HttpPost" />
<remove name="HttpGet" />
<remove name="Documentation"/>
</protocols>
</webServices>
</system.web>
SOURCE - http://forums.asp.net/t/1185735.aspx
I have a web application which talks to a local service (also mine) and produces results from the RESTful calls.
I have deployed the web application through IIS 7 on my system.
So far it looks fine, except that I am not able to perform POST operations, they just seem like NOP's.
Although, when I install VS 2012 on the machine the POST operations start working. I am not sure what exact thing the VS 2012 install sets which causes the POST operations to work.
Any hints?
You have to enable POST operations in your web.config file. A simple implementation is demonstrated below
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" type="System.Web.Handlers.TransferRequestHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
Make sure to inlcude this in your config file:
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
This is link which is explaining in detail, the problem i am facing right now.
I am getting a frequent exception whenever a call made to my web services. It returns appropriate results but still complaining about URL format.:-
Request format is unrecognized for URL
unexpectedly ending in
/WebServiceMethod
So what do you suggest guys?
Thanks.
There is quite a common issue that causes this error, that can easily be fixed by adding
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>
...to web.config. Hopefully that fixes it for you.
I have a webservice # http://recpushdata.cyndigo.com/Jobs.asmx but I'm not able to access it though I am adding it as a WebReference properly.
Any Help would be great.
AFAI can see, the asmx page has server errors, so you will not be able to access it.
Contact the admin of the web service to fix the errors.
Do you mean you are getting the "The test form is only available for requests from the local machine." error when accessing a method?
If so, you need to add the following into your <system.web> part of your web.config
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
This enables you to access the method from the local machine