fireBand
fireBand

Reputation: 957

ASP.NET Website or Web service?

I am trying to implement a service to download a image file. The code does nothing but upload a file to the response with each client request.

There are no SOAP messages involved but I am planning to implement it as ASP.NET web service. It can also be implement as ASP.NET website but since it has no view (forms, html etc) I planned to implement a web-service.

Is this a better approach? Does ASP.NET Website offer better performance that a Web-service?

Which one would be better is this situation?

Upvotes: 0

Views: 365

Answers (2)

SquidScareMe
SquidScareMe

Reputation: 3218

I'd suggest using an ASHX handler. If you haven't heard of them before, you can think of them as a code-behind file without the ASPX view. Generally speaking they are considered more light weight than a web service.

Upvotes: 2

James Walford
James Walford

Reputation: 2953

Well first off, do you need code to handle the image request at all? Is the image processed in some way relative to the request, or is it static? Why do you want to implement this in code instead of simply serving a static image over http? Are there security considerations to be taken into account, e.g. serving images to particular users based on their credentials?

Unless you can give us a little more detail of your requirements it's impossible to make any concrete judgement or recommendation.

Upvotes: 0

Related Questions