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 / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

What is needed for a web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TonyJ - 27 Sep 2007 12:45 GMT
Hello!

I know this is the wrong forum for this question but I think many of you can
answer this easy question.

I have read about web services and I wonder one thing and that is what file
must be put on the web server?
Is it both the asmx file and the code-behind file that must be stored web
server. Must these two be put in the same place?

What is the purpose of the asmx file?

//Tony
Arne Vajhøj - 03 Oct 2007 02:40 GMT
> I know this is the wrong forum for this question but I think many of you can
> answer this easy question.
[quoted text clipped - 5 lines]
>
> What is the purpose of the asmx file?

Obviously you need all the stuff needed to run the web service.

An .asmx with both declaration and inline code *or* an .asmx and
some source code *or* an .asmx and a dll.

Rules on where to place files are similar to other ASP.NET stuff.

And then there are WCF ....

Arne
Chris Mullins [MVP - C#] - 03 Oct 2007 17:52 GMT
>> I have read about web services and I wonder one thing and that is what
>> file
>> must be put on the web server?

> And then there are WCF ....

In WCF, I'm taking an approach I quite like. I've got my Contracts /
Interfaces / Messages defined in a standard .Net DLL. This lets me write
Unit Tests, and do all the other basic stuff. I then build host projects to
host it where I need.

To expose the service through IIS, I create a Web Project, and add in an
".svc" file that looks like:

<%@ ServiceHost Language="C#" Debug="true"
Service="MyStuff.Services.MyService1"%>

That's the sum total of the "expose to IIS" that has to go in there. The
reference to MyService1 is found in the config file:
<services>
   <service name="MyStuff.Services.MyService1">
       ...
   </service>
</services>

I then deploy to IIS the .scv file, the config file, and the DLL's that
contain my WCF classes.

It's really quite slick, and (in my opinion) a big jump forward over what
Web Services have been in the past. It no longer feels like a big ugly mess
that's going to be unmatinainable in the long-term.

--
Chris Mullins

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.