473,739 Members | 4,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2502
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.Configur ation.Configura tionSettings.Ap pSettings["WebService Url"];

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

<add key="WebService Url"
value="http://ProductionServe r/WebServices/SomeService.asm x" />

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@_lunc hmeat_sbcglobal .net> wrote in message
news:14******** *************** ******@40tude.n et...
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/vxwlkwalkthroug hpassingdatatoc ustomaction.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/vxurfdeployment configurationpr opertiesproject namepropertypag esdialogbox.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@_lunc hmeat_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.publi c.dotnet.framew ork.aspnet,micr osoft.public.do tnet.generalNNTP-Posting-Host: 216.143.212.98
Lines: 1
Path: cpmsftngxa07.ph x.gbl!cpmsftngx a06.phx.gbl!cpm sftngxa09.phx.g bl!TK2MSFTNGP08 .
phx.gbl!TK2MSFT NGP10.phx.gblXref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.genera l:120397 microsoft.publi c.dotnet.framew ork.aspnet:2006 71X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
5783
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 modified that is to upgrade a big, more than 100,000 lines DOS based program developed by FoxPro 2.x to .NET platform. The design is as previous and the implementation will be reprogrammed. As a duty in my job I should find an answer about the
1
3291
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 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.
3
1534
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 most of the time it is a security/privilege problem. One time I succeeded to run the app by making the user a local administrator of the computer. My app only uses the standard 1.1 system assemblies. The other proprietary assemblies(COM interop...
20
6164
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 we go.... Today, I have a C# .NET executable, I copied the used .NET dll into the same folder. Went to the other computer copied the folder locally. I double click on the exe file and a lot of errors that looks like Access violations except it...
14
4913
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 is create an MDIChild window for each service that is sending messages. Ok so far so good, but I get problems if one service is constantly sending messages to it's window because, this window is very busy updating it's view, hence because it's...
3
1900
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 Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
8
1737
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 Server and also in my IIS. I can publish it on my computer easily, But CAN'T publish or deploy it on other machines with almost same configuration. The Service in working on all other machines too. I've tried several ways to set all permissions...
4
3174
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 Services? Thanks in advance.
0
8792
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9479
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9266
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9209
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6054
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3280
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.