Web Service Authorization Authentication - web-services

I have a problem for a few months now...
I have a web service and a client using the web service.
When i try to add the web service to the client(with "Add Web Reference.."), i search for web services on the local machine and finds it. but when i click it in order to add it to the project i get a prompt dialog asking me for username and password.
I recall times when i didn't have this dialog and I'm not sure why this happens now...
the Web.config file of the web service contains <authentication mode="Windows" />
Few details:
I'm using Visual Studio 2008 Standard.
the programs are written in C#.
I'm using IIS 5.1 and the web service configured only with "Integrated Windows Authentication" checked.
in my windows XP I'm using (in order to login) a user name and password.
No matter what i do to add the web Service to the client i can't add it. it fails.

Check to see if your web project (client) is running on vs2008's built-in web server... under Project -> Properties -> Web section.
If not, can you check those same settings on the web service project and try connecting with both options?
That should do it.
**from comments above

I would recommend that you check and see if you have the option NTLM Authentication checked under Project Properties -> Web. If you uncheck this option you should be able to add the Web Service without having to authenticate.
http://msdn.microsoft.com/en-us/library/aa378749.aspx

Related

deploying sharepoint hosted app run into security prompt

I wrote a very simple sharepoint hosted app (2013). I kept getting a lot of windows credential prompt, asking for domain user name and password when I tried to deploy to my development server.
I have a separated app domain setup. Also, from the vs2013 deploying output, it shows the app successfully deployed to my hosted web.
When I go to the site (hosted web), I can see the link of my app is appearing on the left hand nav panel, inside of the Recent section.. However, when I click on the link again, the windows security prompts and asking for my network credential. I kept entering it, but it just kept prompting...
My app url is: app-47294dea293202.appDomainName.com usually if this is my regular IIS web, I will go and check the IIS authentication and try to enable/disable the anonymous/windows login, but in this kind of url, where I can go and tweak that?
I have been trying to fix this issue for many hours, I felt really exhausted working with Sharepoint 2013..
Open Internet Explorer -> Internet Options -> Tab Security -> Local Intranet -> Click Sites -> Advanced -> Add the link http(or https) ://*.appDomainName.com.
This is append because the url is not recognize as Local Intranet and IE doesn't pass the current credentials, check also:
Internet Explorer -> Internet Options -> Tab Advanced -> Under Security Group -> Enable Integrated Windows Authentication is checked (This options pass the current credentials on Local Intranet Site).
You can try also the Disable the loopback check

Provider Hosted Apps Launch Issue

I have a provider hosted app (a normal asp.net web forms application) deployed on a typical web server IIS 7.5.
While launching the app from SharePoint Site in Office 365 Multi Tenant, it's throwing the below issue on App launch.
On capturing details using Fiddler, found the following when the app is launched
SPAppToken=&SPSiteUrl=https%3A%2F%2Fabc.sharepoint.com%2Fsites%2Fspdev%2Famsdev%2Famitamsdev&SPSiteTitle=amitamsdev&SPSiteLogoUrl=%2Fsites%2Fspdev%2FSiteAssets%2Flogo.gif&SPSiteLanguage=en-US&SPSiteCulture=en-US&SPRedirectMessage=EndpointAuthorityMatches&SPCorrelationId=31477a9c-2902-204a-8393-67eced1a10b8&SPErrorCorrelationId=31477a9c-2902-204a-8393-67eced1a10b8&
SPErrorInfo=The+requested+operation+requires+an+HTTPS+%28SSL%29+channel.++Ensure+that+the+target+endpoint+address+supports+SSL+and+try+again.++Target+endpoint+address
The SPErrorInfo Part is interesting. I am unable to confirm whether we really need the remote site to be configured for https?
Additional Information - Identity Provider is ACS and it is a low trust app.
Can someone suggest?
Regards,
Nitin Rastogi
In a production environment, you should always be using HTTPS. If you don't, you're exposing yourself (and your organization) to many risks.
If this is your development environment and you are confident this isn't an issue, you may want to look at the accepted answer to this question on the MSDN forums, which mentions the same error message. Their solution to bypass the HTTPS checking:
$c = Get-SPSecurityTokenServiceConfig
$c.AllowMetadataOverHttp = $true
$c.AllowOAuthOverHttp=$true
$c.Update()
When packaging the SharePoint App from Visual Studio, you must ensure that the URL you use is using HTTPS:
In IIS, add an HTTPS binding to the site to achieve this. You would have to reupload the App to SharePoint after packaging it with the new HTTPS URL.
More information here.

Unable to login to WSO AppFactory

WSO2 experts
I downloaded the WSO2 AppFactory, but couldn't login into the web console with admin/admin. Has the default password changed?
Regards,
Terry
Please try with the following credentials
Username:admin#admin.com
password:admin
If you just tried with a downloaded 'binary' set-up of WSO2 App Factory; this will only allow you to log in to the Carbon admin console of the App Factory (If you just clicked on and visited the URL, that was printed on the server console). This Carbon admin console does not have any App Factory specific functionality which you might expect [WSO2 Carbon is the underlying platform which is used by all of the WSO2 products].
Since App Factory runs having few other servers alongside (such as WSO2 AS, WSO2 ELB, Jenkins, Redmine etc) this set up that you are running will not provide the same User interfaces or functionality which you have observed within the setup provided with https://appfactorypreview.wso2.com/samlsso .
I just thought to leave this answer, because; you would get disappointed after spending your time expecting the same Application (User Interfaces) available with the online setup (which I have mentioned with the hyperlink) by running the binary setup(wso2appfactory-1.0.0.zip) that you have downloaded from the WSO2 Web site.

How to consume asp.net web service in SharePoint site?

I have asp.net web service application created in VS 2010. I created this web service using ASP.NET Web Service Application template in VS 2010. My InfoPath form consumes my webservice. However to fill out my IP form, I first have to make sure I run my web service, otherwise I get errors like cannot connect to the webservice.
How can I make sure my web services are properly deployed to my SharePoint site that hosts infoPath form services? Please let me know the necessary steps. If my web services are deployed to my SharePoint site then there's no need to manually run my asp.net web service in the browser everytime I need to fill out the form. Thanks.
Here's the error message I got when I tried to browse my custom web service deployed to layouts folder:
http://abcd/_layouts/WebServiceDemo/MyCustomWebService.asmx
I couldn't find relevant message in 14-->LOGS. Any idea what's causing this? Thanks.
My own analysis: Please visit the web.config inside LAYOUTS folder and set Customerros to Off to get more meaningful error message.
I Googled "How to consume asp.net web service in SharePoint site".
The third hit was Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010. The post shows how to create, deploy and consume the service.

Deploying a WCF Service

I am using WCF for the first time. I Have successfully created the service and it works fine on my local machine. I want to know the steps involved for deploying the service to the client environment (including changes to the config file, IIS settings) and any other miscellaneous settings.
http://msdn.microsoft.com/en-us/library/aa751792.aspx
There you go - the how to from Microsoft
Right click the service project in VS, select Copy Website.
Specify the IIS path. (may need to connect)
Moves / sync all files.
You can also deploy a WCF service to a windows service host. This is desirable in many situations which are outlined here:
IIS WCF service hosting vs Windows Service