Wednesday, March 7, 2012

Connecting to a remote server

You don't need to have MSDE on the webserver.
Either of those connection strings should work. Use
trusted connection if your users will be authenticating
against the database, use username and password (but not
sa!!) if you can't use trusted.
Sincerely,
Invotion Engineering Team
Advanced Microsoft Hosting Solutions
http://www.Invotion.com

>--Original Message--
>We are setting up a webserver (172.16.0.2) that lives in
the DMZ behind our
>firewall (172.16.0.1)
>I would like this server to connect to a db that lives
on an SQL Server
>(PDC: 192.168.16.2) on our internal lan.
>I have opened port 1433 on the firewall between
172.16.0.2 & 192.168.16.2
>On the webserver I have installed MSDE that the web app
currently connects
>to successfully whilst I determine how to connect it to
the internal server.
>In EM on the SQL Server I can now connect to the MSDE
server, have activated
>TCP/IP 1433 on MSDE, and all works well.
>I would like our Web application to used the internal
SQL Server as opposed
>to the local MSDE.
>In order to connect to the SQL Server at 192.168.16.2 is
MSDE required or
>can it be removed ?
>Do I simply need to specify the port in the querystring
in order to connect
>to the remote server ?
>What users/logins will need to be created in order for
the web app to
>connect to our internal server ?
>Should I use a trusted connection or specify
uid=sa;pwd=abc in the
>querystring ?
>The querystring I have developed so far to connect to
this server is:
> <appSettings>
> <add key="ConnectionString"
>value="server=192.168.16.2,1433;Trusted_Connection=true;d
atabase=store" />
> </appSettings>
>Or should I use:
> <appSettings>
> <add key="ConnectionString"
>value="server=192.168.16.2,1433;uid=sa;pwd=abc;database=s
tore" />
> </appSettings>
>Any assistance would be greatly appreciated.
>
>Thanks
>Murphy
>
>.
>Thanks for your assistance, I have got this to work now and successfully
removed MSDE from the WebServer and all is still working.
As my webserver and SQL server are in different subnets I was having
problems getting a trusted connection to work and could only open the
connection with sa, however I have read that this is not an advisable
practice...
My users will authenticate against the SQL server which will contain a table
of usernames and passwords.
When using the trusted connection does this mean that the account used by
IIS is the one that will connect to SQL server via the query string ? So if
IIS uses the IUSER_SERVER account then I guess this account must have access
to the SQL server db on the sql server machine.
Thanks
Murphy
"Invotion" <anonymous@.discussions.microsoft.com> wrote in message
news:1849201c41b13$9a998f20$a501280a@.phx
.gbl...
> You don't need to have MSDE on the webserver.
> Either of those connection strings should work. Use
> trusted connection if your users will be authenticating
> against the database, use username and password (but not
> sa!!) if you can't use trusted.
> Sincerely,
> Invotion Engineering Team
> Advanced Microsoft Hosting Solutions
> http://www.Invotion.com
>
> the DMZ behind our
> on an SQL Server
> 172.16.0.2 & 192.168.16.2
> currently connects
> the internal server.
> server, have activated
> SQL Server as opposed
> MSDE required or
> in order to connect
> the web app to
> uid=sa;pwd=abc in the
> this server is:
> atabase=store" />
> tore" />

No comments:

Post a Comment