Skip to content

Commit a8ffa89

Browse files
committed
fix testing reported issue #16 and #17 javascript error
1 parent a13dac1 commit a8ffa89

17 files changed

+549
-12
lines changed

Microsoft.AspNet.OutputCache.VC.db

24.4 MB
Binary file not shown.

Microsoft.AspNet.OutputCache.sln

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.OutputCach
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.OutputCache.CustomOutputCacheProvider", "test\CustomOutputCacheProvider\Microsoft.AspNet.OutputCache.CustomOutputCacheProvider.csproj", "{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}"
99
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{C0BAC4F9-E05E-431A-B241-B253A2BB38DC}"
11+
EndProject
1012
Global
1113
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1214
Debug|Any CPU = Debug|Any CPU
@@ -21,14 +23,10 @@ Global
2123
{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}.Debug|Any CPU.Build.0 = Debug|Any CPU
2224
{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}.Release|Any CPU.ActiveCfg = Release|Any CPU
2325
{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}.Release|Any CPU.Build.0 = Release|Any CPU
24-
{1D14BBD9-C8D6-4A08-949C-2395005E22A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25-
{1D14BBD9-C8D6-4A08-949C-2395005E22A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
26-
{1D14BBD9-C8D6-4A08-949C-2395005E22A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
27-
{1D14BBD9-C8D6-4A08-949C-2395005E22A4}.Release|Any CPU.Build.0 = Release|Any CPU
28-
{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29-
{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
30-
{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
31-
{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{C0BAC4F9-E05E-431A-B241-B253A2BB38DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{C0BAC4F9-E05E-431A-B241-B253A2BB38DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{C0BAC4F9-E05E-431A-B241-B253A2BB38DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{C0BAC4F9-E05E-431A-B241-B253A2BB38DC}.Release|Any CPU.Build.0 = Release|Any CPU
3230
EndGlobalSection
3331
GlobalSection(SolutionProperties) = preSolution
3432
HideSolutionNode = FALSE
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
3+
<TelemetryModules>
4+
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector"/>
5+
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
6+
<!--
7+
Use the following syntax here to collect additional performance counters:
8+
9+
<Counters>
10+
<Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Handle Count" ReportAs="Process handle count" />
11+
...
12+
</Counters>
13+
14+
PerformanceCounter must be either \CategoryName(InstanceName)\CounterName or \CategoryName\CounterName
15+
16+
Counter names may only contain letters, round brackets, forward slashes, hyphens, underscores, spaces and dots.
17+
You may provide an optional ReportAs attribute which will be used as the metric name when reporting counter data.
18+
For the purposes of reporting, metric names will be sanitized by removing all invalid characters from the resulting metric name.
19+
20+
NOTE: performance counters configuration will be lost upon NuGet upgrade.
21+
22+
The following placeholders are supported as InstanceName:
23+
??APP_WIN32_PROC?? - instance name of the application process for Win32 counters.
24+
??APP_W3SVC_PROC?? - instance name of the application IIS worker process for IIS/ASP.NET counters.
25+
??APP_CLR_PROC?? - instance name of the application CLR process for .NET counters.
26+
-->
27+
</Add>
28+
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector"/>
29+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.DeveloperModeWithDebuggerAttachedTelemetryModule, Microsoft.AI.WindowsServer"/>
30+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.UnhandledExceptionTelemetryModule, Microsoft.AI.WindowsServer"/>
31+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule, Microsoft.AI.WindowsServer"/>
32+
<Add Type="Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule, Microsoft.AI.Web">
33+
<Handlers>
34+
<!--
35+
Add entries here to filter out additional handlers:
36+
37+
NOTE: handler configuration will be lost upon NuGet upgrade.
38+
-->
39+
<Add>System.Web.Handlers.TransferRequestHandler</Add>
40+
<Add>Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler</Add>
41+
<Add>System.Web.StaticFileHandler</Add>
42+
<Add>System.Web.Handlers.AssemblyResourceLoader</Add>
43+
<Add>System.Web.Optimization.BundleHandler</Add>
44+
<Add>System.Web.Script.Services.ScriptHandlerFactory</Add>
45+
<Add>System.Web.Handlers.TraceHandler</Add>
46+
<Add>System.Web.Services.Discovery.DiscoveryRequestHandler</Add>
47+
<Add>System.Web.HttpDebugHandler</Add>
48+
</Handlers>
49+
</Add>
50+
<Add Type="Microsoft.ApplicationInsights.Web.ExceptionTrackingTelemetryModule, Microsoft.AI.Web"/>
51+
</TelemetryModules>
52+
<TelemetryProcessors>
53+
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector"/>
54+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
55+
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
56+
</Add>
57+
</TelemetryProcessors>
58+
<TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel"/>
59+
<!--
60+
Learn more about Application Insights configuration with ApplicationInsights.config here:
61+
http://go.microsoft.com/fwlink/?LinkID=513840
62+
63+
Note: If not present, please add <InstrumentationKey>Your Key</InstrumentationKey> to the top of this file.
64+
-->
65+
<TelemetryInitializers>
66+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
67+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.DomainNameRoleInstanceTelemetryInitializer, Microsoft.AI.WindowsServer"/>
68+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer, Microsoft.AI.WindowsServer"/>
69+
<Add Type="Microsoft.ApplicationInsights.Web.WebTestTelemetryInitializer, Microsoft.AI.Web"/>
70+
<Add Type="Microsoft.ApplicationInsights.Web.SyntheticUserAgentTelemetryInitializer, Microsoft.AI.Web">
71+
<Filters>
72+
<Add Pattern="(YottaaMonitor|BrowserMob|HttpMonitor|YandexBot|BingPreview|PagePeeker|ThumbShotsBot|WebThumb|URL2PNG|ZooShot|GomezA|Catchpoint bot|Willow Internet Crawler|Google SketchUp|Read%20Later|KTXN|Pingdom|AlwaysOn)"/>
73+
<Add Pattern="Slurp" SourceName="Yahoo Bot"/>
74+
<Add Pattern="(bot|zao|borg|Bot|oegp|silk|Xenu|zeal|^NING|crawl|Crawl|htdig|lycos|slurp|teoma|voila|yahoo|Sogou|CiBra|Nutch|^Java/|^JNLP/|Daumoa|Genieo|ichiro|larbin|pompos|Scrapy|snappy|speedy|spider|Spider|vortex|favicon|indexer|Riddler|scooter|scraper|scrubby|WhatWeb|WinHTTP|^voyager|archiver|Icarus6j|mogimogi|Netvibes|altavista|charlotte|findlinks|Retreiver|TLSProber|WordPress|wsr\-agent|Squrl Java|A6\-Indexer|netresearch|searchsight|http%20client|Python-urllib|dataparksearch|Screaming Frog|AppEngine-Google|YahooCacheSystem|semanticdiscovery|facebookexternalhit|Google.*/\+/web/snippet|Google-HTTP-Java-Client)"
75+
SourceName="Spider"/>
76+
</Filters>
77+
</Add>
78+
<Add Type="Microsoft.ApplicationInsights.Web.ClientIpHeaderTelemetryInitializer, Microsoft.AI.Web"/>
79+
<Add Type="Microsoft.ApplicationInsights.Web.OperationNameTelemetryInitializer, Microsoft.AI.Web"/>
80+
<Add Type="Microsoft.ApplicationInsights.Web.OperationCorrelationTelemetryInitializer, Microsoft.AI.Web"/>
81+
<Add Type="Microsoft.ApplicationInsights.Web.UserTelemetryInitializer, Microsoft.AI.Web"/>
82+
<Add Type="Microsoft.ApplicationInsights.Web.AuthenticatedUserIdTelemetryInitializer, Microsoft.AI.Web"/>
83+
<Add Type="Microsoft.ApplicationInsights.Web.AccountIdTelemetryInitializer, Microsoft.AI.Web"/>
84+
<Add Type="Microsoft.ApplicationInsights.Web.SessionTelemetryInitializer, Microsoft.AI.Web"/>
85+
</TelemetryInitializers>
86+
</ApplicationInsights>

WebApplication1/Global.asax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication1.Global" Language="C#" %>

WebApplication1/Global.asax.cs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Security;
6+
using System.Web.SessionState;
7+
using System.Web.UI;
8+
9+
namespace WebApplication1 {
10+
public class Global : System.Web.HttpApplication {
11+
12+
protected void Application_Start(object sender, EventArgs e) {
13+
ScriptResourceDefinition myScriptResDef = new ScriptResourceDefinition();
14+
myScriptResDef.Path = "~/Scripts/jquery-1.4.2.min.js";
15+
myScriptResDef.DebugPath = "~/Scripts/jquery-1.4.2.js";
16+
myScriptResDef.CdnPath = "http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js";
17+
myScriptResDef.CdnDebugPath = "http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.js";
18+
ScriptManager.ScriptResourceMapping.AddDefinition("jquery", null, myScriptResDef);
19+
20+
}
21+
22+
protected void Session_Start(object sender, EventArgs e) {
23+
24+
}
25+
26+
protected void Application_BeginRequest(object sender, EventArgs e) {
27+
28+
}
29+
30+
protected void Application_AuthenticateRequest(object sender, EventArgs e) {
31+
32+
}
33+
34+
protected void Application_Error(object sender, EventArgs e) {
35+
36+
}
37+
38+
protected void Session_End(object sender, EventArgs e) {
39+
40+
}
41+
42+
protected void Application_End(object sender, EventArgs e) {
43+
44+
}
45+
}
46+
}

WebApplication1/Login.aspx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<%@ Page LANGUAGE="vb" %>
2+
3+
<script runat="server" >
4+
5+
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
6+
Me.Label1.Text = "NOT AUTHENTICATED"
7+
If Page.User.Identity.IsAuthenticated Then
8+
Me.Label1.Text = "YOU ARE IN"
9+
End If
10+
End Sub</script>
11+
12+
<form Runat="server" >
13+
<asp:ScriptManager ID="sm1" runat="server">
14+
<Scripts>
15+
<asp:ScriptReference Name="jquery"/>
16+
</Scripts>
17+
</asp:ScriptManager>
18+
<asp:Login runat="server" ID="Login1" DestinationPageUrl="destination.aspx" ></asp:Login>
19+
<asp:Label runat="server" ID="Label1" ></asp:Label>
20+
</form>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("WebApplication1")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("WebApplication1")]
13+
[assembly: AssemblyCopyright("Copyright © 2016")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("c0bac4f9-e05e-431a-b241-b253a2bb38dc")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

WebApplication1/Web.Debug.config

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<!--
19+
In the example below, the "Replace" transform will replace the entire
20+
<customErrors> section of your web.config file.
21+
Note that because there is only one customErrors section under the
22+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
23+
24+
<customErrors defaultRedirect="GenericError.htm"
25+
mode="RemoteOnly" xdt:Transform="Replace">
26+
<error statusCode="500" redirect="InternalError.htm"/>
27+
</customErrors>
28+
-->
29+
</system.web>
30+
</configuration>

WebApplication1/Web.Release.config

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<compilation xdt:Transform="RemoveAttributes(debug)" />
19+
<!--
20+
In the example below, the "Replace" transform will replace the entire
21+
<customErrors> section of your web.config file.
22+
Note that because there is only one customErrors section under the
23+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
24+
25+
<customErrors defaultRedirect="GenericError.htm"
26+
mode="RemoteOnly" xdt:Transform="Replace">
27+
<error statusCode="500" redirect="InternalError.htm"/>
28+
</customErrors>
29+
-->
30+
</system.web>
31+
</configuration>

WebApplication1/Web.config

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
For more information on how to configure your ASP.NET application, please visit
4+
http://go.microsoft.com/fwlink/?LinkId=169433
5+
-->
6+
<configuration>
7+
<system.web>
8+
<compilation debug="true" targetFramework="4.6.2"/>
9+
<httpRuntime targetFramework="4.6.2"/>
10+
11+
</system.web>
12+
13+
<system.webServer>
14+
<modules>
15+
<remove name="OutputCache"/>
16+
<add name="OutputCache" type="Microsoft.AspNet.OutputCache.OutputCacheModuleAsync, Microsoft.AspNet.OutputCache.OutputCacheModuleAsync"
17+
preCondition="integratedMode"/>
18+
</modules>
19+
</system.webServer>
20+
</configuration>

0 commit comments

Comments
 (0)