Error 403.14 when installing WebService on IIS7 - web-services

I try to install my WebService on IIS7, but I get this error:
HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory
on IIS5 I know how to do it, can I get any direction ?

You should use the correct URL, such as http://localhost/somepath/someservice.asmx (or .svc) If you don't specify the service part, of course you get 403.14.

Related

django-rest-framework-social-oauth2: error 400 - redirect_uri_mismatch

I've been trying to add google login to my django app following this tutorial:
https://github.com/RealmTeam/django-rest-framework-social-oauth2
By following exactly the instructions, everything works fine in local.
However, when I try to replicate the same on the server, I get the following error on the redirect page of the login:
Error 400: redirect_uri_mismatch
redirect_uri: http://localhost:8000/auth/complete/google-oauth2/
What is strange to me is, in my google developer console, I have set up the correct redirect url in my app, as follows:
https://mydjangoapp.com/auth/complete/google-oauth2/
And I have also put 'mydjangoapp.com' under 'Authorised JavaScript origins'.
So my question is, why google keeps telling me that the redirect url is
http://localhost:8000/auth/complete/google-oauth2/
which is not the one I have set up in the console? Perhaps there is something obvious that I'm missing here. Thank you!
Why google keeps telling me that the redirect url is
Because your application is sending its in your code the app is running on http://localhost:8000 and if you are using a client library its probably adding the rest automatically.
http://localhost:8000/auth/complete/google-oauth2/
The redirect uri must exactly match what you are sending from your application.
You need to add
http://localhost:8000/auth/complete/google-oauth2/
Javascript origin is only needed if your code is using javascript.
This video will show you how to fix the error. Google OAuth2: How the fix redirect_uri_mismatch error. Part 2 server sided web applications.
If you want your code to send https://mydjangoapp.com then your going to have to be running it from https://mydjangoapp.com probably and you may need to figure out how to configure it so that it is running from the correct host.

getting 500 Internal Server Error when hosting website on cyberpanel

I am hosting django application on Cyberpanel. I have created website in cyberpanel and setup my django project. also changed vHost configuration. but in LIST WEBSITES getting this error
No Screenshot Available
500 Internal server Error
here is image
I cant figure out how do I get rid of it
Cyberpanel is using Statically's services to generate screenshots, it seems something wrong with Statically's server. Don't worry, it's not your Cyberpanel's problem.
Statically.io:
https://statically.io/
Demo: (Not working)
https://cdn.statically.io/screenshot/google.com

wsimport with special character and Xauthfile

I'm facing the same problem that this guy here:
wsimport Xauthfile error
Since he didn't gave a feedback and I'm new here and can't ask him if he solved his problem I'm opening a new question.
I'm using ubuntu and have JDK7 from java oracle installed.
I'm consuming a thirdparty web service. The password (...GT##ED...) for the webservice have a character that conflicts with de -Xauthfile syntax (http[s]://user:password#host:port//) because of the "#". The dots (...) represents the rest of my password.
Here is the command I'm running:
wsimport -p loa -Xauthfile "path_to_auth.txt" https://myWS?wsdl
In my auth.txt file I have:
https://user:...GT##ED...#myWS?wsdl
In return a get
parsing WSDL...
[ERROR] Server returned HTTP response code: 401 for URL: https://myWS?wsdl,
"https://myWS?wsdl" needs authorization, please provide authorization file with
read access at /home/user_name/.metro/auth or use -Xauthfile to give the
authorization file and on each line provide authorization information using this
format : http[s]://user:password#host:port//<url-path>
I search all over the net, but no success.
When I try to import the WS using SoapUI like in this tutorial I got a
[ERROR] sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid
certification path to requested target
and I don't know where to specify the ssl file for SoapUI. I tryed in
preferences -> SSL Settings
but no lucky.
That's it. I'll apreciate any help.
EDIT
OK, so I pass through the authorization, changing the characters using the HTML URL Encoding Reference, but now I'm getting the following error
[ERROR] Server redirected too many times (20), "https://ws?wsdl" needs
authorization, please provide authorization file with read access at /home/user
/.metro/auth or use -Xauthfile to give the authorization file and on each line
provide authorization information using this format :
http[s]://user:password#host:port//<url-path>
I am using Apache axis2 instead of wsimport. first this problem happened for me, and I write a bash script and it worked.
#!/bin/bash
/axis2-1.7.9/bin/wsdl2java.sh -uri http://username:password#domain/x?wsdl
I also use encoding password and username by 'url encoding' such as bellow:
##%g3E99! -(URL encoding)-> %40%23%25g3E99%21
First create auth.txt file where you need to put the following and save it in C drive:
http://username:password#localhost:port/wsdlurl
Now run the following command:
wsimport -Xauthfile C:\auth.txt -keep http://example.com/test?wsdl
This worked for me.

HTTP 404 error while invoking a local webservice in .NET MVC4

I am trying to learn webservices in .NET mvc4. I tried creating a new Internet application and adding a Web service (asmx) to the project.
By default, the VS adds a "HelloWorld" Webservice. When I try to run it in the browser, I do get the list of operations, service description(WSDL) and the details of the HellowWorld operation. However, when I try invoking the webservice, it gives the following error :
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make
sure that it is spelled correctly.
I might be missing some basic step/setting I guess. Could some body help please. Thanks.
I got the answer from one of my colleagues :) .
When we invoke the service, the MVC tries to resolve the path as specified in RegisterRoutes.
Hence it tries to find a controller with that name and a method with the name same as that of the operation inside that controller. The resolution, ignore the paths with .asmx extension. You can do that by adding the following line in RouteConfig.cs :
routes.IgnoreRoute("{*x}", new { x = #".*\.asmx(/.*)?" });
and it worked. Thanks.

recieving error The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.<nativehr>0x800401e6

After building and deploying, checked the solution management from Central administration and it's up, a simple web service method that only created a Document Library list with a few columns when trying to retrieve the wsdl or even just by calling the WS fromt the adress since its a void method I recieve some error:
The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.<nativehr>0x800401e6</nativehr><nativestack></nativestack>
The very same method runs fine when called from another web service project that is already deployed so there's nothing wrong with the code. I'm most probably doing something wrong but can't figure.
The system is running on a win server 2008 with sharepoint 2010, framework 3.5 and "ANY" cpu mode.
thank you!
[edit]
Managed to get rid of the previous error by removing asmx extention from the blocked file list in central administration now instead I'm recieving a 404 error:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /_layouts1/my2claims/tt_claims.asmx
it must run under the same application pool as SharePoint