Configuration Error : Web.Config [No Relevant Source Line]


A

aSoundMind

Hi there, I recieve this error

Server Error in '/integrate' 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: An error occurred loading a configuration file:
Access to the path 'C:\Inetpub\wwwroot\integrate\web.config' is
denied.

Source Error:


[No relevant source lines]


Source File: C:\Inetpub\wwwroot\integrate\web.config Line: 0


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210



This is the scenario
1. The code was working fine before
2. I Copy the "integrate" folder, the folder where my code is, and
made a backup "copy of integrate"
3. Then I copy the codes from development to production into the
"integrate" folder
4. Run the code, I recieved the error
5. I revert back to original folder by DELETING all the files. Open
the backup, copy all the files from "copy of integrate" to "integrate"
folder.
6. Run the code, I recieved the same error
7. IIS Reset
8. Run the code, same error

I am totally blur on what's going on here. If the webconfig and all
the files are all the same with the original state, why is it giving
that error?

Please do help. Thanks in advance.

//Jack
 
Ad

Advertisements

A

aSoundMind

Hi there, I recieve this error

Server Error in '/integrate' 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: An error occurred loading a configuration file:
Access to the path 'C:\Inetpub\wwwroot\integrate\web.config' is
denied.

Source Error:

[No relevant source lines]

Source File: C:\Inetpub\wwwroot\integrate\web.config Line: 0

---------------------------------------------------------------------------­-----
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210

This is the scenario
1. The code was working fine before
2. I Copy the "integrate" folder, the folder where my code is, and
made a backup "copy of integrate"
3. Then I copy the codes from development to production into the
"integrate" folder
4. Run the code, I recieved the error
5. I revert back to original folder by DELETING all the files. Open
the backup, copy all the files from "copy of integrate" to "integrate"
folder.
6. Run the code, I recieved the same error
7. IIS Reset
8. Run the code, same error

I am totally blur on what's going on here. If the webconfig and all
the files are all the same with the original state, why is it giving
that error?

Please do help. Thanks in advance.

//Jack

Hi again,

I forgot to include my web.config code

<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings>
<add name="MSPConnString" connectionString="Data
Source=JKTGRHXSAPPS2;Initial Catalog=ProjectServer;Integrated
Security=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>

//Jack
 
K

Konstantinos Pantos

I'm guessing that ASP.NET account (the account .NET uses to run web sites)
does not have at least read access to your web.config file. It seems that
for some reason when you created the new folder C:\Inetpub\wwwroot\integrate,
it didn't inherit the wwwroot default security settings.

HTH,

--
Konstantinos Pantos,
Software Engineer
Microsoft MVP [ASP.NET]
http://kostas.pantos.name
http://blog.pantos.name
Hi there, I recieve this error

Server Error in '/integrate' 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: An error occurred loading a configuration file:
Access to the path 'C:\Inetpub\wwwroot\integrate\web.config' is
denied.

Source Error:

[No relevant source lines]

Source File: C:\Inetpub\wwwroot\integrate\web.config Line: 0

---------------------------------------------------------------------
------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210
This is the scenario
1. The code was working fine before
2. I Copy the "integrate" folder, the folder where my code is, and
made a backup "copy of integrate"
3. Then I copy the codes from development to production into the
"integrate" folder
4. Run the code, I recieved the error
5. I revert back to original folder by DELETING all the files. Open
the backup, copy all the files from "copy of integrate" to
"integrate"
folder.
6. Run the code, I recieved the same error
7. IIS Reset
8. Run the code, same error
I am totally blur on what's going on here. If the webconfig and all
the files are all the same with the original state, why is it giving
that error?

Please do help. Thanks in advance.

//Jack
Hi again,

I forgot to include my web.config code

<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings>
<add name="MSPConnString" connectionString="Data
Source=JKTGRHXSAPPS2;Initial Catalog=ProjectServer;Integrated
Security=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
//Jack
 
A

aSoundMind

I'm guessing that ASP.NET account (the account .NET uses to run web sites)
does not have at least read access to your web.config file. It seems that
for some reason when you created the new folder C:\Inetpub\wwwroot\integrate,
it didn't inherit the wwwroot default security settings.

HTH,

--
Konstantinos Pantos,
Software Engineer
Microsoft MVP [ASP.NET]http://kostas.pantos.namehttp://blog.pantos.name
Hi there, I recieve this error
Server Error in '/integrate' 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: An error occurred loading a configuration file:
Access to the path 'C:\Inetpub\wwwroot\integrate\web.config' is
denied.
Source Error:
[No relevant source lines]
Source File: C:\Inetpub\wwwroot\integrate\web.config Line: 0
---------------------------------------------------------------------
------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210
This is the scenario
1. The code was working fine before
2. I Copy the "integrate" folder, the folder where my code is, and
made a backup "copy of integrate"
3. Then I copy the codes from development to production into the
"integrate" folder
4. Run the code, I recieved the error
5. I revert back to original folder by DELETING all the files. Open
the backup, copy all the files from "copy of integrate" to
"integrate"
folder.
6. Run the code, I recieved the same error
7. IIS Reset
8. Run the code, same error
I am totally blur on what's going on here. If the webconfig and all
the files are all the same with the original state, why is it giving
that error?
Please do help. Thanks in advance.
//Jack
Hi again,
I forgot to include my web.config code
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings>
<add name="MSPConnString" connectionString="Data
Source=JKTGRHXSAPPS2;Initial Catalog=ProjectServer;Integrated
Security=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
//Jack

Hi Konstantinos,

I hvn't checked the security permission for web.config. Would you mind
explaning more on "C:\Inetpub\wwwroot\integrate,
it didn't inherit the wwwroot default security settings."

How to make it inherit the default security settings?

Thanks
 
Ad

Advertisements

G

George Ter-Saakov

Right Click on the folder "integrate" then "Security" tab, button "Advanced"
check at the bottom "Replace permission entries...."

And hit OK button.

Then all files in that folder will inherit permissions of that folder.

Usually newly created files inherit parent's folder permissions. But if you
created file some other folder and then move it to another folder then
permissions stay and not get inherited

George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top