Error using aurelia "buscar' to be a function" - aurelia2

Help me please, Why don't function this. excuse me my english I'm learn english and aurelia 2

I'm sorry, I found the solution
The main component has
<import from ="./busqueda.html" />
and must be
<import from ="./busqueda" />

Related

MiniProfiler and WebForms

So I'm trying to use MiniProfiler (https://github.com/MiniProfiler/dotnet) for WebForms website. What I did is:
install package using nuget
add MiniProfiler initialization in Global.asax.cs (Begin_request and End_request events)
add <%= StackExchange.Profiling.MiniProfiler.RenderIncludes() %> statement
set at web.comfig
And still MiniProfiler doesn't work. Simple troubleshooting shows that (in Chrome dev tools) on that page I expect to see MiniProfiler, I see
http://localhost/mycoolsite/mini-profiler-resources/results 404.0 - Not Found
More info: I use .Net FW 4.5.1, IIS8 and Intergated Mode (app pool)
Any Ideas what may be useful for me?
I've (very!) recently blogged about this, specifically the process of getting MiniProfiler working in a hybrid WebForms/MVC application.
Based on the steps that you've outlined that you carried out, it looks like you're missing (as compared to what I've got):
<%= StackExchange.Profiling.ClientTimingHelper.InitScript %>
That said, even without that line I still see server side timings and the MiniProfiler UI so I suspect that your web.config entry was/is incorrect.
Check to make sure that you've put this in configuration > system.webServer > handlers within your web.config:
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
There are a couple of other things that you can check as well:
Does the page that you're viewing live in a sub-folder that has a web.config either in it, or in a folder between it and the one where you added the handlers entry which <clear />s handlers?
Do you have anything else present in your application that could be capturing the request for MiniProfiler resources and returning a 404?

Invalid xpath expression being shown in csdef of Azure cloud service project

In the csdef file of Azure Cloud Service Project, I have the following environmental variable defined:
<Variable name="MONITORING_DATA_DIRECTORY">
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[#name='MonitoringDataDirectory']/#path" />
</Variable>
The project builds successfully. However, when I try to run the project, it throws an error saying '/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[#name='MonitoringDataDirectory']/#path' is an invalid xpath expression.
Here is a similar question on stackoverflow, but I don't know how to apply the solution to my case. Can anyone help me here?
I just ran into this exact same problem, with the exact same variable, "MONITORING_DATA_DIRECTORY". It turns out that the error message is a bit misleading. The XPath is perfectly valid. The problem was that my .csdef file didn't have a LocalResource named "MonitoringDataStore" declared. Adding this code to the .csdef solved the problem:
<LocalResources>
<LocalStorage name="MonitoringDataStore" cleanOnRoleRecycle="false" sizeInMB="200000" />
</LocalResources>

MVC 4 - How do I turn off the default Error.vbhtml page?

Anyone know how to turn off the default error page or where it's referenced??
Alright, I figured it out.
Turns out that in my custom ElmahHandleErrorAttribute class, the OnException() method is indeed over ridden (as it should be). But the 1st line of code is "MyBase.OnException(context)", which will fire off what the HandleError attribute also performs.
Once I commented out that one line, my issue went away.
What's The Issue?
I have Elmah.Mvc implemented in this Mvc4 project, it's working beautifully. I also have a custom errors section in the Web.config as follows:
<customErrors mode="On" defaultRedirect="~/Error/General">
<error statusCode="404" redirect="~/Error/Http404" />
</customErrors>
I have an ErrorController with two action methods, one for "General" and the other for "Http404".
What was happening was if I raised an unhandled error, I would indeed get my raised exception logged in Elmah, an email delivered with the exception, and then the custom "General" view displayed (Http404 page if it was a 404 error).
BUT, what I was also getting was an additional logged exception AND email because the default "Error.vbhtml" file was not found (I removed that view).
Honest mistake...hope this helps someone out moving along. :)
You can control this using the customErrors element in the web.config file.

IIS7.5 MVC\Forms sub-application inheritance downloads instead of executing

Hey everyone and thanks for taking the time to help.
I am stuck on this problem. I have an asp.MVC application and my client want to use nopCommerce for the shopping cart. I made a test MVC application and got the sub-application working great on a simple demo. The nopCommerce virtual directory is registered as an application in IIS and it runs fine in the demo. However when I try integrating the steps into my application I get a run-time compilation error:
CS0246: The type or namespace name 'Combres' could not be found (are you missing a using directive or an assembly reference?)
Line 56: <add namespace="System.Web.WebPages" />
Line 57: <add namespace="System.Web.Helpers" />
Line 58: <add namespace="Combres" /> <-----Error Line
Line 59: </namespaces>
Line 60: </pages>
The sub-application (nopCommerce) does not use Combres so I thought it was an inheritance issue so I did the location trick in the parent Web.Config file:
<location path="." inheritInChildApplications="false">
<system.web>
...
</system.web>
</location>
This got rid of the compilation error, but now there is no compilation of the file, the .aspx files just download to my computer instead of being executed. The main MVC application still runs great, I only get this downloading issue when I try to run the nopCommerce application. I am completely stumped, I am kind-of an IIS noob and am having to learn quick.
K found the answer to this. My companies platform, we use ASP.net MVC, was turning all requests with file.* into download requests. So what I wrote was working great, it was doing what is was supposed to...I just didn't know.

500 Error Running Visual Studio ASP.NET Unit Test

I have the following method in my unit test project:
[TestMethod]
[HostType("ASP.NET")]
[UrlToTest("http://localhost:3418/Web/SysCoord/ChooseEPA.aspx")]
[AspNetDevelopmentServerHost("%PathToWebRoot%")]
public void TestMethod1()
{
Page page = TestContext.RequestedPage;
Assert.IsTrue(false, "Test ran, at least.");
}
I'm getting this exception:
The test adapter 'WebHostAdapter' threw an exception while running test 'TestMethod1'. The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:3418/SysCoord/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (404) Not Found.
The remote server returned an error: (404) Not Found.
The page works as it should in a browser at the url: http://localhost:3418/Web/SysCoord/ChooseEPA.aspx.
This physical path is: C:\ESI\HR_Connect2\BenefitChangeSystem\Application_DEV\Web\SysCoord.
Any ideas would be appreciated.
Update 1
Added the following to my web.config file per this article. Also made the web.config writable and killed/restarted the development web server. No change in behavior.
<location path="VSEnterpriseHelper.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Update 2
Changing the AspNetDevelopmentServerHost attribute to the equivalent of [AspNetDevelopmentServerHost("%PathToWebRoot%\solutionfolder\webfolder", "/webfolder")] resolved the 404 problem.
Unfortunately the test began to return a 500 error instead. Progress, but not much. Trial and error with a clean project led to the conclusion that references to custom classes in the of the web.config were causing the problem.
For example:
<profile enabled="true" defaultProvider="MyProfileProvider">
<providers>
<add name="MyProfileProvider" connectionStringName="ProfileConnectionString" applicationName="/MyApp" type="System.Web.Profile.SqlProfileProvider"/>
</providers>
<properties>
<add name="Theme" type="String" defaultValue="Default"/>
<add name="LastLogon" type="DateTime"/>
<add name="LastLogonIp" type="String"/>
<!--
<add name="EmployeeSearchCriteria" type="MyApplicationFramework.Profile.EmployeeSearchCriteria"/>
<add name="DocumentSearchCriteria" type="MyApplicationFramework.Profile.DocumentSearchCriteria"/>
-->
</properties>
</profile>
With the criteria types above commented out the test ran fine. With them uncommented, the 500 error was returned.
Anyone had a similar problem in the past?
I've had this problem before and at that point gave up after reading all I could google about it (including this thread).
The solution turned out to be simple in my case. All I had to do was not use ASP.NET test attributes and simply test the MVC project as a DLL.
Step 1
Remove the extra attributes from the test.
[TestMethod]
public void TestMethod1()
{
Page page = TestContext.RequestedPage;
Assert.IsTrue(false, "Test ran, at least.");
}
Step 2
In Code Coverage, uncheck the MVC Project and add the MVC Project's DLL manually.
Voila, it get instrumented as a normal assembly, no errors, doesn't spin up the Development Server, also doesn't fail the Team Build.
I found that using vs2010 I am not restricted to just 4.0 applications. I DID however find that if testing a web application and you are using the old System.Web.Extensions version redirect you may get an error. Removing the following section from the Web.config file fixed my issue:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v2.0.50727">
<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>
Good luck.
I was getting the same problem as you, however my experience was a little different.
I am on vista x64, my developers are in xp x64...they haven't been having any issues at all. I just upgraded and could not run any unit test for a asp.net MVC project. I was receiving the same 500 error you were receiving.
I turned off code coverage, everything magically started working.
Based on your evidence I would guess that a reference to whichever assembly contains MyApplicationFramework.Profile.EmployeeSearchCriteria is missing from either the unit test project or the web project - though I would really think that you would only require the reference in the web project but I'm not knowledgeable about how the VS web server behaves when used as part of a unit test.
I ran into a similar issue testing a webservice where the project is .NET 3.51. I was getting a IIS 500 error.
I removed the old assembly bindinds as commented by Hal Diggs and it worked.
I setup a default unit test which popped up with the error, that brought me here. I just removed the following (below). Then clicked debug current context and boom, fine :S.
[HostType("ASP.NET")]
[AspNetDevelopmentServerHost("C:\\Inetpub\\....]
I got the same error message while unit testing a web app with Visual Studio 2010. The only difference is that i was using IIS, ie i ommited the [AspNetDevelopmentServerHost("%PathToWebRoot%")] directive.
I suspect the problem lies in the fact that i was using IIS version 5.1. More here:
http://ibsta.blogspot.com/2011/01/unit-testing-fun-under-visual-studio.html
I have faced same problem with unit testing.
And found the problem reason and also solve it.
The problem is only with access rights for the directory.
In my case I have installed VSTS on the different drive(d) then default.
So only to give the full access rights to the user PCNAME\ASPNET for whole directory \Program Files\Microsoft Visual Studio 9.0.
I m using the windows XP but if u are using window server then give access rights to the user NetworkServices.
By this solution i have solved my problem.
Hope u find something useful from this Answer.
Thanks,
Priyesh Patel
Comment out the whole bit of web.config like this
<!-- <location path="VSEnterpriseHelper.axd">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web> </location> -->
It worked for me
Make sure your web application is targeted to Framework 4.0. If you are trying to test a
2.0, 3.0 or 3.5 project, you will get the (500) Internal Server Error.
I experienced the same problem. Then I checked the properties of both the web project and the unit test project. And found that target framework was set different from each other. I set the target framework of both the project to .Net framework 4 (in my case). Finally ran the test method again and it worked.
Thanks.
For me it was Resharper that caused this problem. Once I suspended it (Tools -> Options -> Resharper -> General -> Suspend) everything worked.
(using VS2010SP1 and Resharper Ultimate 2016.1.2)

Resources