 |
| ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

December 4th, 2010, 09:59 AM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Error in web.config file
I am getting runtime error in web.config file. The error that shows up is the following:
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
Then I modified web.config in all the three modes on,off,remoteonly....for any mode i am getting the same message...
Then as per a expert's advice I went through the following :- "You have to load the web.config into the application root. This means it can either be the IIS root (if that is where the application is based) or to the virtual application root. If you upload the file into a directory underneath the application root, .NET will throw an error telling you that you can't put certain config nodes in a config file there. This tells you you are 1 or more directories too deep.
One thing to check on when you upload the file:
When you make changes to web.config the application will reset itself and the next page hit should be considerably slower because it's recompiling itself. If you make changes to the .config file and you don't see this delay, you are probably not putting the file in the right place.
". But the same error is coming.
Please suggest.
|
|

December 4th, 2010, 10:13 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
A few things you can check:
1. Make sure the file is invalid. Try opening it in Visual Studio as part of the web project
2. Look in the server's Event Viewer and see if additional data has been recorded.
If none of this helps, you need to show us the code for web.config and explain how you structured your site in IIS and physically
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

December 4th, 2010, 10:59 AM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Error in web.config
Hello Imar,
Thanks for the quick response.
Please find below the web.config file I am using.
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensions SectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGro up, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptReso urceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebService sSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerial izationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere"/>
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileSer viceSection, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthentica tionServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServic eSection, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages enableEventValidation="true">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp"
namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls>
<tagMapping>
<add
tagType="System.Web.UI.WebControls.CompareValidato r"
mappedTagType="Sample.Web.UI.Compatibility.Compare Validator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.CustomValidator "
mappedTagType="Sample.Web.UI.Compatibility.CustomV alidator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.RangeValidator"
mappedTagType="Sample.Web.UI.Compatibility.RangeVa lidator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.RegularExpressi onValidator"
mappedTagType="Sample.Web.UI.Compatibility.Regular ExpressionValidator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.RequiredFieldVa lidator"
mappedTagType="Sample.Web.UI.Compatibility.Require dFieldValidator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.ValidationSumma ry"
mappedTagType="Sample.Web.UI.Compatibility.Validat ionSummary, Validators,
Version=1.0.0.0"/>
</tagMapping>
</pages>
<!--
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">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Configuration.Install,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Transactions, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Drawing, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Core, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false"
type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
<customErrors mode="Off"></customErrors>
</system.web>
<system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength
and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication
service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->
<!-- Uncomment these lines to enable the profile
service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property
name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2 " />
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/><add name="ScriptModule"
preCondition="managedHandler" type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/><remove
name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx"
preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFact ory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*"
path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode"
verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<connectionStrings>
<!--add name="strConn" connectionString="data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|lmed i.mdf;User Instance=true"/-->
<!--"Server=sqlexpress;Database=mediexpert;Trusted_Con nection=True;Connection
Timeout=10; Data Source=VPS122;Initial Catalog=mediexpert;User
ID=sa;Password=password;"-->
<add name="strConn" connectionString="Data Source=VPS122\sqlexpress;Initial
Catalog=Sanjivani;User ID=sa;Password=password;"/>
<!--Data Source=64.244.58.138\sqlexpress;Initial Catalog=MediExpert;User
ID=sa;Password=***********-->
</connectionStrings>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="WarnAsError"
value="false"/></compiler>
<compiler language="vb;vbs;visualbasic;vbscript"
extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="OptionInfer"
value="true"/>
<providerOption name="WarnAsError"
value="false"/></compiler></compilers></system.codedom>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/></dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration
>
I have done the following things to create the virtual directory in IIS.
1.I have a created a virtual directory through IIS manager .
2.Then on the property setting, i have set asp.net version 2.0,Default page (Default.aspx) under document tab.
3.Then I browsed the Default.aspx page from IIS manager Application directory.
|
|

December 4th, 2010, 11:13 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I still need a bit more information to help you out:
1. Did you try opening the config file in Visual Studio to see if it's valid?
2. Did you look in the Event Viewer?
3. Your config file has some external references / dependencies. Are all of them present on the server?
4. Did you create an application or just a virtual directory? In the latter case, you can't use this config file as it defines a lot of stuff that applies to applications only.
BTW: when posting code, please wrap it in code tags using the Code button on the toolbar. Your current confid code is hard to impossible to read / diagnose.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

December 4th, 2010, 11:18 AM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Hello Imar,
I regret the inconvenience. Please find the code below.
Code:
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensions SectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGro up, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptReso urceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebService sSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerial izationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere"/>
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileSer viceSection, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthentica tionServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServic eSection, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages enableEventValidation="true">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp"
namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls>
<tagMapping>
<add
tagType="System.Web.UI.WebControls.CompareValidato r"
mappedTagType="Sample.Web.UI.Compatibility.Compare Validator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.CustomValidator "
mappedTagType="Sample.Web.UI.Compatibility.CustomV alidator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.RangeValidator"
mappedTagType="Sample.Web.UI.Compatibility.RangeVa lidator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.RegularExpressi onValidator"
mappedTagType="Sample.Web.UI.Compatibility.Regular ExpressionValidator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.RequiredFieldVa lidator"
mappedTagType="Sample.Web.UI.Compatibility.Require dFieldValidator, Validators,
Version=1.0.0.0"/>
<add
tagType="System.Web.UI.WebControls.ValidationSumma ry"
mappedTagType="Sample.Web.UI.Compatibility.Validat ionSummary, Validators,
Version=1.0.0.0"/>
</tagMapping>
</pages>
<!--
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">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Configuration.Install,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Transactions, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Drawing, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Core, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false"
type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
<customErrors mode="Off"></customErrors>
</system.web>
<system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength
and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication
service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->
<!-- Uncomment these lines to enable the profile
service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property
name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2 " />
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/><add name="ScriptModule"
preCondition="managedHandler" type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/><remove
name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx"
preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFact ory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*"
path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode"
verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<connectionStrings>
<!--add name="strConn" connectionString="data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|lmed i.mdf;User Instance=true"/-->
<!--"Server=sqlexpress;Database=mediexpert;Trusted_Con nection=True;Connection
Timeout=10; Data Source=VPS122;Initial Catalog=mediexpert;User
ID=sa;Password=password;"-->
<add name="strConn" connectionString="Data Source=VPS122\sqlexpress;Initial
Catalog=Sanjivani;User ID=sa;Password=password;"/>
<!--Data Source=64.244.58.138\sqlexpress;Initial Catalog=MediExpert;User
ID=sa;Password=***********-->
</connectionStrings>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="WarnAsError"
value="false"/></compiler>
<compiler language="vb;vbs;visualbasic;vbscript"
extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion"
value="v3.5"/>
<providerOption name="OptionInfer"
value="true"/>
<providerOption name="WarnAsError"
value="false"/></compiler></compilers></system.codedom>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/></dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration
>
|
|

December 4th, 2010, 11:25 AM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Error in web.config
Hello Imar,
Please find my answers below with respect to your questions.
1. Did you try opening the config file in Visual Studio to see if it's valid?
- I did that. Its valid. No error/syntax error comes up.
2. Did you look in the Event Viewer?- I am not able to understand how to open it up with event viewer. Where can I find the event viewer.
3. Your config file has some external references / dependencies. Are all of them present on the server?
- Yes all are present in the server. We have used some dll files and ajax files which are all present in the server.
4. Did you create an application or just a virtual directory? In the latter case, you can't use this config file as it defines a lot of stuff that applies to applications only.
- We have created an virtual directory. What's the solution for this now?
|
|

December 4th, 2010, 11:30 AM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Error in web.config
Hello Imar,
I have managed to go through the event viewer in windows server 2003. It shows me three files i.e.
System
Application
Security
|
|

December 4th, 2010, 11:41 AM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Error in web.config
Hello Imar,
I went through the application in Event viewer. In the meanwhile I refreshed the page where I run my application. Then I got the following warning message in Event viewer.
Event code: 3008
Event message: A configuration error has occurred.
Event time: 12/4/2010 9:34:03 AM
Event time (UTC): 12/4/2010 3:34:03 PM
Event ID: 3838e96f2e94435cbac4c345ef04eb59
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/56914563/Root-1-129359504390120000
Trust level: Full
Application Virtual Path: /
Application Path: C:\Hostspace\Learnitude\LearnitudeMediExpert\
Machine name: VPS122
Process information:
Process ID: 61048
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: ConfigurationErrorsException
Exception message: An error occurred loading a configuration file: Access to the path 'C:\Hostspace\Learnitude\LearnitudeMediExpert\web. config' is denied. (C:\Hostspace\Learnitude\LearnitudeMediExpert\web. config)
Request information:
Request URL: http://64.244.58.138:81/Default.aspx
Request path: /Default.aspx
User host address: 64.244.58.138
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.HttpRuntime.HostingInit(HostingEnvironm entFlags hostingFlags)
|
|

December 4th, 2010, 12:02 PM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Error in web.config
Hello Imar,
I am still waiting for your reply. Please help me out.
|
|

December 4th, 2010, 01:50 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Take a look at the log you posted; the problem is staring you in the face:
Quote:
Exception information:
Exception type: ConfigurationErrorsException
Exception message: An error occurred loading a configuration file: Access to the path 'C:\Hostspace\Learnitude\LearnitudeMediExpert\web. config' is denied. (C:\Hostspace\Learnitude\LearnitudeMediExpert\web. config)
|
The account used by the web server (Network Service) does not have the necessary permissions to the web.confg file.
Cheers,
Imar
|
|
 |