Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Unable to run it

Hi,
After I've published the project fine to
WIN-BVDIC8GIAHI/Login

using Web developer 2010, when I further run it like
https://WIN-BVDIC8GIAHI/Login

I get this. Why?

Server ErrorInternet Information Services 7.5

Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error InformationModule IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x800700b7
Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined  
Config File \\?\C:\inetpub\wwwroot\web.config
Requested URL https://win-bvdic8giahi:443/Login
Physical Path  
Logon Method Not yet determined
Logon User Not yet determined
 Config Source
    5:             <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    6:                 <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
    7:                 <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
 Links and More InformationThis error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
View more information »
Avatar of Eduard Ghergu
Eduard Ghergu
Flag of Romania image

Hi,
Do youhave different configuration for debug and release/deployment? If not, replace the deployed web.config with the one used for development.
Avatar of Peter Chan

ASKER

No, I don't have the one specific for debug and release/deployment. How to adjust the relevant Web.config file for resolving this?
There is some problem in your config file. Your config file is invalid.

Look at the error message.

Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined  Config File \\?\C:\inetpub\wwwroot\web.config

Remove the duplicate entries and make your web.config file as valid one.
Look at your eventviewer to get some additional information as well.
Sorry I don't see such part
system.web.extensions/scripting

within Web..config file.
C:\inetpub\wwwroot\web.config whether this config file you referred?

Please check in that config as well. If found duplicate just remove it.

Before deploying to IIS, have you run in VS.NET IDE itself? Isit working fine?
Here is the file
http://dl.dropbox.com/u/40211031/Web%20(server).config

which is actually
C:\inetpub\wwwroot\Web.config

and in which I don't see the part you mentioned.

And here is the one of the project
http://dl.dropbox.com/u/40211031/Web%20(project).config

Yes, I can run it within Web developer directly.

Many Thanks & Best Regards,
HuaMin
Any advice to this?
Any advice to this?
The difference between project and server is that the <configSections> is commented for the former one.
Why did I get the problem when running it?
Because no one the the declared sections is defined into the config file.
How to correct the 2 config files? I need details. Thanks
I think that by commenting in the configsections will be enough, but this should be tested.
Many many thanks. After I also comment the part in server config file like
      <!--<configSections>
            <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                  <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                              <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
                              <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                              <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                              <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                        </sectionGroup>
                  </sectionGroup>
            </sectionGroup>
      </configSections>-->
 
I still get this
Server Error in Application "DEFAULT WEB SITE"Internet Information Services 7.5

Error Summary
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. Detailed Error InformationModule IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL https://win-bvdic8giahi:443/Login 
Physical Path C:\inetpub\wwwroot\Login
Logon Method Anonymous
Logon User Anonymous
 Most likely causes:
The directory or file specified does not exist on the Web server.
The URL contains a typographical error.
A custom filter or module, such as URLScan, restricts access to the file.
 Things you can try:
Create the content on the Web server.
Review the browser URL.
Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.
 Links and More InformationThis error means that the file or directory does not exist on the server. Create the file or directory and try the request again.
View more information »
Do you have a web application or a website configured on IIS?
Yes, I configured the website on IIS.
The user rights are correctly set?
I got the error when I started to run the project in server using administrator login.
Your page request shouldn't have the aspx extension? I mean, the request to
https://win-bvdic8giahi:443/Login shouldn't be https://win-bvdic8giahi:443/Login.aspx ?
The ssl is correctly configured? Can you start Fiddler (http://www.fiddler2.com/fiddler2/) when you're making the request in order to get more info?
I run it like
https://WIN-BVDIC8GIAHI/Login

Should I use the port like you? How to check ssl is fine? I just have set up Fiddler. I now rerun this
https://WIN-BVDIC8GIAHI/Login

but I get
Server Error in Application "DEFAULT WEB SITE"Internet Information Services 7.5

Error Summary
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. Detailed Error InformationModule IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL https://win-bvdic8giahi:443/Login 
Physical Path C:\inetpub\wwwroot\Login
Logon Method Anonymous
Logon User Anonymous
 Most likely causes:
The directory or file specified does not exist on the Web server.
The URL contains a typographical error.
A custom filter or module, such as URLScan, restricts access to the file.
 Things you can try:
Create the content on the Web server.
Review the browser URL.
Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.
 Links and More InformationThis error means that the file or directory does not exist on the server. Create the file or directory and try the request again.
View more information »
 
Anything to take from Fiddler which maybe act as guard.
If your application is asp.net, you should have the .aspx extension.
No by this
https://WIN-BVDIC8GIAHI/Login.aspx

I get
Server Error in '/' Application.
--------------------------------------------------------------------------------

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Login.aspx


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
Something is not ok with the web app on the IIS... The web site is running? Can you display a static resource like a dummy html file hosted on the same site?
No, the point is,in the past, before I upgraded to .Net framework 4.0, I always run it like
https://WIN-BVDIC8GIAHI/Login

without '.aspx' when I started to run the starting project and it was fine using the above.
In this case, it seems that you had some kind of custom routing on your IIS... Did you tried to deploy on another machine?
Sorry, how to identify where the reason of the issue is? I have only one server machine only.
Maybe you can use a virtual machine... But it's expensive from the time and computing resources point of view... Did you tried with the static page?
Sorry, I really don't have the details to try with the static page. Please help.

Do you think it is really worth of giving up the current server, and then retrying with one other virtual machine server, due to such issue?
Hi, as I have previously mentioned, a static page is just a plain html file that should be placed in the same folder as login.aspx.

As I said, it takes some time and resources to create a virtual machine. The idea is to test on a new IIS installation to see if there are problems with existing configuration.
OK, if I have one static page on the same folder of login.aspx, how to auto. run it when I start the project?
Good day Ghergu,
I put one html file called Start.html, into
C:\inetpub\wwwroot

Then I run this
https://WIN-BVDIC8GIAHI/Start.html

and I can show the html file fine.

Many Thanks & Best Regards,
HuaMin
Ok, so the problem is with asp.net installation/configuration. Can you check if the application pool is correctly configured?
Good day Ghergu,
I see in IIS now 'Login' below, which is the project I'm calling, is under 'WIN-BVDIC8GIAHI', not 'WIN-BVDIC8GIAHI/wwwroot'. Is this a problem?
http://dl.dropbox.com/u/40211031/t235.png

Many Thanks & Best Regards,
HuaMin
From the picture, results that you have a web application called Login into a website called WIN-BVDIC8GIAHI. wwwroot is a virtual foldder. If you want Login to indicate to wwwroot, you'll have to change the settings of Login.
What do you think to the problem I originally have got?

Many Thanks & Best Regards,
HuaMin
Maybe it is just a configuration problem, but, definitively, the original web.config was not ok with that sectionGroup.
How to correct it?
Can you provide me a screen capture with what is displayed when you click on the Sites node?
See this
http://dl.dropbox.com/u/40211031/t236.png

Many Thanks & Best Regards,
HuaMin
Hi,
Not server node, but Sites.
No, The "Sites" node is 2 steps below what you've selected (below Application Pools).
Yes, I showed you 'Sites' which is right under 'Application Pool' by
http://dl.dropbox.com/u/40211031/t237.png
Select, please, that node.
Now it's ok, thanks. In this case, in order to access the site, you'll have to specify also the port, because WIN-BV... is using port 81.
Sorry by this
http://WIN-BVDIC8GIAHI:81/Login

I get
Server Error in '/Login' Application.
--------------------------------------------------------------------------------

Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

Stack Trace:


[FileNotFoundException: Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +62
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +42
   System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +77
   System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +105
   System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +64

[ConfigurationErrorsException: Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
   System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +11206733
   System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +78
   System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +194
   System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1891
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +166
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382

[HttpException (0x80004005): Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11335894
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4355316

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456

By this
http://WIN-BVDIC8GIAHI:81/Login.aspx

I get
Server Error in '/' Application.
--------------------------------------------------------------------------------

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Login.aspx


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456
SOLUTION
Avatar of Eduard Ghergu
Eduard Ghergu
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You are correct! That is 3.5 and I've corrected. Then I've reployed/rerun the project but I still get this
Server Error in '/Login' 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: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error:


Line 30:             during development.
Line 31:         -->
Line 32:     <compilation debug="true" targetFramework="4.0">
Line 33:       <assemblies>
Line 34:         <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
 

Source File: C:\inetpub\Login\web.config    Line: 32


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456

and this is the part of the relevant config file (at line 32) in the server
            <compilation debug="true">
                  <assemblies>
                        <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                        <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                        <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                        <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                  </assemblies>
            </compilation>
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial