problem in creating a service reference in vs2008

I am trying to reference the wcf service
http://ExpRefund.tst.retro.mycompany.net/ExpRefundFacade.svc/ExpRefundFacade
after entering this url and press GO it says could not find service

I tried the following without success:
http://ExpRefund.tst.retro.pacificlife.net/ExpRefundFacade.svc

However, if I use http://ExpRefund.tst.retro.pacificlife.net/ExpRefundFacade.svc in the browser, I get the service.... By the way the service is working fine in the application, however I want to add a reference to it in another new application but is not accepting... I must be doing something wrong, could anyone help please. Thanks

by the way if the svc is in the localhost, and I use [discover] button, it is correctly selected.
fmichailAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

apeterCommented:
can we see your wcf service config please. Do you get any error inside VS2008 ?
0
fmichailAuthor Commented:
Hi apeter

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
      <bindings>
            <basicHttpBinding>
                  <binding name = "secureMsg" maxReceivedMessageSize="94371840">
                                  <readerQuotas maxStringContentLength="94371840" />
                                  <security mode="TransportCredentialOnly">
                        <transport clientCredentialType="Windows" proxyCredentialType="Windows" />
                        </security>
                  </binding>
            </basicHttpBinding>
      </bindings>

      <services>
            <service name="FI.Facade.FIFacade" behaviorConfiguration="Debug_Behaviour">
                  <host>
                        <baseAddresses>
                              <add baseAddress = "http://fi.tst.retro.mycompany.net" />
                        </baseAddresses>
                  </host>
                  <endpoint
                        address="FIFacade"
                        binding="basicHttpBinding"
                        bindingConfiguration="secureMsg"
                        contract="FI.Interface.IFIFacade" />
            </service>
      </services>
      <behaviors>
            <serviceBehaviors>
                  <behavior name="Debug_Behaviour">
                  <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
                  <serviceMetadata httpGetEnabled="true" />
                  <serviceAuthorization principalPermissionMode="UseWindowsGroups" />
                  </behavior>
            </serviceBehaviors>
      </behaviors>
</system.serviceModel>
0
apeterCommented:
Aren't you missing Mex endpoint for your service? Returning metadata about an WCF service allows consumers of a service to easily create clients for the service

<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

fmichailAuthor Commented:
apeter,
I will try that and let you know. do you mean that I just add this end point, and then I can create a service reference to it? what should I use,

http://ExpRefund.tst.retro.mycompany.net/ExpRefundFacade.svc/ExpRefundFacade

or

http://ExpRefund.tst.retro.mycompany.net/ExpRefundFacade.svc
0
fmichailAuthor Commented:
Hi apeter

I did add the Mex endpoint. and when I tried to create a service reference, entered the url (I tried both), and when I press GO I get the message indicating not able to reach the url

wcf.png
It may look like I do not have permission, however, if I use the url in the browser, I get the service displayed correctly. what do you think?
0
apeterCommented:
You should create a proxy/reference using this URL, http://ExpRefund.tst.retro.mycompany.net/ExpRefundFacade.svc.
0
fmichailAuthor Commented:
apeter
is'nt this what I am trying to do when I create a service reference, in other words is there another way to create the proxy

Here is what I did

service.png
0
apeterCommented:
You have create a proxy to the service and not to a method in a service directly. You should use this url,  http://ExpRefund.tst.retro.mycompany.net/ExpRefundFacade.svc  
to create a service reference.
0
fmichailAuthor Commented:
Dear apeter
I used the url as you indicated and I get the same message. By the way, I am using the real company name instead of [mycompany]. Here it is

wcf1.png
0
apeterCommented:
Can you please click on the "Details" link and get error details ?
0
fmichailAuthor Commented:
Hi apeter
sorry for the delay, I was out of country for few days.

The main part in the error is

Metadata contains a reference that cannot be resolved: 'http://exprefund.stg.retro.pacificlife.net/ExpRefundFacade.svc'.
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.
The remote server returned an error: (401) Unauthorized.
If the service is defined in the current solution, try building the solution and adding the service reference again.


What is confusing is that when I use this url in the browser (on the same PC with the same credential) I get the service operations showing normally
0
fmichailAuthor Commented:
Hi apeter

I read the link, and tried the followng:
set the application pool to work for Anonymous access
Tried change the service web.config to set the clientCredentialType="Ntlm"
proxyCredentialType="None"

and every time I restarted the www publishing service. Still getting an error that the url could not be resolved. I tried again the direct targeting the url from the browser, and it works OK. It is just the problem in trying to create a service reference in VS 2008. Sorry apeter, to bug you again. Thanks
0
apeterCommented:
Can you please try opening VS2008 in "Administration" mode and try adding reference.

Check out this link, https://social.msdn.microsoft.com/Forums/en-US/0071720f-68e0-4d29-bc7c-3b96d33cb38c/problem-while-adding-reference-of-my-wcf-service?forum=wcf  Hope it helps.
0
fmichailAuthor Commented:
Hi apeter

I tied opening vs2008 as administrator, and got te same problem. I tried to create a service on my machine, and tried to reference it. This is OK but not from the server. Keep on please. Thanks
0
apeterCommented:
Enable tracing on wcf service. It might give more clues of the error.

Use this link to enable tracing,  https://msdn.microsoft.com/en-us/library/ms733025(v=vs.110).aspx
0
fmichailAuthor Commented:
Sorry apeter, nothing was written to the trace file when I try to create a service reference from VS 2008.
0
apeterCommented:
That mean, your request didn't reach WCF service.  something is preventing your call.
0
fmichailAuthor Commented:
Looks like, however,

If I try to access the webservice from the browser using same url it works indicating I have the correct URL and correct permissions
If I use the same steps on a service on my local drive it works indicating I am following the corerct steps

I cannot understand
0
apeterCommented:
Within visual studio we can browse. Can you access your service in the visual studio browser.
0
fmichailAuthor Commented:
Sorry apeter I almost gave up. and did not check the question status for the last period, please accept my apologies.

What is the visual studeo browser? It would be great if you can provide a screenshot. I appreciate your help.
0
apeterCommented:
Go to VS Menu : View -> other windows -> web browser.   This opens a browser inside VS.
0
fmichailAuthor Commented:
I will try this on Monday when I am back at work. however, I tried the url from the normal browser (outside of vs 2008)          and it works fine
0
fmichailAuthor Commented:
Hi apeter,
I tried again and this time, I could not even open the link in the browser (the general browser). I see this as at least consistent. Here is the message
Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service

The application is running on IIS6, and is hosted in an application pool. I tried to open the properties of the pool, however, I could not find anything about security it is as shown hereproperties.bmp
How to change the setting to enable windows Authentication?. I think we are getting there. Thanks apeter
0
apeterCommented:
It will be there in the  Site's Feature View. Go to IIS Manager.  Select the site where you have hosted your service. In the Features view , you have look for authentication section.IIS-Authentication.PNG
0
fmichailAuthor Commented:
Hi apeter,
I tried from the browser in VS 2008, and it works fine, however, It still not accessible when I try to create the service reference using the same url and clicking Go. (I selected another service rather than the other one I was trying against).

service.png
0
fmichailAuthor Commented:
I checked the authentication, and it indicates windows authentication is enabled (however, it indicates "No Anonymous access".
0
apeterCommented:
Please verify with the sample from msdn. It might help in what you are missing. https://msdn.microsoft.com/en-us/library/ff648505.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fmichailAuthor Commented:
apeter,
It Worked..... !!!
I appreciate your help so much .. I followed the last part of the Microsoft link you sent me, and here are the steps I followed:

In the [Add service reference] Dialog click [Advanced Button]
In the [service reference setting] dialog click [Add web reference] button
In the [Add web reference] dialog enter the URL, and the service interface will show. click [Add Reference] after setting the name

It looks like for some reason, I had a compatibility issue (I do not know what it is) which was resolved by using the compatibility mode (compatible with Framework 2. Thanks so much apeter.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.