 |
| ASP.NET 4.5 General Discussion For ASP.NET 4.5 discussions not relating to a specific Wrox book |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 4.5 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
|
|
|
|

April 15th, 2013, 02:48 PM
|
|
Registered User
|
|
Join Date: Apr 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP.NET 4.5 Ajax client-side framework failed to load
My Configuration:
Windows 8 Pro 64Bit,
Visual Studio 2012 Express for Web,
IIS Application "Test" using DefaultAppPool using ,NET Framework 4.0.30319
ASP.NET 4.5 - Ajax
My simple Web-site project "Test":
Test.aspx:
<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Test.aspx.cs"Inherits="Test"Debug="true"%>
<!DOCTYPEhtml>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>Test</title>
</head>
<body>
<formid="formTest"runat="server">
<div>
<asp:scriptmanagerid="scriptTest"runat="server">
<scripts>
<asp:scriptreferencepath="~/Test.js"/>
</scripts>
</asp:scriptmanager>
</div>
</form>
</body>
</html>
Test.js:
function pageLoad ( sender, args )
{
window.status = "I'm here!";
}
Web.config:
<?xmlversion="1.0"encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<sectionname="entityFramework"type="System.Data.Entity.Internal.ConfigFile.EntityFrame workSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"requirePermission="false" />
</configSections>
<connectionStrings>
<addname="DefaultConnection"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\aspnet-Test-20130411121555.mdf;Initial Catalog=aspnet-Test-20130411121555;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilationdebug="true"targetFramework="4.5" />
<httpRuntimetargetFramework="4.5" />
<pages>
<namespaces>
<addnamespace="System.Web.Optimization" />
</namespaces>
<controls>
<addtagPrefix="webopt"namespace="Microsoft.AspNet.Web.Optimization.WebForms"assembly="Microsoft.AspNet.Web.Optimization.WebForms" />
</controls>
</pages>
<authenticationmode="Windows">
</authentication>
<profiledefaultProvider="DefaultProfileProvider">
<providers>
<addname="DefaultProfileProvider"type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"connectionStringName="DefaultConnection"applicationName="/" />
</providers>
</profile>
<membershipdefaultProvider="DefaultMembershipProvider">
<providers>
<addname="DefaultMembershipProvider"type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"connectionStringName="DefaultConnection"enablePasswordRetrieval="false"enablePasswordReset="true"requiresQuestionAndAnswer="false"requiresUniqueEmail="false"maxInvalidPasswordAttempts="5"minRequiredPasswordLength="6"minRequiredNonalphanumericCharacters="0"passwordAttemptWindow="10"applicationName="/" />
</providers>
</membership>
<roleManagerdefaultProvider="DefaultRoleProvider">
<providers>
<addname="DefaultRoleProvider"type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"connectionStringName="DefaultConnection"applicationName="/" />
</providers>
</roleManager>
<!--
If you are deploying to a cloud environment that has multiple web server instances,
you should change session state mode from "InProc" to "Custom". In addition,
change the connection string named "DefaultConnection" to connect to an instance
of SQL Server (including SQL Azure and SQL Compact) instead of to SQL Server Express.
-->
<sessionStatemode="InProc"customProvider="DefaultSessionProvider">
<providers>
<addname="DefaultSessionProvider"type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"connectionStringName="DefaultConnection" />
</providers>
</sessionState>
</system.web>
<runtime>
<assemblyBindingxmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentityname="DotNetOpenAuth.Core"publicKeyToken="2780ccd10d57b246" />
<bindingRedirectoldVersion="1.0.0.0-4.0.0.0"newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentityname="DotNetOpenAuth.AspNet"publicKeyToken="2780ccd10d57b246" />
<bindingRedirectoldVersion="1.0.0.0-4.0.0.0"newVersion="4.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactorytype="System.Data.Entity.Infrastructure.SqlConnectionFac tory, EntityFramework" />
</entityFramework>
<system.webServer>
<defaultDocument>
<files>
<removevalue="asyst.aspx" />
<addvalue="Test.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
This error didn't occur in my real Web-site projects on another computer with the same configuration except Windows 8 Pro 32Bit. After changing to a new computer with Windows 8 Pro 64Bit the above mentioned error appeared.
In order to analyse the error I created the simple Web-site project "Test". Starting this very simple application I'm getting the same error message plus "Sys" is undefined.
Searching the Internet I got a lot of proposals to solve the problem, all of them referring to older ASP.NET versions. I'm still left with my problem.
Please help, I'm loosing time and cannot proceed with the development of my real project.
Thanks in advance
Herbert
|
|

April 18th, 2013, 07:26 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Can you repost your code but remove the color coding? To do so, paste it in Notepad first, then wrap it in a pair of code tags using the Code (#) button on the toolbar. Otherwise, this forum messes up your code.
Cheers,
Imar
|
|

April 18th, 2013, 12:04 PM
|
|
Registered User
|
|
Join Date: Apr 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP.NET 4.5 Ajax client-side framework failed to load
My Configuration:
Windows 8 Pro 64Bit,
Visual Studio 2012 Express for Web,
IIS Application "Test" using DefaultAppPool using ,NET Framework 4.0.30319
ASP.NET 4.5 - Ajax
My simple Web-site project "Test":
Test.aspx:
Code:
<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Test.aspx.cs"Inherits="Test"Debug="true"%>
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test</title>
</head>
<body>
<form id="formTest" runat="server">
<div>
<asp:scriptmanager id="scriptTest" runat="server">
<scripts>
<asp:scriptreference path="~/Test.js"/>
</scripts>
</asp:scriptmanager>
</div>
</form>
</body>
</html>
Test. js:
Code:
function pageLoad ( sender, args )
{
window.status = "I'm here!";
}
Web.config:
Code:
<?xmlversion="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<sectionname="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrame workSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<addname="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\aspnet-Test-20130411121555.mdf; Initial Catalog=aspnet-Test-20130411121555; Integrated Security=True; User Instance=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<pages>
<namespaces>
<add namespace="System.Web.Optimization" />
</namespaces>
<controls>
<add tagPrefix="webopt"namespace="Microsoft.AspNet.Web.Optimization.WebForms" assembly="Microsoft.AspNet.Web.Optimization.WebForms" />
</controls>
</pages>
<authentication mode="Windows">
</authentication>
<profiledefaultProvider="DefaultProfileProvider">
<providers>
<add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</profile>
<membershipdefaultProvider="DefaultMembershipProvider">
<providers>
<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<roleManagerdefaultProvider="DefaultRoleProvider">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</roleManager>
<!--
If you are deploying to a cloud environment that has multiple web server instances,
you should change session state mode from "InProc" to "Custom". In addition,
change the connection string named "DefaultConnection" to connect to an instance
of SQL Server (including SQL Azure and SQL Compact) instead of to SQL Server Express.
-->
<sessionStatemode="InProc" customProvider="DefaultSessionProvider">
<providers>
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
</providers>
</sessionState>
</system.web>
<runtime>
<assemblyBindingxmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentityname="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
<bindingRedirectoldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentityname="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" />
<bindingRedirectoldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactorytype=" System.Data.Entity.Infrastructure.SqlConnectionFac tory, EntityFramework" />
</entityFramework>
<system.webServer>
<defaultDocument>
<files>
<removevalue="asyst.aspx" />
<addvalue="Test.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
This error didn't occur in my real Web-site projects on another computer with the same configuration except Windows 8 Pro 32Bit. After changing to a new computer with Windows 8 Pro 64Bit the above mentioned error appeared.
In order to analyse the error I created the simple Web-site project "Test". Starting this very simple application I'm getting the same error message plus "Sys" is undefined.
Searching the Internet I got a lot of proposals to solve the problem, all of them referring to older ASP.NET versions. I'm still left with my problem.
Please help, I'm loosing time and cannot proceed with the development of my real project.
Thanks in advance
Herbert
|
|

April 20th, 2013, 10:54 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Looks like you haven't pasted your code in Notepad first? It still looks messed up which makes it impossible to use it and see if the problem can be reproduced.
That said, I don't see anything wrong with this. As far as I can see, it should work. Maybe something in IIS or your main config file is messing something up? Did you install ASP.NET 4 / 4./5 Development under IIS in Programs and Features of Windows?
Imar
|
|

April 22nd, 2013, 02:03 PM
|
|
Registered User
|
|
Join Date: Apr 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
yes I have copied my coloured code into Notepad and enclosed it between # as you can see above.
Yes I have activated Windows-feature ASP.NET 4.5, my application is using the DefaultAppPool that is configured to use .NET framework 4
I'm completely in the air, I have no idea what to do else. Probably I should reinstall Visual Studio 2012 Express for Web ??
|
|

April 24th, 2013, 02:47 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
>> yes I have copied my coloured code into Notepad and enclosed it between # as you can see above.
But did you then copy it from Notepad? As you can see, the code is messed up. You can't copy it from this web page into a web.config file without lots of issues.
>> Probably I should reinstall Visual Studio 2012 Express for Web ??
Certainly worth a try. Also, reinstalling .NET 4.5 might do the trick.
Imar
|
|

April 27th, 2013, 12:55 PM
|
|
Registered User
|
|
Join Date: Apr 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Reinstalling Visual Studio 2012 Express for Web doesn't help
Hi Imar,
I uninstalled Visual Studio 2012 Express for Web and reinstalled it. The same error message.
As .NET4.5 is integral part of Windows 8 I can't uninstall it.
I suppose the solution should be found in IIS8 but which parameters could cause the error message?
Herbert
|
|

April 27th, 2013, 01:34 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Really hard to say without seeing your machine. Have you seen this post: http://social.technet.microsoft.com/...-86c74b9ddfdb/
There are many other posts that deal with the Sys is undefined issue, so you may want to Google a bit more and figure out which one applies to you.
Imar
|
|

May 6th, 2013, 05:04 PM
|
|
Registered User
|
|
Join Date: Apr 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
framework or framework64 ?
Hi Imar,
I was googling around for a long time and didn't find any appropriate solution for my case. Now I have the following question:
In C:\Windows\Microsoft.NET I find 2 framework-directories "Framework" and "Framework64". As my Web-site application is running under Windows 8 Pro 64Bit I suppose that "Framework64" is the correct directory to follow "v4.0.30319\Config" for finding the correct machine.config and the root web.config to check if there are some missing or incorrect entries.
Confusing is that I find a "test"-directory for my application named "Test" in "Framework\v40.30319\Temporary ASP.NET Files as well in "Framework64\Temporary ASP.NET Files.
In which one of the 2 framework-directories are my valid machine.config and web.config file ?
Thanks for help
Herbert
|
|

May 7th, 2013, 02:25 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
As you guessed, it depends on how you configured your site in IIS. More details can be found here: http://stackoverflow.com/questions/3...and-how-do-i-v
The temporary copy is just that: a temporary copy. You should always make changes to the web.config located at the root of your site (or any of its sub folders).
Cheers,
Imar
|
|
 |