I am trying to create a SSO to connect to an External App in our Extranet platform. I've a custom web service, and with mail address I can get a token. By using a simple console application or ASP web site, I can generate the token, but inside SharePoint, this is not working as expected.

I have a simple WSDL, and by clicking on a link/button, I want to obtain the token. What can I use in order to do that?

I have test webpart (asynchronous is not working), a custom .ashx code calling the web service but without success.

Any help would be appreciate!

  • How you created the test webpart? – Amal Hashim Jan 22 '15 at 15:39
  • Simply with Visual Studio (Visual Web Part), I have added the Service Reference (Web Service), 2 objects : one label and one button and one click event. But this is loading for a long (very long) time and I get a time out. (A simple ASP web site with the same object on the same server is working fine, but not in SharePoint) – Jordan Jan 22 '15 at 15:43
  • Ok in that case have you updated the web application configuration file with Service details? – Amal Hashim Jan 22 '15 at 15:45
  • My first answer would be no because I didn't catch what you mean. Is this the web.config ? Or inside my visual studio project ? – Jordan Jan 22 '15 at 15:52

Whenever we try to consume a Web Service it creates bunch of configuration entries in the configuration file.

In your case you tried this using an asp.net project. So you can check the config file of that project to understand the configuration entries.

Now you can open up the SharePoint Web Application configuration file and make the same changes.

  • In the ASP.NET project I have a <applicationSettings> but not in the SharePoint web app configuration file. Do I need to add it ? – Jordan Jan 22 '15 at 16:01
  • In SharePoint it should be appSettings.. Can you paste what is the content inside applicationSettings? – Amal Hashim Jan 22 '15 at 16:04
  • Here it is : <applicationSettings> <WebApplication1.Properties.Settings> <setting name="WebApplication1_WSSolveDirect_UserPermissionServiceService" serializeAs="String"> <value>https://ws.solvedirect.com:443/ws/soap/permission/UserPermissionService</value> </setting> </WebApplication1.Properties.Settings> </applicationSettings> – Jordan Jan 22 '15 at 16:07
  • Ok you should add <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup,System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" > and then paste the <applicationSettings> tag in the web configuration files – Amal Hashim Jan 22 '15 at 16:13

Finally, the problem was related to another kind of issue : I used HTTPS (443) for my SharePoint Server, and the web.config wasn't well configured with proxy addresses.

It doesn't change the fact that this is not working in a webpart, but for the handler (ashx), it works as expected.

Thank you Amal for your help and advises

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.