Web Service Question

G

Guest

Posted in a different news group - but hoping to find an answer here...

I am using VS 2005 and am testing my first web service. If I follow the
common instructions for creating a web service by creating a new website
using the ASPX.Net Web Service template, there appears to be no dll file
created when building the web site. However, if I create a class library and
move the asmx file and App_Code directory to that library the .dll file is
then created. I've not seen any references that make me believe this is the
correct way to do this.

In other words, if I follow the steps in this link
http://msdn2.microsoft.com/en-us/library/6x71sze4.aspx there is a comment
that says "The Service.vb (or .cs) class file and the Global.asax class file
are compiled into the project .dll file, which is then copied to the server
in the default \bin directory of the target virtual directory. If the project
is set to compile a debug version, Visual Studio creates a project .pdb file
in the \bin directory. "

I have no dll file or \bin directory.

Can anyone please provide additional guidance?
 
C

chanmm

You need to copy asmx file and asmx.cs file over to where you want to
deploy. Watch out for your web.config file too. Good luck

chanmm
 
G

Guest

I didn't think I had to copy the code to the web server... In fact, I don't
think I would want to copy code tothe web server.
 
G

Guest

That did it... thanks Peter.

It does raise a couple of questions however...

1) Is deploying the source code the recommended method to deploy a web
service if using Visual Studio 2005?
2) I'm wondering why everything I read said that a dll was going to be
generated and yet it was not.
3) Is there a reference that you could suggest where I could read about this?

Thanks again Peter.
TE
 
G

Guest

Tony,
I'm really agnostic about all this. Source code (e.g. XXX.CS / .VB) doesn't
get served under the asp.net runtime. However, personally, I've never liked
the VS 2005 "website project" analogue and was very happy when Scott Guthrie
and his excellent ASP.NET team finally responded with the ASP.NET Web
Application Project. I use both, but really prefer having a single assembly
and NO SOURCE FILES on my server! I don't need "updateable" - I can rebuild
in a second and write over the old assembly in the /bin folder.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
 
G

Guest

Completely agree...

Thanks Peter, at least now I know I'm not doing 'something wrong'.

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top