473,396 Members | 1,942 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,396 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.
Nov 18 '05 #1
3 2484
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.

Nov 18 '05 #2
Try looking at the Passing Data to a Custom Action walkthrough at:
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxwlkwalkthroughpassingdatatocustomaction.asp

It shows how to set the WebService reference URL to Dynamic, and then
modifying the web service URL during install time to a user-specified value.
Another approach would be to use the Configuration Override File property.
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxurfdeploymentconfigurationpropertiesprojectnamep ropertypagesdialogbox.a
sp

In C# you have to set it in your project file, or you can use a macro to do
it. In VB, it is exposed in the Project Properties dialog under the
Deployment tab.

In short, it allows you to have multiple Web.Config files in your project
(with different file names). Use the web.config file for your development
machine, and have a Release.Config file (or named something like that).
When you select the "Release" configuration, the Release.Config file will
be passed to the setup project, but with a Web.Config file name. Put the
full URL into that .config file.
---
David Guyer - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: Chris Dunaway <dunawayc@_lunchmeat_sbcglobal.net>
Subject: Deploying a Windows Forms App that uses Web Services.
User-Agent: 40tude_Dialog/2.0.10.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Thu, 8 Jan 2004 12:09:14 -0600
Message-ID: <14*****************************@40tude.net>
Newsgroups: microsoft.public.dotnet.framework.aspnet,microsoft .public.dotnet.generalNNTP-Posting-Host: 216.143.212.98
Lines: 1
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftng xa09.phx.gbl!TK2MSFTNGP08.
phx.gbl!TK2MSFTNGP10.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.general:120397 microsoft.public.dotnet.framework.aspnet:200671X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

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.


Nov 18 '05 #3

Thanks to both of you for the helpful info!
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 18 '05 #4

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...
1
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: 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: 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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.