In VS 2005, when you make an ASP. NET Web Service Project, and then rename
the class from Service1 to something else (not change the file name from
Service1.asmx, mind you), you will get an error when you attempt to run the
service. You have to manually edit the markup of the .asmx file because it
doesn't update the class directive with the newly changed class name.
Anyone know of this bug and report it?
Hello Scott,
Thanks for your post. But, I'm afraid this is by designed. Changing in code
file cannot refractor asmx file. VS IDE isn't enough smart that it could
rename the reference outside the code file... We have to do that by our
self. Sorry for any inconvenience this may have caused.
In VS 2008, when you rename webserivice name in .cs file, VS IDE will show
a warning which reads "References to this class name in markup will not be
renamed".
Anyway, if you really want to get this feature, we suggest you can submit
the request on Connect feedback portal. Our developer will evaluate them
seriously and communicate with you directly on the issue there.
http://connect.microsoft.com/VisualStudio/
Improving the quality of our products and services is a never ending
process for Microsoft .
Have a great day. Let me know if you have any more concern, we are glad to
assist you.
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Scott M. - 03 Mar 2008 23:21 GMT
Ok Wen, thanks. That doesn't seem to be a good way to handle this, since
most folk aren't going to want to have a service named "Service1", but the
IDE does nothing to let you know that you have to change the .asmx markup or
even how to change it. It's nicer that 2008 gives you a warning, but since
this was automatic in VS 2003, this seems like a step backwards.
-Scott
> Hello Scott,
>
[quoted text clipped - 24 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Wen Yuan Wang [MSFT] - 04 Mar 2008 09:15 GMT
Hello Scott,
Thanks for your reply. By the way, could you let me know how did you rename
webservice in VS 2003?
Actually, I never heard that VS 2003 could do that automatic. Have you
installed any 3rd party add-in on it?
Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Scott M. - 04 Mar 2008 23:30 GMT
In VS .NET 2003, you would simply edit the service name (the name of the
webservice class) directly in the editor and that's it. No 3rd party
add-ins. I am an IT trainer and have taught VS 2003 web services hundreds
of times using the just rename the class and go technique without any issue.
-Scott
> Hello Scott,
>
[quoted text clipped - 12 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Wen Yuan Wang [MSFT] - 05 Mar 2008 09:35 GMT
Hello Scott,
Thanks for your reply. This maybe a broken change... It doesn't support in
VS 2005/2008.
If there is anything you feel we can help with, please feel free to let me
know. It's my pleasure to assist you.
Thanks for your understanding.
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Scott M. - 04 Mar 2008 01:21 GMT
I have submitted this to the "Connect Feedback" portal, as you suggested.
It is item: 331294.
Thanks.
> Hello Scott,
>
[quoted text clipped - 24 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.