No asmx filename

B

BonesBrigadier

Hi there,

Is there a way we can config Web.Config/IIS to point to
services.somewhere.com/WebMethodName instead of
services.somewhere.com/service.asmx/WebMethodName?

Please let me know if not clear or not making sense.

Regards,
G
 
J

John Saunders

BonesBrigadier said:
Hi there,

Is there a way we can config Web.Config/IIS to point to
services.somewhere.com/WebMethodName instead of
services.somewhere.com/service.asmx/WebMethodName?

No, the ASMX file is what's necessary. IIS serves _files_, so there has to
be a file.
 
J

John Saunders

BonesBrigadier said:
Hi John,

Thanks for your reply.

The asmx file would still be there but it wouldn't be mentioned in the URL
(something like default documents on IIS - if you do www.something.com it
will default to www.something.com/default.aspx or whatever we want). Still
not possible?

I suppose that, if you set up IIS to use default documents, then you could
do this.

Can you say why you want to? The URL of a web service isn't usually visible
to many humans.
 
B

BonesBrigadier

Hi John,

Thanks again for all your help.

Main reason for this is to make it as elegant as possible. Also, in other
technologies is possible to do it (I believe java and Tomcat can do
something like this).

If I have 4 Webmethods under services.something.com then it would make sense
to present them as services.something.com/WebMethod. Elegant solution. Also,
a web service shouldn't be seen as a page. It should link straight to dll
shouldn't it? Maybe new IIS makes it possible, but I haven't looked into it.

I have came across Spring.NET where you can do what I am looking for so that
means I am not alone :D

IIS won't allow me what I described because it thinks the WebMethod is a
file/folder and returns 404.

Please let me know if something else comes to your mind. I will do the same
if you want me to.

Thanks,
G
 
J

John Saunders

BonesBrigadier said:
Hi John,

Thanks again for all your help.

Main reason for this is to make it as elegant as possible. Also, in other
technologies is possible to do it (I believe java and Tomcat can do
something like this).

My understanding of the concept of "elegance" involves not doing any more
than necessary. Nobody looks at these URLs. Why are you?
 
B

BonesBrigadier

I agree. No more than necessary. That's what I am trying to achieve as the
name of the file is not needed.

I will be providing these URLs to my clients and so it is much easier to
remember if there are no file name as it will be only
services.whatever.com/WebMethod.

Anyway, thanks for your help and thoughts.

Regards,
G
 
B

BonesBrigadier

One WebService with 4 WebMethods.

I want to expose several methods using same URL. Something like:

services.whatever.com/webmethod1
services.whatever.com/webmethod2
services.whatever.com/webmethod3
services.whatever.com/webmethod4

Might be a REST style service. I will read a lot more about all this.

Regards,
G
 
J

John Saunders

BonesBrigadier said:
I agree. No more than necessary. That's what I am trying to achieve as the
name of the file is not needed.

I will be providing these URLs to my clients and so it is much easier to
remember if there are no file name as it will be only
services.whatever.com/WebMethod.

You may want to keep in mind that nobody else bothers to change this.
Chances are there are reasons for that.

Either your clients have used web services before, and know not to worry
about what URLs look like, or yours is the first, and you'll be setting them
up to be disappointed with their second.
 

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

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top