problem in creating a service reference in vs2008

I am trying to reference the wcf service
after entering this url and press GO it says could not find service

I tried the following without success:

However, if I use 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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

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

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

            <service name="FI.Facade.FIFacade" behaviorConfiguration="Debug_Behaviour">
                              <add baseAddress = "" />
                        contract="FI.Interface.IFIFacade" />
                  <behavior name="Debug_Behaviour">
                  <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
                  <serviceMetadata httpGetEnabled="true" />
                  <serviceAuthorization principalPermissionMode="UseWindowsGroups" />
Aaron JabamaniTechnical ArchitectCommented:
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" />
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

fmichailAuthor Commented:
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,

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

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?
Aaron JabamaniTechnical ArchitectCommented:
You should create a proxy/reference using this URL,
fmichailAuthor Commented:
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

Aaron JabamaniTechnical ArchitectCommented:
You have create a proxy to the service and not to a method in a service directly. You should use this url,  
to create a service reference.
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

Aaron JabamaniTechnical ArchitectCommented:
Can you please click on the "Details" link and get error details ?
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: ''.
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
Aaron JabamaniTechnical ArchitectCommented:
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"

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
Aaron JabamaniTechnical ArchitectCommented:
Can you please try opening VS2008 in "Administration" mode and try adding reference.

Check out this link,  Hope it helps.
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
Aaron JabamaniTechnical ArchitectCommented:
Enable tracing on wcf service. It might give more clues of the error.

Use this link to enable tracing,
fmichailAuthor Commented:
Sorry apeter, nothing was written to the trace file when I try to create a service reference from VS 2008.
Aaron JabamaniTechnical ArchitectCommented:
That mean, your request didn't reach WCF service.  something is preventing your call.
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
Aaron JabamaniTechnical ArchitectCommented:
Within visual studio we can browse. Can you access your service in the visual studio browser.
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.
Aaron JabamaniTechnical ArchitectCommented:
Go to VS Menu : View -> other windows -> web browser.   This opens a browser inside VS.
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
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
Aaron JabamaniTechnical ArchitectCommented:
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
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).

fmichailAuthor Commented:
I checked the authentication, and it indicates windows authentication is enabled (however, it indicates "No Anonymous access".
Aaron JabamaniTechnical ArchitectCommented:
Please verify with the sample from msdn. It might help in what you are missing.

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:
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.
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.