开发者

Add Web Service Reference Weird Problem in WP7

开发者 https://www.devze.com 2023-02-05 00:30 出处:网络
I have a WP7 project in VS2010 pro/ultimate and I have added a web reference from another project on the same solution. The web service project is just a normal website project, I just created .ASMX f

I have a WP7 project in VS2010 pro/ultimate and I have added a web reference from another project on the same solution. The web service project is just a normal website project, I just created .ASMX file. I tested the service using web br开发者_如何学Pythonowser and it works fine.

The problem is, after I added this service as service reference, I cannot reference it in my WP7 project and I can't view it in Object Browser either as if it doesn't exist.

I use local URL like 'http://localhost:12345/WebService.asmx' when I added the service, VS can see all the methods and can add successfully. Very strange for me and I don't know how to solve this issue.

Anyone can give me any clue on this? Thanks very much.


I've had a similar issues before- on one machine, a restart was required, on another, I had to uninstall ALL of my SL stuff, then uninstall Vstudio, then reinstall and reapply any SL add-ons.

Then it worked fine.

Also had a friend with the same issue- uninstall all, then reinstall worked for him also.

I believe these were machines with pre-rtm SL and Phone bits on them.


I've had a similar problem. I created a WP7 project using VB.Net. I built a WCF Class web service, a client side proxy class, and then a WP7 application with the service reference. When I added the service reference, the code generating utility would not build the required Reference.svcmap file detail (it only created the header information). However the project would still compile, yet I couldn't reference the service in code as it didn't exist in the underlying files.

I tried recreating the WP7 project in C# and everything worked. My guess is that the VB implementation of WP7 might still have some issues, however that is a guess only. I'm keen to see if anyone else has had the same issue specific to the VB WP7 template or if it is something else.


I bumped into the same problem, but it was fixed after a reboot as suggested in this thread by dethSwatch.

I do remember that a silverlight SDK update was installed a bit earlier, maybe the reboot is required after the update?


I think this issue might be related to the January Update to the WP7 tools. I managed to fix this issue by installing the VS10-KB2486994-x86.exe fix found on the above page. That sorted the issue I had with generating a client side proxy for the WCF service I wanted to call. Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消