If to create new project using Silverlight Application blank with Name - "web", Solution name - "\example", Web project name - "home"(for example), add to "home" service - add/new item/Silverlight/Silverlight-enabled WCF Service setting at home properties/Web:
Use Local IIS Web server - true Use IIS Express - true everything is fine - with such properties Service Reference adding to "web" project without any problem
But to gebug service using large data size, possible to use just "Local IIS Web server" not "IIS Express" (Use Local IIS Web server - true; Use IIS Express - false)
And in this case impossibele to add Service Reference: " There was an error downloading 'http://localhost/home/Service1.svc/_vti_bin/ListData.svc/$metadata'. The request failed with HTTP status 404: Not Found. Metadata contains a reference that cannot
be resolved: 'http://localhost/home/Service1.svc'. The remote server returned an unexpected response: (405) Method Not Allowed. The remote server returned an error: (405) Method Not Allowed. If the service is defined in the current solution, try building
the solution and adding the service reference again. "
4734aspnet
0 Points
2 Posts
Can't add Service Reference
Jul 31, 2012 01:56 PM|LINK
Hello everybody, let me trouble you with question
Situation is:
Windows 8 RC, Visual Studio 12 RC, IIS 8
If to create new project using Silverlight Application blank with Name - "web", Solution name - "\example", Web project name - "home"(for example), add to "home" service - add/new item/Silverlight/Silverlight-enabled WCF Service setting at home properties/Web: Use Local IIS Web server - true Use IIS Express - true everything is fine - with such properties Service Reference adding to "web" project without any problem
But to gebug service using large data size, possible to use just "Local IIS Web server" not "IIS Express" (Use Local IIS Web server - true; Use IIS Express - false)
And in this case impossibele to add Service Reference: " There was an error downloading 'http://localhost/home/Service1.svc/_vti_bin/ListData.svc/$metadata'. The request failed with HTTP status 404: Not Found. Metadata contains a reference that cannot be resolved: 'http://localhost/home/Service1.svc'. The remote server returned an unexpected response: (405) Method Not Allowed. The remote server returned an error: (405) Method Not Allowed. If the service is defined in the current solution, try building the solution and adding the service reference again. "
May be somebody has idea to solve this problem?
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: Can't add Service Reference
Jul 31, 2012 02:16 PM|LINK
have you hosted the server at localhost
http://localhost/home/Service1.svc/_vti_bin/ListData.svc/$metadata
please use WCF Test Client and check then add service reference
http://localhost/home/Service1.svc/_vti_bin/ListData.svc
and call the method and check whether its working properly or not?
4734aspnet
0 Points
2 Posts
Re: Can't add Service Reference
Jul 31, 2012 03:15 PM|LINK
After WCFTestClient testing my service http://localhost/home/Service1.svc i have:
Error: Cannot obtain Metadata from http://localhost/home/Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://localhost/home/Service1.svc ЊҐв ¤ лҐ б®¤Ґа¦ в Ґа §аҐиЁ¬го ббл«Єг: "http://localhost/home/Service1.svc". “¤ «Ґл© бҐаўҐа ўҐаг« Ґ®¦Ё¤ л© ®вўҐв: (405) Method Not Allowed. “¤ «Ґл© бҐаўҐа ў®§ўа вЁ« ®иЁЎЄг: (405) ЌҐ¤®ЇгбвЁ¬л© ¬Ґв®¤.HTTP GET Error URI: http://localhost/home/Service1.svc ‚®§ЁЄ« ®иЁЎЄ ЇаЁ § Јаг§ЄҐ "http://localhost/home/Service1.svc". ‘Ў®© § Їа®б б б®бв®пЁҐ¬ HTTP 404: Not Found.
And http://localhost:52063/Service1.svc using IIS Express tested successfully
Another view, the same result