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

From: Dale (daleDeletepres_at_msndotcomNot.Net)
Date: 07/21/04


Date: Tue, 20 Jul 2004 20:53:20 -0500

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

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.Credentials = System.Net.CredentialCache.DefaultCredentials;

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

"PocketDeveloper" <ggalen@mn.rr.com> wrote in message
news:41280774.0407191233.92a046a@posting.google.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.



Relevant Pages

  • Best way to deploy authentication on web services
    ... I'm building a distributed app that will be accessible to both domain ... web server that holds the client app with 2 virtual directories. ... Is it possible to have one authentication scheme on the ... passed back to the web service to future calls? ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Login failed for user NT AUTHORITYANONYMOUS LOGON
    ... Do you want the Windows App ... This means that each application user will have to have a SQL Server login ... > Web service on a w2K3 server, using integrated authentication, web.config ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: SqlConnection and DB connection failures detection
    ... | Now question - after performing insert query I'm closing connection, ... | but my process still exists in SQL Server Activity Monitor (even if i ... | close my app) with "Sleeping" status. ... Authentication is all about security, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Authentication problem continued
    ... SQL Server is configured for Windows Authentication only and not mixed ... I'm still having trouble getting my app to authenticate correctly. ... but only on my developement machine and not another box. ...
    (microsoft.public.dotnet.framework.aspnet)
  • operation has timed out error
    ... to the sql server db. ... The app and web service are running fine on my ... connection timeout property is set to 60 ...
    (microsoft.public.dotnet.framework)