473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Accessing a remote DB via wp_aspnet.exe

Because this worker process using the local ASPNET userid, it is unable to
access Sql Server databases on a remote server. I believe the solution is to
use a domain id and apply it to both... but am not sure how to do this with
wp_aspnet.exe.

Anyone have a solution for this.
Nov 19 '05 #1
8 1451
Accesing a remote SQL Server database is as
simple as configuring ASP.NET to use a remote
SQL Server User's account.

Juan T. Llibre
ASP.NET MVP
===========
"Ray Stevens" <nf*@nospam.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
Because this worker process using the local ASPNET userid, it is unable to
access Sql Server databases on a remote server. I believe the solution is
to
use a domain id and apply it to both... but am not sure how to do this
with
wp_aspnet.exe.

Anyone have a solution for this.

Nov 19 '05 #2
How is what I am asking.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Accesing a remote SQL Server database is as
simple as configuring ASP.NET to use a remote
SQL Server User's account.

Juan T. Llibre
ASP.NET MVP
===========
"Ray Stevens" <nf*@nospam.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
Because this worker process using the local ASPNET userid, it is unable to access Sql Server databases on a remote server. I believe the solution is to
use a domain id and apply it to both... but am not sure how to do this
with
wp_aspnet.exe.

Anyone have a solution for this.


Nov 19 '05 #3
How To: Create a Custom Account to Run ASP.NET
http://msdn.microsoft.com/library/de...SecNetHT01.asp

Eliyahu

"Ray Stevens" <nf*@nospam.com> wrote in message
news:uY**************@TK2MSFTNGP11.phx.gbl...
How is what I am asking.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Accesing a remote SQL Server database is as
simple as configuring ASP.NET to use a remote
SQL Server User's account.

Juan T. Llibre
ASP.NET MVP
===========
"Ray Stevens" <nf*@nospam.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
Because this worker process using the local ASPNET userid, it is
unable
to access Sql Server databases on a remote server. I believe the solution is to
use a domain id and apply it to both... but am not sure how to do this
with
wp_aspnet.exe.

Anyone have a solution for this.



Nov 19 '05 #4
Essentially, you'd use the same connection string
that you'd use for a local connection.

If the other SQL Server is inside your network,
you can use the SQl Server's name in the connection string.

If the other SQL Server is outside your network,
you'll have to use the SQL Server's IP address
in the connection string.

In both cases, you'll have to make sure that the user in the
connection string is authorized to login to the SQL Server
and perform the database operations you are requesting.

To read similar threads by other programmers
who have asked your same question, check out :

http://www.sqlmonster.com/Uwe/Misc/S...r+from+asp.net

Juan T. Llibre
ASP.NET MVP
===========
"Ray Stevens" <nf*@nospam.com> wrote in message
news:uY**************@TK2MSFTNGP11.phx.gbl...
How is what I am asking.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Accesing a remote SQL Server database is as
simple as configuring ASP.NET to use a remote
SQL Server User's account.

Juan T. Llibre
ASP.NET MVP
===========
"Ray Stevens" <nf*@nospam.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
> Because this worker process using the local ASPNET userid, it is unable to > access Sql Server databases on a remote server. I believe the solution is > to
> use a domain id and apply it to both... but am not sure how to do this
> with
> wp_aspnet.exe.
>
> Anyone have a solution for this.
>
>



Nov 19 '05 #5
If you're using IIS 5.0, look into the <processModel> element under
<system.web> in your web.config/machine.config. If you're using IIS 6,
look at the documentation stored with the <processModel> attribute in
your machine.config
(C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Conf ig\machine.config).
Another alternative is you can use impersonation:

<system.web>
<identity impersonate="true" userName="DOMAIN\Username"
password="yourmom" />
</system.web>

Hope that helps.
-Alan

Ray Stevens wrote:
How is what I am asking.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Accesing a remote SQL Server database is as
simple as configuring ASP.NET to use a remote
SQL Server User's account.

Juan T. Llibre
ASP.NET MVP
===========
"Ray Stevens" <nf*@nospam.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
Because this worker process using the local ASPNET userid, it is unable
to
access Sql Server databases on a remote server. I believe the
solution
is to
use a domain id and apply it to both... but am not sure how to do

this with
wp_aspnet.exe.

Anyone have a solution for this.



Nov 19 '05 #6
I don't think that will work in my case. The wp_aspnet worker process, by
default, runs under the local ASPNET account. I need for it to use a domain
account that wil also be authorized in the SQL Server.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Essentially, you'd use the same connection string
that you'd use for a local connection.

If the other SQL Server is inside your network,
you can use the SQl Server's name in the connection string.

If the other SQL Server is outside your network,
you'll have to use the SQL Server's IP address
in the connection string.

In both cases, you'll have to make sure that the user in the
connection string is authorized to login to the SQL Server
and perform the database operations you are requesting.

To read similar threads by other programmers
who have asked your same question, check out :

http://www.sqlmonster.com/Uwe/Misc/S...r+from+asp.net


Juan T. Llibre
ASP.NET MVP
===========

Nov 19 '05 #7
re:
I need for it to use a domain
account that wil also be authorized in the SQL Server.
As I mentioned :
In both cases, you'll have to make sure that the user in the
connection string is authorized to login to the SQL Server
and perform the database operations you are requesting.


If you are using Windows authentication in SQL Server,
you can use a domain account which you can have
ASP.NET impersonate.

Not a huge problem, although it's a bit
more complicated solution than it need be.
There must be hundreds of thousands, if not millions,
of web developers who connect to remote SQL Server
databases using ASP.NET, without a problem, every day.

I don't see why the case you present would be any different.

Furthermore, you might not even need to use a domain
account common to both the IIS server and the SQL Server.

You could try changing your connection string to
Trusted_Connection=yes

When using a trusted connection you do not pass the
UID and password. When you do this, SQL Server
maps the connection to a SQL Server standard login.

If you create a SQL Server standard login
YourIISServer\ASPNET with whatever password
you choose ("yourPassword"), you should connect, too,
if you allow that login the permisssions which your
database operations need.


Juan T. Llibre
ASP.NET MVP
===========
"Ray Stevens" <nf*@nospam.com> wrote in message
news:u8**************@TK2MSFTNGP14.phx.gbl...I don't think that will work in my case. The wp_aspnet worker process, by
default, runs under the local ASPNET account. I need for it to use a
domain
account that wil also be authorized in the SQL Server.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Essentially, you'd use the same connection string
that you'd use for a local connection.

If the other SQL Server is inside your network,
you can use the SQl Server's name in the connection string.

If the other SQL Server is outside your network,
you'll have to use the SQL Server's IP address
in the connection string.

In both cases, you'll have to make sure that the user in the
connection string is authorized to login to the SQL Server
and perform the database operations you are requesting.

To read similar threads by other programmers
who have asked your same question, check out :

http://www.sqlmonster.com/Uwe/Misc/S...r+from+asp.net



Juan T. Llibre
ASP.NET MVP
===========


Nov 19 '05 #8
This is exactly what I was looking for.

Now the problem is the last Note in that link:

"With the current release of the >NET Framework, there is no way to avoid
storing the password in clear text. While storing clear text credentials is
not recommended, the machine.config file is considered more secure because
it is located outside the Web space. You should secure machine.config
against unnecessay access by using an approrately configured ACL."

The problem I am now facing is our shop is taking Sarbanes-Oxley to its
extreme and set a policy against having storing credentials in clear text.
This article is for 1.1... does that statement still hold true for 2.0?
I.e., can this be encrypted?

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ex****************@TK2MSFTNGP09.phx.gbl...
How To: Create a Custom Account to Run ASP.NET
http://msdn.microsoft.com/library/de...SecNetHT01.asp
Eliyahu

Nov 19 '05 #9

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

Similar topics

4
by: Jaydeep | last post by:
Hello, I am facing a strange problem. Problem accessing remote database from ASP using COM+ server application having VB components (ActiveX DLL) installed. Tier 1 : ASP front End (IIS 5.0) Tire...
2
by: Douglas Harber | last post by:
If I have DB2 8.1 (FP5, I believe, but not relevant to my question...I hope) installed on my desktop, do I have what I need to connect to a remote DB2 server (also running 8.1 FP5) from my desktop...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
2
by: Jon L. Lovesky | last post by:
Hello all, I am attempting to access a remote folder from an asp.net application (all within the same domain). The application is configured for windows authentication in IIS and the asp.net...
3
by: Fredric Ragnar | last post by:
Hi, I am making a prototype system with Remoting in the bottom of the system. An XML Web Service is using the remote object on an IIS to present data. I am using a TcpChannel for communicating...
3
by: Pakna | last post by:
Hello, I have what may be a beginner's question regarding DB2. How does one access a remote table on a remote database via SQL? What is the command string, is there an equivalent of Oracle...
5
by: Mike | last post by:
I'm having trouble accessing SQL2005 Standard Edition as a second instance of SQL Server where the first instance is SQL 2000 Enterprise Edition. I installed SQL 2005 as a named instance...
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
1
by: Usenet User | last post by:
From a .NET 1.1 app: need to access a file share on a remote server by its UNC path, i.e., \\server\folder\subfolder\, using specific username and password. The problem is that the credentials...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.