?
Solved

add a function to web service

Posted on 2011-03-23
7
Medium Priority
?
273 Views
Last Modified: 2012-05-11
I have a web service .asmx file in my project. Now I need to another function. May I just add the one more function in the web service CodeBehind cs file? Can I just add it by

    [WebMethod]
    public int SaveBinraryData(binrary imagedata)
    {
        ... ...
        ... ...
    }
0
Comment
Question by:minglelinch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 total points
ID: 35198658
Yes. Of course any consumers of your service will need to re-import the WSDL if they want to use the new method.
0
 
LVL 1

Author Comment

by:minglelinch
ID: 35198702
My first time to web service. How to do this process? (re-import the WSDL if they want to use the new method)

0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35198759
In Visual Studio, you just need to right-click on the "Web Reference" in the solution explorer and choose "Update Web Reference". That will the trigger Visual Studio into regenerating the proxy class from the WSDL of the service.
0
Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

 
LVL 1

Author Comment

by:minglelinch
ID: 35199073
I got it. Thanks a lot !
0
 
LVL 1

Author Comment

by:minglelinch
ID: 35201192
One further question please. Some functions in asmx ahead with  [WebMethod], while some ahead with [WebMethod(EnableSession=true)], and some with nothing. Why? EnableSession=true is it used when making DB updates? Thanks.
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35201214
No, it means that that particular method is able to store state information that can be used on subsequent requests from the same caller.
0
 
LVL 1

Author Closing Comment

by:minglelinch
ID: 35220172
Great answer.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question