Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2004

Tip: Looking for answers? Try searching our database.

debugging two webservices

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mekim - 02 Nov 2004 02:18 GMT
Hello,

Tough webservice debugging issue - @least for me  =8-/

Here's the situation...I have a webservice app that is a project in a
solution with the webservice client app (vb.net app)

I want to "create" a duplicate copy of the webservice app so the webservice
client app can call both of them

i.e.
 webservice1.asmx which is webserviceproject1
 webservice2.asmx which is ALSO webserviceproject1

so the client app can call the "same" actual asmx project ...however they
are two separate instances of the same webservice

I hope I explained that good enough...i tried :-)

Regards,
Mekim
Martin Kulov - 02 Nov 2004 18:45 GMT
Hi Mekim,
I could not understand what exactly your question is. Just copy webservice1.asmx to webservice2.asmx along with webservice1.asmx.cs and webservice1.asmx.res files to webservice2.asmx.cs and webservice2.asmx.res. Rename class name in webservice2 files to from webservice1 to webservice2 and compile the project. Now you have two instances of your web service and you can select which one to access by setting the Url property of the proxy class that resides on the client. Debugging should not be the issue here since VS.NET will break on your breakpoint no matter if they are in webservice1 or webservice2.

Best,
Martin Kulov
www.codeattest.com
mekim - 02 Nov 2004 19:14 GMT
hi Martin,

First off, thx for taking the extreme effort to try and figure out what I
was trying to say...i know it wasn't the clearest :-)

The way u describe to do this seems to be the only way to do it, but it
seems kind of silly in a way.  If it werre not a webservice it could easily
be done..i.e the code below

...but u can't with a webservice,....which I understand since everything is
based of the asmx file as the starting point

...but it would be nice to add mulitple asmx files in one project...and
maintain the same codebehind...like having two diff aspx pages w/ the same
codebehind...

i.e. non webservice objects can use the same codebehind...but not webservices?
Dim x1 as classHello
Dim x2 as classHello

x1.CallFunctionWithBreakPoint()
x2.CallFunctionWithBreakPoint()

Regards,
Mekim

> Hi Mekim,
> I could not understand what exactly your question is. Just copy webservice1.asmx to webservice2.asmx along with webservice1.asmx.cs and webservice1.asmx.res files to webservice2.asmx.cs and webservice2.asmx.res. Rename class name in webservice2 files to from webservice1 to webservice2 and compile the project. Now you have two instances of your web service and you can select which one to access by setting the Url property of the proxy class that resides on the client. Debugging should not be the issue here since VS.NET will break on your breakpoint no matter if they are in webservice1 or webservice2.
>
> Best,
> Martin Kulov
> www.codeattest.com
Martin Kulov - 02 Nov 2004 22:06 GMT
Hi again,

So if I got it right you want to create new instance of your web service that has different page name, but use the same code-behind. Is that correct?
If you open the .asmx file you will see smth like this [1]. Just copy the asmx file to a new file, but keep the same class and codebehind values.

HTH,
Martin Kulov
http://www.codeattest.com

[1] <%@ WebService Language="c#" Codebehind="webservice1.asmx.cs" Class="WSEDemo. webservice1" %

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.