473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Deploying a Windows Forms App that uses Web Services.

A quick scan of the group did not immediately reveal an answer to my
questions so here goes.

First let me describe my app and then I'll ask the questions.

I am writing a Windows Forms App (not Web Forms) that serves as a thin
client to some web services. In other words, the Windows Forms app will be
installed on the client machines and that app will call web services that
are deployed on my server.

In the process of developing the Windows Forms app and web services, I
naturally used my development machine. I referenced the web services using
localhost since my development machine has both IIS and SQL2K. All fine
and dandy, now my questions, which are probably easy, but this is a new
arena for me (web servies, not VB).

1. When I look at the web references for the app, the reference is
localhost (referring to my development machine). The web services will
ultimately be deployed to the production server which is not localhost.
How will the Windows Forms Client cope with it? The code references
localhost. Will I have to rebuild the client AFTER I have deployed to the
production server? What if, during the life of the app, I need to move the
web services to a different server? How does the client app cope with
that? I feel dumb asking because this seems like a common scenario that I
already should know, but any help is appreciated.

2. I only want my web serviced to be consumed by my client app. How can I
restrict access to only my application? How can I prevent other
applications from detecting and consuming my web services without
permission?

Thanks again, looking forward to any responses.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Jul 21 '05 #1
1 3272
When compiling the application on your development machine, you should use
localhost as your reference. However, you can also store the Url of the
webservice in the app.config file, and then set this value at run time,
using the Url property.

Eg.

MyWebService proxy = new MyWebService();
proxy.Url =
System.Configuration.ConfigurationSettings.AppSett ings["WebServiceUrl"];

Your app.config file would then contain the WebService Url:

<add key="WebServiceUrl"
value="http://ProductionServer/WebServices/SomeService.asmx" />

If during the life of the application, the Url to the webservice changed,
you would only need to change the app.config on each client machine, rather
than change the webreference, recompile, and re-install on every machine.
When the application is run, it will automatically pull the updated
webservice location from app.config.

To answer your second question, there are various ways of securing
webservices. If the application is only going to be used from within your
network, and you've got a fixed IP range, then you could use IP-based
security on the IIS host. You could also use SOAP headers, passing a
username and password or some kind of authorisation ticket in each request
to the webservice. See this article on MSDN for details:
http://msdn.microsoft.com/library/de...OAPHeaders.asp

Hope this helps,

Mun

--
Munsifali Rashid
http://www.munsplace.com/


"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:14*****************************@40tude.net...
A quick scan of the group did not immediately reveal an answer to my
questions so here goes.

First let me describe my app and then I'll ask the questions.

I am writing a Windows Forms App (not Web Forms) that serves as a thin
client to some web services. In other words, the Windows Forms app will be installed on the client machines and that app will call web services that
are deployed on my server.

In the process of developing the Windows Forms app and web services, I
naturally used my development machine. I referenced the web services using localhost since my development machine has both IIS and SQL2K. All fine
and dandy, now my questions, which are probably easy, but this is a new
arena for me (web servies, not VB).

1. When I look at the web references for the app, the reference is
localhost (referring to my development machine). The web services will
ultimately be deployed to the production server which is not localhost.
How will the Windows Forms Client cope with it? The code references
localhost. Will I have to rebuild the client AFTER I have deployed to the
production server? What if, during the life of the app, I need to move the web services to a different server? How does the client app cope with
that? I feel dumb asking because this seems like a common scenario that I
already should know, but any help is appreciated.

2. I only want my web serviced to be consumed by my client app. How can I restrict access to only my application? How can I prevent other
applications from detecting and consuming my web services without
permission?

Thanks again, looking forward to any responses.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project...
3
by: Keith | last post by:
I am using the built-in setup installer which comes with VS 2003. I am always having problems running the application on other machines other than my development machines with VS. It seems like...
20
by: | last post by:
Back in the Old days, I compile a C++ executable, copy the dll's used by this executable to the same folder. Go to another computer, copy that folder locally, double click on the exe file and off...
14
by: Brian Keating EI9FXB | last post by:
I wonder can anyone reccomment a solution to this problem. Let me explain, I've services running on my system, my application receives diagnostic messages from these services, what i want to do...
3
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not...
3
by: Rachel | last post by:
Hi, I am using the data access application block successfully in our development environment, however when I deploy to our testing server as Private Assemblies I keep getting the following ...
8
by: Afshar | last post by:
Hi Group, Please help ending my Nightmare! There's a Windows Service written in VC++ and I have an ASP.NET project that uses this sevice as a COM library. It just works fine in VS Internal Web...
4
by: Kürşat | last post by:
Hi all, I use System.Windows.Forms.Timer with a Windows service but nothing happens after given interval elapsed. It seems timer event does not occur. How can I use timers with Windows...
3
by: Sylvie | last post by:
My Windows Application has two forms, one form contains a grid (lets say Stock Listing), and the other is a form of one stock, contains some edit boxes for one stock's fields.. Is it possible to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.