468,272 Members | 2,052 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,272 developers. It's quick & easy.

Windows authentication setting in web.config

The ASP.NET application connects to MS-SQL database, and I already disabled
Anonymous access in IIS, and add ASPNET user in it. When I run the
application, it throws the following error on windows authentication:

Server Error in '/' Application.

Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS.

Source Error:

Line 46: by Microsoft that offers a single logon and core profile
services for member sites.
Line 47: -->
Line 48: <authentication mode="Windows"/> //<====== ERROR!!
Here's the portion of the web.config file that I modified, any ideas what's
the problem here?

<configuration>
<appSettings>
<add key="connString" value="Data Source=127.0.0.1;Integrated
Security=SSPI;Network Library=DBMSSOCN;Initial Catalog=studentdb;"></add>
</appSettings>
<system.web>
<identity impersonate="true" />
//etc...

Nov 18 '05 #1
4 1566
one
so , you have checked that the virtual directory has been setup properly? Have you put all your file under the virtual directory? A virtual directory is the boundary for asp.net application. Not the root directory as it once was

ht

----- Matt wrote: ----

The ASP.NET application connects to MS-SQL database, and I already disable
Anonymous access in IIS, and add ASPNET user in it. When I run th
application, it throws the following error on windows authentication

Server Error in '/' Application

Configuration Erro
Description: An error occurred during the processing of a configuration fil
required to service this request. Please review the specific error detail
below and modify your configuration file appropriately

Parser Error Message: It is an error to use a section registered a
allowDefinition='MachineToApplication' beyond application level. This erro
can be caused by a virtual directory not being configured as an applicatio
in IIS

Source Error

Line 46: by Microsoft that offers a single logon and core profil
services for member sites
Line 47: --
Line 48: <authentication mode="Windows"/> //<====== ERROR!
Here's the portion of the web.config file that I modified, any ideas what'
the problem here

<configuration><appSettings><add key="connString" value="Data Source=127.0.0.1;Integrate
Security=SSPI;Network Library=DBMSSOCN;Initial Catalog=studentdb;"></add></appSettings><system.web><identity impersonate="true" /
//etc..


Nov 18 '05 #2
Yes, I put all files under virtual directory. What do u mean "A virtual
directory is the boundary for asp.net application. Not the root directory as
it once was." Can u explain it more? Thanks!!

"one" <on***********@online.nospam> wrote in message
news:9E**********************************@microsof t.com...
so , you have checked that the virtual directory has been setup properly? Have you put all your file under the virtual directory? A virtual directory
is the boundary for asp.net application. Not the root directory as it once
was.
hth

----- Matt wrote: -----

The ASP.NET application connects to MS-SQL database, and I already disabled Anonymous access in IIS, and add ASPNET user in it. When I run the
application, it throws the following error on windows authentication:

Server Error in '/' Application.

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 46: by Microsoft that offers a single logon and core profile services for member sites.
Line 47: -->
Line 48: <authentication mode="Windows"/> //<====== ERROR!!
Here's the portion of the web.config file that I modified, any ideas what's the problem here?

<configuration><appSettings><add key="connString" value="Data Source=127.0.0.1;Integrated Security=SSPI;Network Library=DBMSSOCN;Initial Catalog=studentdb;"></add></appSettings><system.web><identity
impersonate="true" /> //etc...

Nov 18 '05 #3
one
What I meant was that when you create a new project, and a new directory (and web.config) is created. And the user authentication section (and other contents in that web.config) applies to that directory only

But have you tried putting this line

<identity impersonate="true" /

underneath:

<authentication mode="Windows"/

I think the <identity> element needs to be within the <system.web> element

----- Matt wrote: ----

Yes, I put all files under virtual directory. What do u mean "A virtua
directory is the boundary for asp.net application. Not the root directory a
it once was." Can u explain it more? Thanks!

"one" <on***********@online.nospam> wrote in messag
news:9E**********************************@microsof t.com..
so , you have checked that the virtual directory has been setup properly Have you put all your file under the virtual directory? A virtual director
is the boundary for asp.net application. Not the root directory as it onc
was
ht
----- Matt wrote: ----
The ASP.NET application connects to MS-SQL database, and I alread disable Anonymous access in IIS, and add ASPNET user in it. When I run th
application, it throws the following error on windows authentication
Server Error in '/' Application
Configuration Erro Description: An error occurred during the processing of

configuration fil required to service this request. Please review the specific erro detail below and modify your configuration file appropriately
Parser Error Message: It is an error to use a section registered a allowDefinition='MachineToApplication' beyond application level. Thi

erro can be caused by a virtual directory not being configured as a applicatio in IIS
Source Error
Line 46: by Microsoft that offers a single logon and cor
profil services for member sites
Line 47: -->> Line 48: <authentication mode="Windows"/> //<====== ERROR! Here's the portion of the web.config file that I modified, any idea what'
the problem here
<configuration><appSettings><add key="connString" value="Dat
Source=127.0.0.1;Integrate Security=SSPI;Network Library=DBMSSOCN;Initia

Catalog=studentdb;"></add></appSettings><system.web><identit
impersonate="true" />> //etc..

Nov 18 '05 #4
Thanks you!
I'll try that when I'll get back to work...
Where I can get more info about this web.config file configuration?
Thank you again.

--
With the best wishes,
Shaul Feldman

"one" <on***********@online.nospam> wrote in message
news:3B**********************************@microsof t.com...
What I meant was that when you create a new project, and a new directory (and web.config) is created. And the user authentication section (and other
contents in that web.config) applies to that directory only.
But have you tried putting this line:

<identity impersonate="true" />

underneath:

<authentication mode="Windows"/>

?

I think the <identity> element needs to be within the <system.web> element.
----- Matt wrote: -----

Yes, I put all files under virtual directory. What do u mean "A virtual directory is the boundary for asp.net application. Not the root directory as it once was." Can u explain it more? Thanks!!

"one" <on***********@online.nospam> wrote in message
news:9E**********************************@microsof t.com...
> so , you have checked that the virtual directory has been setup properly?
Have you put all your file under the virtual directory? A virtual directory is the boundary for asp.net application. Not the root directory as it once was. >> hth
>> ----- Matt wrote: -----
>> The ASP.NET application connects to MS-SQL database, and I already
disabled
> Anonymous access in IIS, and add ASPNET user in it. When I run the
> application, it throws the following error on windows authentication: >> Server Error in '/' Application.
>> Configuration Error > Description: An error occurred during the processing of a

configuration file
> required to service this request. Please review the specific

error details
> below and modify your configuration file appropriately.
>> Parser Error Message: It is an error to use a section registered as > allowDefinition='MachineToApplication' beyond application
level. This error
> can be caused by a virtual directory not being configured as
an application
> in IIS.
>> Source Error:
>> Line 46: by Microsoft that offers a single logon
and core profile
> services for member sites.
> Line 47: -->> Line 48: <authentication
mode="Windows"/> //<====== ERROR!! >>> Here's the portion of the web.config file that I modified,

any ideas what's
> the problem here?
>><configuration><appSettings><add key="connString" value="Data

Source=127.0.0.1;Integrated
> Security=SSPI;Network Library=DBMSSOCN;Initial

Catalog=studentdb;"></add></appSettings><system.web><identity
impersonate="true" />> //etc... >>>>

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mark | last post: by
5 posts views Thread by Gavin Stevens | last post: by
4 posts views Thread by Nick | last post: by
3 posts views Thread by Rich Miller | last post: by
3 posts views Thread by Doug Bailey | last post: by
reply views Thread by CESAR DE LA TORRE [MVP] | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.