473,608 Members | 2,457 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.
Jul 21 '05 #1
1 3286
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.

Jul 21 '05 #2

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

Similar topics

6
5746
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
3
1524
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
6153
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
4905
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
2494
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
1889
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
1728
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
3168
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.
3
7044
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 run application remotely and retrieve grid and form data in some way without accessing directly to database server? Web Services is being used for this purpose I think, Which methods must be used for this ?
0
8059
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8000
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
8495
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...
0
8330
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
6815
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5475
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
3960
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4023
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1328
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.