473,394 Members | 2,090 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,394 software developers and data experts.

Database confusion, multiple applications in one website

Hi all,

I have a problem that has me stumped.

I developed an asp.net 2.0 application and it works fine. It is
located in a subweb of a website, so for instance the main site is
called intranet and the application is in intranet/subweb1. It uses a
SQL database, called subweb1.

Now I want to develop a new application at the root of the site
(basically a portal to all the subweb sites). It uses a different SQL
database, called intranet. Each database has a separate SQL user which
the web code uses to connect. So the user is named www_intranet for
the root site (and www_subweb1). The subweb has an application
starting point defined in IIS and has its own web.config and
global.asax files.

But when I try to set up a SQLDataSource in the root application which
references the intranet database, I get errors to the effect that the
www_intranet user doesn't have any rights in the subweb1 database. I
have looked through all the code for the root application, and the
subweb1 database is not even referenced at all. The root site has its
own web.config file and its own global.asax file.

So somewhere I think IIS is "confused" or has "cached" that the user is
still in the subweb application.

Can anyone explain to me why I am seeing this behavior? Is there
something I need to do besides put root-level web.config and
global.asax files in the site to tell IIS that there are two separate
applications? I came from a classic ASP background where (I assumed,
although I never tried it there) that each time you descend into a
subfolder of a website where a global.asa file can be found, and you
define a new application starting point in IIS, it is a new application
with its own application and session variables, its own database
connections etc. Or am I wrong about this?

Thanks in advance.

-- Ned Balzer
ne********@gmail.com

Jan 17 '07 #1
1 1333
Never mind, I found the problem. In the intranet database I had a
distributed query which queried a table in the subweb1 database. So
the www_intranet user really did need access to the subweb1 database,
the way the query was structured.

-- Ned
Ned Balzer wrote:
Hi all,

I have a problem that has me stumped.

I developed an asp.net 2.0 application and it works fine. It is
located in a subweb of a website, so for instance the main site is
called intranet and the application is in intranet/subweb1. It uses a
SQL database, called subweb1.

Now I want to develop a new application at the root of the site
(basically a portal to all the subweb sites). It uses a different SQL
database, called intranet. Each database has a separate SQL user which
the web code uses to connect. So the user is named www_intranet for
the root site (and www_subweb1). The subweb has an application
starting point defined in IIS and has its own web.config and
global.asax files.

But when I try to set up a SQLDataSource in the root application which
references the intranet database, I get errors to the effect that the
www_intranet user doesn't have any rights in the subweb1 database. I
have looked through all the code for the root application, and the
subweb1 database is not even referenced at all. The root site has its
own web.config file and its own global.asax file.

So somewhere I think IIS is "confused" or has "cached" that the user is
still in the subweb application.

Can anyone explain to me why I am seeing this behavior? Is there
something I need to do besides put root-level web.config and
global.asax files in the site to tell IIS that there are two separate
applications? I came from a classic ASP background where (I assumed,
although I never tried it there) that each time you descend into a
subfolder of a website where a global.asa file can be found, and you
define a new application starting point in IIS, it is a new application
with its own application and session variables, its own database
connections etc. Or am I wrong about this?

Thanks in advance.

-- Ned Balzer
ne********@gmail.com
Jan 17 '07 #2

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

Similar topics

5
by: democratix | last post by:
Hi, I've only got a couple years experience developing for Access but have recently been experimenting with HTML/javascript for gui and client-side scripting, mysql for database and php for...
8
by: BMM | last post by:
Hi. I have a dumb question. Is a database an application? And, in the context of a data-driven web-enabled application, is the database still an application? I have a project lead who says it is....
13
by: MLH | last post by:
I have a RDBMS app consisting of 3 primary mdb's... 1) a front-end with a few STATIC tables and the other menagerie of objects 2) a back-end with most of my DYNAMIC tables. I'll call it my main...
1
by: Joel Barsotti | last post by:
I'm building two applications for one website, one is the public website and the other is our private admin site. Fors some of the sales processing utilities I'm using user controls to contain...
2
by: Marcus | last post by:
I have seen many posts of people with the same problem as me (attached below), but I have yet to see any solutions posted. Has anyone figured out how to deploy an Asp.net web site to the webserver...
0
by: i_have_control | last post by:
I'd be grateful for any input on this one: I have three web domains. The destinations of two are set to folders on the first, though that fact is transparent to the user (i.e: it does not...
3
by: Carl Johansen | last post by:
I have a big ASP website (used by several thousand car dealers) that is a collection of lots of small and medium-sized applications. Now I want to start adding ASP.NET applications to it. I have...
3
by: Brian F | last post by:
Ok here goes: WEBSITE main directory allows anonymous users fine. SITEA, SITEB, and SITEC are all subdirectories under WEBSITE that refer to graphics and javascript in the main virtual...
6
by: Stephen Carson | last post by:
I'm trying to build a Web Service that will kick off threads as logging requests come in. These threads will then log to the database. I have been able to make a simple Web Service. I have been...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.