ASP.NET 2.0 Web Site Project - Change Web Service Path?

G

Guest

Hi all,

I'm deploying a web site application to a production server. The web site
contacts a back end web service (part of this project) and in development
it uses http://localhost:4161/. In production it has another path - how do
I configure the path?

In .NET 1.1 I could change a web service to be "dynamic URL", but this
doesn't seem to be an option with the web site project.

Any ideas?

Thanks!
 
J

John Saunders [MVP]

Spam Catcher said:
Hi all,

I'm deploying a web site application to a production server. The web site
contacts a back end web service (part of this project) and in development
it uses http://localhost:4161/. In production it has another path - how do
I configure the path?

In .NET 1.1 I could change a web service to be "dynamic URL", but this
doesn't seem to be an option with the web site project.

Any ideas?

Yes.

First of all, a web site is not a project at all. It's just a web site.
Notice how the two are mutually-exclusive alternatives in the File menu.

Second, dynamic URL in VS2003 changed the Url property of the proxy class.
You should do the same thing. So:

using (localhost.MyWebService service = new localhost.MyWebService())
{
service.Url = http://productionlocation/MyWebService.asmx;
service.MyWebMethod();
}
 

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,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top