473,545 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to deploy a DB-using Webservice to a shared server??

I am an experienced developer...but a novice at creating web services,
so please have mercy on me!

Here is my question: I developed a fairly simple Webservice that
returns a table from SQL Server.

It runs great on my development machine. Now, I must deploy it to my
website. My website is on a shared server holding lots of websites.

The websoervice will not run there. It cannot read my SQL Server
database that I have on the shared server. I do not want to pass in an
unencrypted username and password in the connection string.

The "technical support" is of no use. Seeing the Webservice
description page come up when they type in the asmx, they say "But
it's working fine!"

Can those of you with more experience tell me how you deploy a
webservice that uses SQL Server to a shared server?

Any web resources thay will tell me this? Microsoft documentation is
so THICK with detail I cannot find out what I want to know.

Thanks for any help telling me how YOU do it.
Nov 21 '05 #1
2 2013
In the web.config of the app calling the service, add an identity element:
<identity impersonate="tr ue">.

Make sure that anonymous access is turned off and basic authentication is
off. Set the IIS app to use Windows authentication.

In your app that calls the web service, add:

myService.Crede ntials = System.Net.Cred entialCache.Def aultCredentials ;

With those three steps completed.... if your server isn't on a cluster!!!,
then your web service will have the correct identity object for windows
authentication to the SQL server with one last condition. If the SQL Server
is on the same machine as the web service! If they're on separate machines,
you're stuck with either authorizing the IIS service account to access the
SQL database, or passing a username and password in your connection string.

Dale

"PocketDevelope r" <gg****@mn.rr.c om> wrote in message
news:41******** *************** **@posting.goog le.com...
I am an experienced developer...but a novice at creating web services,
so please have mercy on me!

Here is my question: I developed a fairly simple Webservice that
returns a table from SQL Server.

It runs great on my development machine. Now, I must deploy it to my
website. My website is on a shared server holding lots of websites.

The websoervice will not run there. It cannot read my SQL Server
database that I have on the shared server. I do not want to pass in an
unencrypted username and password in the connection string.

The "technical support" is of no use. Seeing the Webservice
description page come up when they type in the asmx, they say "But
it's working fine!"

Can those of you with more experience tell me how you deploy a
webservice that uses SQL Server to a shared server?

Any web resources thay will tell me this? Microsoft documentation is
so THICK with detail I cannot find out what I want to know.

Thanks for any help telling me how YOU do it.

Nov 21 '05 #2
"Dale" <da************ @msndotcomNot.N et> wrote in message news:<e2******* *******@tk2msft ngp13.phx.gbl>. ..

Thanks, Dale. Well, it IS complex I see. I'm glad it wasn't me being
dumb...it's a complicated situation when you have data access and a
SQL Server security to deeal with as well..

In the web.config of the app calling the service, add an identity element:
<identity impersonate="tr ue">.

Make sure that anonymous access is turned off and basic authentication is
off. Set the IIS app to use Windows authentication.

In your app that calls the web service, add:

myService.Crede ntials = System.Net.Cred entialCache.Def aultCredentials ;

With those three steps completed.... if your server isn't on a cluster!!!,
then your web service will have the correct identity object for windows
authentication to the SQL server with one last condition. If the SQL Server
is on the same machine as the web service! If they're on separate machines,
you're stuck with either authorizing the IIS service account to access the
SQL database, or passing a username and password in your connection string.

Dale

Nov 21 '05 #3

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

Similar topics

2
1304
by: Rick Lederman | last post by:
When will Microsoft allow us to deploy applications developed in VB.NET 2005? I've been testing 2005 for some months now and would like to convert my 2003 pocket PC app to 2005 and then port my VB6 app to 2005. Witn the 2003 Beta I was allowed to deploy about 6 months before release. Also, is there some reference some place on how to...
0
1625
by: ATS | last post by:
HOWTO Make a UserControl deploy an embedded resource. Please help, I need to embed an EXE into a C# UserControl that is run from script in an HTML web page as such: <html> <object id=objTest
4
7062
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a deployment project (myproj installer) I added my windows app to the installer under myproj installer properties, I set bootstrapper
4
1206
by: kerpal | last post by:
Hi all, Suppose I have a single file (over the capacity of a single CD) to be packed into my setup project and the whole VB.NET application is to be distributed on 2 or more CDs. Any recommendations on how I can go about presumably compressing that file and creating the installation CDs? Thanks a lot.
0
1219
by: paps | last post by:
hi i've a file system web site with a SQL Express DB stored in the APP_Data folder and created with the aspnet_regsql utility. On mu local machine every thing work but when i publish the site to a remote webserver on IIS i recive some errors (when i call the default page) : 1) ASPNET (user) cannot access to the Sql Express DB in the App_Data...
28
10230
by: kaleolani65 | last post by:
I have been having an ongoing problem with a DB at work concerning people getting "locked out". Access warnings relating to "exclusive" mode The research I have done and the replies received suggest I split the DB (front-end/back-end). A working copy of the DB was split and I can see how the DB (back-end) is being updated. Being...
4
2283
by: Cirene | last post by:
What is the best way to deploy a website created with VS 2008? (Now that web deployment projects are delayed.) I want to be able to modify the web.config file on the website. Thanks!
1
1456
by: | last post by:
Hi I have written an application that I would like to deploy to the context menu in xp. That is the menu that appears when you press the secondary windows button (generally between the alt and ctrl buttons on the right side of the space bar - or press shift +F10). How do I specify deployment to that menu rather than to the desktop or...
1
1225
by: sherifffruitfly | last post by:
Hi all, I made a c# app that includes a sqlexpress database. I can't seem to find the mdf file though, so I'm wondering exactly how/whether I can give the app to my friend to use/test. Will the db be created on the fly when my friend runs the app?
4
4448
by: Amirallia | last post by:
Hi, How can I deploy my Web service on IIS 6.0 ? I create a web service with VS 2005 on the local IIS, now I must deploy it on an intranet with IIS 6.0. But I can access this intranet, and I don't know wich files must I send to my intranet's client the deploy my web service ? Thanks for you help!
0
7478
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...
0
7410
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...
0
7773
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...
0
5984
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...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4960
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...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
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
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.