text:
InvalidOperationException: No mapping to a relational type can be found for the CLR type 'object'.

A valid LINQ query which works over a List throws a System.InvalidOperationException when querying over a DbSet.
The expression is copied from an expression generated by AutoMapper.
Exception message: InvalidOperationException: No mapping to a relational type can be found for the CLR type 'object'.
Stack trace:    at Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSourceExtensions.GetMapping(IRelationalTypeMappingSource typeMappingSource, Type clrType)
   at Microsoft.EntityFrameworkCore.Storage.TypeMaterializationInfo..ctor(Type modelClrType, IProperty property, IRelationalTypeMappingSource typeMappingSource, Nullable`1 fromLeftOuterJoin, Int32 index, RelationalTypeMapping mapping)
   at Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression.<GetMappedProjectionTypes>b__73_0(Expression e)
   at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression.<GetMappedProjectionTypes>d__73.MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator.CreateValueBufferFactory(IRelationalValueBufferFactoryFactory relationalValueBufferFactoryFactory, DbDataReader dataReader)
   at Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized[TParam,TValue](TValue& target, TParam param, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.Query.Internal.ShaperCommandContext.NotifyReaderCreated(DbDataReader dataReader)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.<BufferlessMoveNext>d__12.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.<ExecuteAsync>d__7`2.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.<MoveNext>d__11.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.AsyncSelectEnumerable`2.AsyncSelectEnumerator.<MoveNext>d__3.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryBuffer.<CorrelateSubqueryAsync>d__17`3.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.TaskLiftingExpressionVisitor.<_ExecuteAsync>d__8`1.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.AsyncSelectEnumerable`2.AsyncSelectEnumerator.<MoveNext>d__3.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryBuffer.<CorrelateSubqueryAsync>d__17`3.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.TaskLiftingExpressionVisitor.<_ExecuteAsync>d__8`1.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.AsyncSelectEnumerable`2.AsyncSelectEnumerator.<MoveNext>d__3.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.<MoveNext>d__5.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Linq.AsyncEnumerable.<Aggregate_>d__6`3.MoveNext() in D:\a\1\s\Ix.NET\Source\System.Interactive.Async\Aggregate.cs:line 120
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at AutoMapperError.Shared.Replicator.<Replicate>d__0.MoveNext() in C:\Users\Joas\source\repos\AutoMapperError\AutoMapperError.Shared\Replicator.cs:line 147

Steps to reproduce
https://github.com/JoasE/EntityFrameworkError
var manualQuery = context.Courses.Select(
    dtoCourse => new Course.View
    {
        Id = dtoCourse.Id,
        Labs = dtoCourse.Labs.Select(
            dtoLab => new Lab.View
            {
                Assignments = dtoLab.Assignments
                    .Select(
                        dtoAssignment => new GeneratedType
                        {
                            __CurrentWork =
                                dtoAssignment.UserAssignments.FirstOrDefault(x => x.UserId == userId),
                            Id = dtoAssignment.Id,
                            Lab = dtoAssignment.Lab,
                            LabId = dtoAssignment.LabId,
                            Name = dtoAssignment.Name
                        })
                    .Select(
                        dtoLet => new Assignment.View
                        {
                            CurrentWork = (dtoLet.__CurrentWork == null)
                                ? null
                                : new UserAssignment.View
                                {
                                    AssignmentId = dtoLet.__CurrentWork.AssignmentId,
                                    StartedAt = dtoLet.__CurrentWork.StartedAt,
                                    UserId = dtoLet.__CurrentWork.UserId
                                },
                            Id = dtoLet.Id,
                            Lab = dtoLet.Lab,
                            LabId = dtoLet.LabId,
                            Name = dtoLet.Name
                        })
                    .ToList(),
                CourseId = dtoLab.CourseId,
                Id = dtoLab.Id,
                Name = dtoLab.Name
            }).ToList(),
        Name = dtoCourse.Name,
        Order = dtoCourse.Order
    });
var manualCourses = await manualQuery.ToListAsync();

Further technical details
EF Core version: 2.2.4
Database Provider: Microsoft.EntityFrameworkCore.SqlServer 2.2.4
Operating system: Windows 10
IDE: Visual Studio 2017 Enterprise 15.9.6

Thanks for the detailed issue @JoasE. I don't have too much experience with EF Core, but I'll try looking into this.
Just to confirm @ajcvickers, if the issue is only in EFCore 2.2, I submit my PR to the release/2.2 branch?

@j-rewerts By default, we fix for the next version, which is 3.0. In some cases we will consider also patching a released version, but at this time I don't think this issue meets the bar.
With regard to fixing this in master now, I would hold off, since we are in the middle of overhauling the query pipeline for 3.0. Once this is merged, then it will make sense to make other query changes. We hope to merge in the next few weeks. /cc @smitpatel @maumar

Is it okay to take off an issue that isn't related to the query pipeline, or should I just hold off until it's all merged?

@j-rewerts Yes, this only applies to query pipeline issues. Generally, look for any open issue in a milestone. (Being in a milestone means it has been triaged as something we want to do.) Issues tagged with up-for-grabs are supposed to be good entry-level issues, but we're not very good at applying the tag consistently, but it can still be useful when searching for something to do. See this query: https://github.com/aspnet/EntityFrameworkCore/issues?q=is%3Aopen+is%3Aissue+label%3Aup-for-grabs

I've tested this and can confirm this has been fixed as of EntityFramework 3.0.0. My thanks to the team and any contributor who might have helped for fixing this issue.

authors: JoasE ajcvickers j-rewerts


text:
Support for scripting idempotent SQLite migrations

Currently, migration script generation attempts to create an idempotent script (aka can be run repeatedly and have the same effect.) With SQLite, this is not possible using SQL statements alone as SQLite does not support conditional
One possible way to workaround this limitation:
Generate a script using LUA or Python (or something else) that will execute the if-else logic we need. Embed the SQL statements into this higher-level scripting language.

Concluded that we don't really need this. Idempotent scripts are generally for deployment scenarios where a script needs to be handed off... and we don't think the overlap of this scenario with SQLite is significant.
We can always revisit if we see folks asking for it.

So I can´t deploy my app from Visual Studio to Azure just because I´m using SQLite and getting the same error (Generating idempotent scripts for migration is not currently supported by SQLite). That makes ef sqlite option totally useless or just for development.
I know sqlite should not be used for production but it´s perfect for testing or quick deploy scenarios.

Calling dbContext.Database.Migrate() during app start (or from an admin or first-run page) could be an alternative.
Another alternative is to manually apply the script generated by dotnet ef migrations script --from {currentMigration} as part of your deployment process.

(Even if Web Publish could get the script, I don't think MSDeploy knows how to run it against SQLite)

source: gharchive/issue

authors: bricelam natemcmaster rowanmiller xleon

repo: aspnet/EntityFrameworkCore

license: MIT

license_type: permissive

license_source: github-api


text:
Runing in DNX Web or Kestrel runtime errors are sometimes not displayed

Summary
My runtime errors are not displayed, instead I only see a blank page.
Functional Impact
This makes debugging a great deal more difficult.
Reproducing the issue and what I expect
I have been following this .Net 5 video most recently to learn about the new changes to .Net.  One of the issues that I am facing is that when I make a mistake with my code I do not receive a runtime error.  Here is my most recent example, you can also download my code.
//Below I have a {1} that should be {0}.  During this test I was attempting to retrieve data from an Interface.  The error should be 'Index out of range' or something to that effect, however my page was blank
return string.Format("Hello DotNet5Testing MVC Controller.  Class2 txt: {1}",  textFromMyLib2);
Another example
I was able to get all of my code working even without errors.  Moving back from a working site, I tested removing the registration of the service.  In the video Louis and Damian demonstrated how if you do not have your service registered you will receive a very nice error message.  They received "Unable to resolve service for type 'MyLibrary.MySiteCultureService while attempting ..."  If I comment out the service registration I receive a blank page.
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddMvc();

        //This is required to use the Class Library.
        //This is how to register the service(library)
        //services.AddSingleton<Class1>();

        //services.AddSingleton<IClass2, Class2>();
    }

When I do see an error message it tends to be a 500 error without any other information and I am not sure where to get the logs for that.  Right now it is not too big of a deal as I am just following a tutorial, however, in a real world example I would need to be able to get to run time errors.  Is there something that I can change to bubble up a more descriptive error at runtime?
Tech details
I am testing in primarily dnx web, but sometimes I run dnx kestrel when I run into issues just to see if I have different results, so far they seem to produce the same results.  I am currently not using IIS because I am on runtime 1.0.0-beta8, it is currently waiting to be fixed per this.
I am using DNVM 1.0.0-rc2-15538
I have used the runtimes
1.0.0-beta8 clr (both x64, x86) win
I am on a win 10 machine using vs 2015 enterprise.

You need to add "Microsoft.AspNet.Diagnostics": "1.0.0-beta8" to dependencies of your project.json and before this line https://github.com/TJSoftware/DotNet5Testing/blob/master/src/DotNet5Testing/Startup.cs#L24 you need to add app.UseDeveloperExceptionPage() middleware. Do not use that middleware in production.

Thank you, that did the trick.  I know I ran across the dependencies before, I do not think I recall the app.UseDeveloperExceptionPage() though.
Note for others, I had to place app.UserDeveloperExceptionPage()' before app.UseMvc()`.  @rambocoder, do you know if there is a dependency on the load order of what is placed in configure?

@TJSoftware jump on https://jabbr.net/#/rooms/AspNetvNext and we can answer all your questions. It's a great group of helpful people. I am not exactly sure which middleware must go before the other ones, yet.

authors: TJSoftware rambocoder

repo: aspnet/Home


text:
Update wiki repo list

https://github.com/aspnet/Home/wiki/Repo-List

homebrew-k -> homebrew-dnx
KRuntime -> DNX - "The DNX (a .NET Execution Environment) contains the code required to bootstrap and run an application, including the compilation system, SDK tools, and the native CLR hosts."
kvm -> dnvm - "The .NET SDK Manager, a set of command line utilities to update and configure which runtime (KRE) to use."

You know, I think I'll just delete that list. At the time I made that list we just didn't have descriptions on each of our repos, and now we do. (There might be some missing, but I can fill those in.)

That works too! :+1:

OK replaced the link and removed the old repo list page. Thanks!

authors: Eilon henkmollema


text:
How to run/debug a website using HttpPlatformModule with IIS Express ?

Now that HttpPlatformModule replace Helios for IIS Hosting, what is the new way to run/debug a website localy using IIS Express, keeping the file watch functionnality ?
If it is not possible or not yet ready, is there a way to run dnx-watch as a project command to be able to run a website with wathing directly from visual studio ?

Now that HttpPlatformModule replace Helios for IIS Hosting, what is the new way to run/debug a website localy using IIS Express, keeping the file watch functionnality ?

Wait for beta8. It's pretty much unworkable without the new tooling within VS.

If it is not possible or not yet ready, is there a way to run dnx-watch as a project command to be able to run a website with wathing directly from visual studio ?

You probably could but it would be very rough (no browser launching etc).
I recommend waiting for beta8, we're very, very close to shipping it.

Ok, thanks for this clarification and great news for the very, very close shipping.
When you refer to beta8 I am not sure what you are talking about (dnx, vs tools) ?
Right now we are based the "unstable" rc1 runtime & aspnet packages, the good news is that everything seems to work when publishing and running on IIS (non express).

Ok, thanks for this clarification and great news for the very, very close shipping. When you refer to beta8 I am not sure what you are talking about (dnx, vs tools)

These changes to the platform handler ripple throughout the entire stack. The biggest wrinkle is that the tooling needs to be updated to do all of the right http platform handler things (the changes are very impactful). Everything can be made to work, but the steps without the new tooling bits are extremely manual and we aren't going to document them. VS automates it all.
We also need to release a new http platform handler module with the enhancements we made (windows auth support and other things).

Right now we are based the "unstable" rc1 runtime & aspnet packages, the good news is that everything seems to work when publishing and running on IIS (non express).

Great! There are some missing things if you don't have the new platform handler as mentioned above.

All right ! Thanks. We will stick with the "cmd" dev mode waiting for the new tooling and hope the HttpPlatformHandler "missing" things we have not yet discovered are not a big deal for your stack.

HttpPlatformHandler "missing" things we have not yet discovered are not a big deal for your stack.

If it didn't matter at all we wouldn't have changed the platform handler or added a middleware that does specific things.
Anyways here's the list of things https://github.com/aspnet/Hosting/issues/364#issuecomment-144321477

authors: IsaacSee davidfowl

repo: aspnet/Hosting


text:
Form parsing improvements

Cached task pattern for avoiding state machine and task allocation for repeated ReadFormAsync
struct KeyValueAccumulator
Delayed allocations; reduced allocs for empty paths

Hi @benaadams, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

Can you share your metrics for these changes?

Can you share your metrics for these changes?

Can't actually run it atm; the unstable feeds are a few versions back so need to wait for them to be updated

Resolves #368 ?

Will be covered by rebased #411

source: gharchive/pull-request

authors: Tratcher benaadams dnfclas

repo: aspnet/HttpAbstractions


text:
Revert "Reenable client disconnect tests"

Reverts aspnet/IISIntegration#1485

Closing for now.

repo: aspnet/IISIntegration


text:
Support Aurelia

Please create support for Aurelia  framework.
I have already ported the TypeScript WebPack navigation skeleton  of Aurelia with the WebPackDevMiddleware of the JavaScript services. Take a look at skeleton-typescript-webpack-aspnetcore.
Only thing that is missing now is Hot Module Replacement and server-side rendering.
@EisenbergEffect asked me to create this issue mentioning @SteveSandersonMS to get the ball rolling.

One problem is Aurelia have a server-side rendering solution yet, but I suppose that part could be omitted in the template for the time being. (https://github.com/aurelia/framework/issues/72#issuecomment-232348168)

We'd be very happy to have an Aurelia option in the Yeoman generator. If you are able to make a pull request that implements this, please go ahead!
The lack of server-side rendering is not ideal, but it's not a showstopper (we don't have that in the React-without-Redux or Knockout templates either). The main thing we'd need is for it to be exactly the same as the other templates, in having the same visual appearance, same initial functionality (homepage, counter example, and 'fetch data' example), and use Webpack with a config that's as similar as possible to the other templates.

@SteveSandersonMS Any particular reason this was closed? Did it get implemented?

@EisenbergEffect Ah yes, that was unclear. I should have said something like "I'll close this awaiting your pull request" since this is only going to move forwards if/when someone does submit a suitable PR.
But I guess it could be left open for a while with an up-for-grabs label, to see if anyone else wants to pitch in! I'll do that now.

I saw that this issue was open and "up-for-grabs", and since I've been learning Aurelia and was interested in understanding how the new core spa seed projects worked,  I created an Aurelia implementation of the standard template functionality in a fork of this repo, which is at https://github.com/kmkatsma/JavaScriptServices
The new Aurelia template was initially copied from the Angular2 template, and then I made changes from there to get Aurelia version to work.  So it is very close in behavior and code to the Angular2 version.  But...the main issue I see is perhaps with regards to the comment that it use "Webpack with a config that's as similar as possible to the other templates".
Aurelia has its own webpack-plugin that does a fair amount of custom behavior.  This made it impossible to keep exactly same format as the other templates.    Also, this template depends on Webpack 2+, since generally Webpack 2 is being used in all the latest Aurelia webpack examples, and I had issues with the 1.3 version working with the configuration examples I could find.  I am not a Webpack expert.   If interested, I can figure out how to do a pull request and submit.  Perhaps an Aurelia and/or Webpack expert could review for suggestions for improvement!

We can all take a look at it help! @kmkatsma
You're right though, it'll be fairly similar to Angular2, in how the templates/components look.
I think it's all about the Template also being identical to the others in that, it has a Counter page, Forecast page that hits the Web API, etc.

@MarkPieszak - should I go ahead and submit a PR for this?  Thanks!

I think that's what Steve wanted, yes go for it! I'm too busy to make one this week :(
Just take one of the others and add Aurelia in there instead, hopefully won't be too tough!

@kmkatsma Thanks for working on this! When you submit the PR, please cc me on that so I can also make a review :) Thanks!

@ClaudioNunes - No, I couldn't duplicate the same WebPack implementation being used in other templates.   It is instead using the Aurelia Webpack Plugin - but not with EasyWebpack so all the configuration is visible.   It is creating three different bundles - an app, a startup, and then basically everything else.  This seems to be the standard way to pack when working with the Aurelia Webpack plugin, based on all the examples I've found, so it's at least consistent with things people will find elsewhere.
I don't think the developer experience is that bad - I think its the same rebuild time on Webpack you'd get from aurelia Webpack skeleton based UI.   The thing that bothers me is lack of auto-refresh of UI you normally get when running in the webpack-dev-server.  Not sure if there's a way to trigger that using this stack.  I do think some people will find the UI and API launching together from "dotnet run" appealing, at least when wanting to work with non-mock back end.

Did #398 close this?

Yes it did :)

authors: EisenbergEffect MarkPieszak SteveSandersonMS arjendeblok kmkatsma mttmccb

repo: aspnet/JavaScriptServices


text:
Error -107 ENOTCONN socket is not connected

I am having a strange issue, the Same application is running fine on one ubuntu 16.04 Server with Dotnet core 2.0
I installed new Ubuntu and tried to deploy the application as soon as clients connect it gives this error
elsteppgc@elbystep:~/stepel$ sudo su
[sudo] password for elsteppgc:
root@elbystep:/home/elsteppgc/stepel# dotnet Elp.dll
Hosting environment: Production
Content root path: /home/elsteppgc/stepel
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
fail: Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv[0]
ListenerSecondary.OnConnection
Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException: Error -107 ENOTCONN socket is not connected
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.ThrowError(Int32 statusCode)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.tcp_getpeername(UvTcpHandle handle, SockAddr& addr, Int32& namelen)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle.GetPeerIPEndPoint()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvConnection..ctor(ListenerContext context, UvStreamHandle socket)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ListenerSecondary.ReadStartCallback(UvStreamHandle handle, Int32 status)
https://github.com/dexterhussain/KestrelWebTest

Somehow I managed to fix the error
the issue is in the Asp.netcore all nugget upgrade it to latest one. and the issue just goes

The Asp.NetCore.All 2.0 version has this error.

@dexterhussain Closing, as it looks like you resolved your issue with the latest version of the package.

Do you want to cal in to triage @muratg?

@muratg  but I have a question here that why Kestrel Web Server doesn't show an error? and neither the application runs. I figured out when I sent a map query. Kestrel should show an error

@halter73 there should be logging in kestrel

You probably got a client disconnect.  Check your INFO level logs.

@muratg @halter73  this is the same thing which I am saying. Kestrel opens port runs the application but doesn't give any errors. it should say that some assembly cannot be loaded. How can a client disconnect when kestrel is serving nothing? I tried nmap and it showed error

@dexterhussain What makes you think there was an assembly load error?
It seems more like there's a connection that was closed by the client right as it was starting. These sorts of early client disconnects can cause tcp_getpeername to fail with ENOTCONN, but based on the number of bug reports, this seems pretty rare.
I've considered of lowering the log level for tcp_getpeername failing with ENOTCONN in the hopes of avoiding wild goose chases. There error should be completely benign. Other than the error log, do you see anything else wrong? Like @muratg mentioned INFO level logs might help you better diagnose your problem.

i have the same problem。

One day my asp.net core process suddenly encountered this problem. During this time I did not redeploy the application and did not restart the system.
I use docker to deploy applications in Ubuntu. the image version:
Microsoft/aspnetcore:2.0 AS base
Microsoft/aspnetcore-build:2.0 AS build

We're getting this nuisance log flooding as well. Basically any bots spamming an end point like this raise the stack trace when running at LogLevel 'Warning'.
Hundreds of garbage requests like this
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.0 POST http://{server-ip}/xmlrpc.php text/xml 281
info: Microsoft.AspNetCore.Server.Kestrel[32]
      Connection id "0HLE5CSQGB9O0", Request id "0HLE5CSQGB9O0:00000001": the application completed without reading the entire request body.

yield a similar number of these:
fail: Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv[0]
      Listener.OnConnection
Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException: Error -107 ENOTCONN socket is not connected
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.ThrowError(Int32 statusCode)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.tcp_getpeername(UvTcpHandle handle, SockAddr& addr, Int32& namelen)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle.GetPeerIPEndPoint()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvConnection..ctor(ListenerContext context, UvStreamHandle socket)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Listener.DispatchConnection(UvStreamHandle socket)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Listener.OnConnection(UvStreamHandle listenSocket, Int32 status)

Another recent 2.1 kestrel fix https://github.com/aspnet/KestrelHttpServer/issues/2605 lowered log levels. You should be able to safely do it in this instance as well.

authors: dexterhussain halter73 muratg sichbo zicjin

repo: aspnet/KestrelHttpServer


text:
Using 'nameof' operator instead of magic strings

Using the "nameof" operator instead of magic string will help us if the variable change in the future for whatever the reason

Hi @hishamco, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

authors: dnfclas hishamco

repo: aspnet/Logging


text:
Create an async path for ExecuteReaderAsync

With sqlite3_step_blocking now in use, we should create a better async path for executereader.
See NativeMethods.cs:277

I don't think this is relevant anymore since we couldn't use Thread.Sleep().

authors: bricelam natemcmaster


text:
Invoker extensiblity

In RC1 release, FilterActionInvoker was clearly separated from ControllerActionInvoker and easily reusable/extensible. In RC2 release there are more controller related dependencies involved but class still exists. This commit https://github.com/aspnet/Mvc/commit/1e02fd2e6b46e78ab3f442752b59eb6f4f70e8e9 removes the class completely.
Now if I want to use Filters, Binders and Action Results in a controller-less scenario I have to extend ControllerActionInvoker or re implement an IActionInvoker.

@rynowak ?

@malekpour - what kind of extensibility are you looking for exactly? We can bring back the separation between FilterActionInvoker and ControllerActionInvoker once the dust settles with the current perf work - but I have a feeling that these types will always be in the .Internal namespace.
If you can tell us more about what you're trying to accomplish, we might be able to help.

@rynowak may be extensibility is not a good term, but I'll try to explain how I am currently using FilterActionInvoker in my RC1 bases project.
We have a microservices implementation which executes dynamic scripts written by developers in an custom web based IDE and stored in database.
For the current production version which is OWIN based, I wrote almost everything from scratch (routing, execution, formatting, binding, authorization, etc...). Now our newer version which is currently in pre production stage we significantly reduced amount of code by using TemplateRoute, FilterActionInvoker and AuthorizationPolicyBuilder.
We didn't need ControllerActionInvoker so created an ActionInvoker by extending FilterActionInvoker and our script engines (C#, VB, ADO, PowerShell) will be called by its InvokeActionAsync, result is an IActionResult and AspNetCore takes care of the rest like authorization, validation, binding, formatting...
Last week I tried to migrate to RC2, one issue was FilterActionInvoker does not work with normal ActionDescriptor and it expects ControllerActionDescriptor because of this:
code. Other and more important issue is this merging commit https://github.com/aspnet/Mvc/commit/1e02fd2e6b46e78ab3f442752b59eb6f4f70e8e9. Because of that I cannot efficiently use this really useful infrastructure without extending controller related classes.

At this time, in most MVC components are designed to have certain assumptions around what they work with - e.g. the action invoker expects things to be controllers. We can certainly consider increasing the flexibility in the future, but at this time it isn't a goal.

I think we should close this as a won't fix. Extensibility for the invoker is definitely a non-goal. We've rewritten significant aspects of the invoker in every release. I don't think we'll ever want to make it a documented extensibility API.
/cc @Eilon

That's fine. In fact I have implemented my own IActionInvoker and it is working fine.

authors: Eilon malekpour rynowak

repo: aspnet/Mvc


text:
ViewsFeatureProvider and dynamic assemblies

protected virtual Type GetViewInfoContainerType(AssemblyPart assemblyPart)
{
    if (assemblyPart.Assembly.Location != null)
    {
        // ...
    }
    // ...
}

in ViewFeaturesProvider fails when adding dynamic assemblies via IMvcBuilder.AddApplicationPart (System.Reflection.Emit.AssemblyBuilder.Location throws NotSupportedException). Here is a stack trace:
System.NotSupportedException: The invoked member is not supported in a dynamic assembly.
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
   at Microsoft.AspNetCore.Mvc.Razor.Compilation.ViewsFeatureProvider.GetViewInfoContainerType(AssemblyPart assemblyPart)
   at Microsoft.AspNetCore.Mvc.Razor.Compilation.ViewsFeatureProvider.PopulateFeature(IEnumerable`1 parts, ViewsFeature feature)
   at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultCompilerCacheProvider..ctor(ApplicationPartManager applicationPartManager, IRazorViewEngineFileProviderAccessor fileProviderAccessor)

Would there be any major implications when checking if assemblyPart.Assembly.IsDynamic before trying to retrieve its location? Am I missing something when working with dynamic assemblies in projects with  controllers returning views?

Would there be any major implications when checking if assemblyPart.Assembly.IsDynamic before trying to retrieve its location?

That sounds fine. I recall trying out loading a Roslyn generated assembly and it didn't throw when Location was accessed. Would you like to send a pull request for this?

Sure

authors: mdschweda pranavkm


text:
Use optimal StringComparison for symbol strings

A few searches for symbols ("/", "*", "~/", etc) in strings were using a case insensitive comparison when they can get better performance from an ordinal compare.

The comparison type used against string.empty is not important but it reads better if it is the same as the rest of that group.
The LastIndexOf call is using the default comparison which is CurrentCulture. This can be made into a char search which is Ordinal.

CLA is confirmed.

:shipit: definitely harmless.
@bbowyersmyth these changes are appreciated.  in the future, please file issues for problems you find and reference the issue when providing a PR to fix it.  that gives our triage team a chance to evaluate the issue.  we took a shortcut here.
also FYI we tend not to make performance-related changes unless something is significant enough to show up in a profile.

95ae4cb3a58c3ad83e61c2dbfb27820bf98b9516

@dougbu Ok thanks will file an issue for anything in the future.
The slow via a thousand slightly slow operations problem could be a good use of community time. Understand if you don't want to spend your time reviewing those changes though. Will take your comment as the rule from now on. Cheers.

authors: Eilon bbowyersmyth dougbu


text:
[DesignPR] Controller Unit Testability Part 2

@rynowak  and @yishaigalatzer
Could you take a look at this design PR? I'm also attaching the summary of this PR.
Thanks
What are covered or tested in this Design PR

ViewBag
ModelState
Context.Request.GetFormAsync();formCollection.GetValues("PromoCode").FirstOrDefault()
Url.Action
Context.RequestAborted
Url.IsLocalUrl(returnUrl

Not yet implemented:

Context.User.Identity.GetUserName(), Context.User.Identity.GetUserId(), User.Identity.IsAuthenticated
Context.Request.Scheme
Response.SignOut
Need to expand the UrlAction callback signature
Context.Request.Cookies.Get("Session"); Context.Request.Cookies.Append("Session", cartId);
Context.Request.ReadFormAsync();formParameters["RequestVerificationToken"];

External Components to Test:

DbContext
IMemoryCache
IConnectionManager
UserManager
SignInManager
IHostingEnvironment
AntiForgery
IOptions
RoleManager
IFlashStrategy, ILogger

Exploratory Test
1 Adding controller unit tests for MusicStore
2. Updating unit tests for KExpense

@rynowak and @yishaigalatzer
I updated this PR per your comments. This is the summary:

Changed the IUrlHeper interface to remove IsLocalUrl and made it a static method inside UrlHelper. I think I should send a seperate PR for this.
The --Callback name changed to --Context to accommodate the simple value properties.
Used DefaultHttpContext
Helper is now a static class

@yishaigalatzer and @rynowak
I think this Design PR has all the feature to support MusicStore and KEpense except:

Context.User.Identity.GetUserId(),

Content.Request.Cookies

Contxt.User.Identity.GetUserId will be easy to support with this design

I haven't looked into Cookies yet.

Thanks,

Opened #1935 and #1934 for more specific work items, and closing this one.


text:
Add Encode() and Raw() overrides to IHtmlHelper<TModel>

#2392
dynamic does not work correctly when inherited from a base interface

/cc @Eilon this is the fix we discussed

:shipit:

8b5931d

authors: ajaybhargavb dougbu


text:
XmlResult and FromBodyXmlAttribute new features in the project "Microsoft.AspNetCore.Mvc.Formatters.Xml".

###Reasons for adding these features into the aspnet/MVC project:

When ASP.NET CORE is using as the base for development for Web REST API there is no controllable by code flexibility to have deal with flat XML and DataContract XML.
Without work around, Indeed, it is possible to use only one type of XML formatters per application.
Currently used ObjectResult cannot provide the compulsory return XML or DataContract XML as an action result.
The order of applying:
services.AddMvc().AddXmlDataContractSerializerFormatters().AddXmlSerializerFormatters();
and
services.AddMvc().AddXmlSerializerFormatters().AddXmlDataContractSerializerFormatters();
affects on using the type of xml formatters for Content Type : "application/xml"

To improve the quality and flexibility  XML based Web REST API were developed the following features:
"XmlResult" feature:
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\XmlResult.cs (new)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\Internal\XmlDcResultExecutor.cs (new)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\Internal\XmlResultExecutor.cs (new)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\Internal\XmlResultExecutorBase.cs (new)
\Mvc\test\Microsoft.AspNetCore.Mvc.Formatters.Xml.Test\XmlResultTest.cs(new)
\Mvc\test\Microsoft.AspNetCore.Mvc.Formatters.Xml.Test\Models\PurchaseOrder.cs(new, shared)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\DependencyInjection\MvcXmlMvcBuilderExtensions.cs(changes, shared)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\DependencyInjection\MvcXmlMvcCoreBuilderExtensions.cs(changes, shared)
Description:

The XmlResult is the similar feature to JsonResult in project "Microsoft.AspNetCore.Mvc.Formatters.Json".
It allows to return Xml formatted response in the body, as Action result.
This feature improve the  consistence of the type XML used formatter.
XmlResult allows to return XML serialized object with using ether "DataContractSerializer" ether "XmlSerializer". It allows to satisfy all REST communication scenarios from JAVA  to .NET.

Example of using in the application:
Startup.cs
public void ConfigureServices(IServiceCollection services)
        {
            // Add framework services.
            services.AddMvc().AddXmlDataContractSerializerFormatters().AddXmlSerializerFormatters();
        }

Controller:

// GET api/[controller]/xml
    [HttpGet("xml")]
    public ActionResult GetXmlObject()
    {
        object obj = new PurchaseOrder();
        return new XmlResult(obj);
    }

    // GET api/[controller]/dcxml
    [HttpGet("dcxml")]
    public ActionResult GetDcXmlObject()
    {
        object obj = new PurchaseOrder();
        return new XmlResult(obj) { XmlSerializerType = XmlSerializerType.DataContractSerializer };
    }

"FromBodyXmlAttribute" feature:
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\FromBodyXmlAttribute.cs(new)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\ModelBinding\Binders\BodyXmlModelBinder.cs(new)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\ModelBinding\Binders\BodyXmlModelBinderOnly.cs(new)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\ModelBinding\Binders\BodyDcXmlModelBinder.cs(new)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\ModelBinding\Binders\BodyDcXmlModelBinderOnly.cs(new)
\Mvc\test\Microsoft.AspNetCore.Mvc.Formatters.Xml.Test\Models\Binders\BodyXmlModelBindersTest.cs(new)
\Mvc\test\Microsoft.AspNetCore.Mvc.Formatters.Xml.Test\Models\PurchaseOrder.cs(new, shared)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\DependencyInjection\MvcXmlMvcBuilderExtensions.cs(changes, shared)
\Mvc\src\Microsoft.AspNetCore.Mvc.Formatters.Xml\DependencyInjection\MvcXmlMvcCoreBuilderExtensions.cs(changes, shared)
Description:
FromBodyXmlAttribute forces try to get  XML serialized object from the http request body with using ether "DataContractSerializer" or "XmlSerializer".
Example of using in the application:
Startup.cs
public void ConfigureServices(IServiceCollection services)
        {
            // Add framework services.
            services.AddMvc().AddXmlDataContractSerializerFormatters().AddXmlSerializerFormatters();
        }

Controller:
```
// POST api/[controller]/xml
    [HttpPost("xml")]
    public void PostXml([FromBodyXml]PurchaseOrder value)
    {
        var x = value;
        x.billTo.street += " 123";
    }

    // POST api/[controller]/dcxml
    [HttpPost("dcxml")]
    public void PostDcXml([FromBodyXml(XmlSerializerType = XmlSerializerType.DataContractSerializer)]PurchaseOrder value)
    {
        var x = value;
        x.billTo.street += "No -10";
   }

Where:
  [DataContract (Namespace ="http://puchase.Interface.org/Purchase.Order")]
   public class PurchaseOrder
   {
       public PurchaseOrder()
       {
           billTo = new Address() { street = "Bill to Address" };
           shipTo = new Address() { street = "Ship to  Address" };
       }
       [DataMember]
       public Address billTo;
       [DataMember]
       public Address shipTo;
   }

   [DataContract(Namespace = "http://puchase.Interface.org/Purchase.Order.Address")]
   public class Address
   {
       [DataMember]
       public string street;
   }

Hi @Wallsmedia, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

Will rebase to dev and submit it again

authors: Wallsmedia dnfclas


text:
Perform case insensitive lookups for precompiled views

Fixes https://github.com/aspnet/MvcPrecompilation/issues/37

FYI this is definitely announcment-worthy

@Eilon good to get this in for preview2?

authors: pranavkm rynowak


text:
Support in-process V8 engine, via VroomJs

https://github.com/pauldotknopf/vroomjs-core
I have started porting VroomJs to .NET Core. It works with CLR currently. .NET Core requires some more #if def work. It should be done soon though.
I think this library should be implemented as a new hosting model.
Are there currently any plans to support an embedded v8 engine?

Before I answer your questions, I want to give some clarity on the direction I am going with this V8 engine.

https://github.com/pauldotknopf/javascriptviewengine
You initialize the V8 engine...
public class JsEngineInitializer : IJsEngineInitializer
{
    public void Initialize(IJsEngine engine)
    {
        engine.Execute(@"
            var RenderView = function(path, model) {
                return """" + model.Greeting + """";
            };

            var RenderPartialView = function(path, model) {
                return ""
"" + model.Greeting + ""
"";
            };
        ");
    }
}

And you you MVC as you traditionly would, with a minor caviet. Your view name must begin with js-.
public class HomeController : Controller
{
    public IActionResult Index(string greeting = "Hello word!")
    {
        return View("js-Index", new GreetingViewModel { Greeting = greeting });
    }
}

No razor, pure js rendering.

Your intent is to support cross-platform CoreCLR, right? I just got it to build on Mono for OS X but I can see that, as per your comment, it doesn't currently work on CoreCLR.

You are correct. There are a lot of usages of System.Timers (and others) that needs to be changed to a cross-platform API.

How would this differ in functionality from running code in a Node environment?

You are correct in that the V8 environment is not a traditional node environment. However, webpack solves this issue. Take a look at that gulpfile for the React demo I created. Notice that is uses webpack to build both the client, AND server script. This gives you multiple things.

require('../img.png') works in react/knockout rendering. It doesn't work on nodejs without some hacking with webpack-isomorphic-tools. Also, this works with using require('../App.scss').brand for strongly-typed css classes.
100% universal rendering. The current NodeServices approach is more of a "donut-whole rendering" approach to server side rendering. It is great for initial load time, but when navigating to other pages, you have to make a full request that goes through mvc/razor, and then eventually server-renders some react stuff. My approach allows you to navigate to any page on the client side, while doing an f5 refresh will give you a complete server rendered copy of the same exact content.

I have been waiting for Edge.js to gain support for hosting Node in-process on CoreCLR but am not sure if/when that feature will ship.

I like the idea of webpacking the server script so that webpack loaders can be used for server rendering content. However, I like the idea of also using node to give people complete control over the rendering, instead of relying on webpack to use loaders for everything. However, I haven't run into any limitation with regards to rendering only. Server-side rendering scripts typically don't need access to the file system or os (which node provides). However, I think the overhead of using webpack-isomorphic-tools would be worth it if we can get Edge.js (or something similar) working 100% in an embedded environment.

Is performance the key benefit of using in-process hosting with VroomJS, or is there anything else? If it's mainly about perf, do you have any sense of just how much faster it is?

Performance is the key factor. However, when it is in process, you can do things like forwarding console.log('message'); commands to the .NET Console.WriteLine("console.log(" + message + ")"); I don't have any sense of how much faster it actually is though.

Sorry to interfere but I am really glad to hear you keep in eye on Edge.js as I believe this is the best solution for this concept. I have a long experience with Reactjs.NET which is a fantastic library and gives an option to use VroomJs but has some limitations. As Steve mentioned the option to use whatever npm package in the script is amazing.
Let's hope that the support for CoreCLR in Edge.js will be available soon.

@xabikos May I ask you how you handle client/server side routing? Are all links a traditional redirect, or are you using react-router to do client-side routing to separate pages?

@pauldotknopf you mean client/server side routing with Reactjs.NET?

Yes. Completely client-side routing, with an F5 giving you a complete refresh of the same exact page.

It looks like React.NET doesn't currently have an answer for it.
https://github.com/reactjs/React.NET/issues/64

Yes I know what you mean and luckily we didn't have to support this scenario as the application is kinda exceptional. We are using the Reactjs.NET with webforms and from the server side perspective we are always returning the same webform that contains an empty div where the React content is added. Then based on the route we just passing a different json model to the server side routing and in this way we can produce a different page. But keep in mind that there is no need to have React client side after the server side rendering. I am not sure if I made myself clear.
But in any case we haven't find a way to support the full scenario and go full isomorphic with routing on the server with React.NET.

We are using the Reactjs.NET with webforms and from the server side perspective we are always returning the same webform that contains an empty div where the React content is added.

So you aren't doing any server-side rendering? If so, what does React.NET give you?

But keep in mind that there is no need to have React client side after the server side rendering. I am not sure if I made myself clear.

Ah, so your using is strictly as a template engine? Why not use razor? You don't have to use razor within the context of MVC (so it can be used in webforms).
For what it is worth, here is a React and .NET example that has the client-server routing scenario handled.
https://github.com/pauldotknopf/react-dot-net

Yes we are using the React.NET as template engine. To give some more context the application gives the admin to create custom webpages by adding some predefined html widgets through a GUI. Let's say the user has a basic layout and the on the main content need to add a google map content. Then we use React to reflect this change immediately on client side and when the user saves we just save a big json object that represent the widget and the configuration. When somebody tries to access that page then we give this json object to React.NET and we get the same page but render on the server side this time. I hope is a bit more clear now.

Ah, clear now. Actually pretty cool!

Yes I was also amazed when we saw this in action as we managed to merge Reactjs and React.NET with such an old technology as Webforms

This was a big problem I had with both NodeServices and Reactjs.NET. It didn't actually solve the routing issue. It is more of a donut-hole render of reactjs content which must be server up via a tradtional HTTP GET web request.

Can you clarify what problem you're getting at? I'm not familiar with the donut-hole analogy or in what other way you'd want to serve your page besides responding to HTTP GET requests.

Yes. Completely client-side routing, with an F5 giving you a complete refresh of the same exact page.

Again, I'm not sure what difference you're hinting at. With the NodeServices-based templates, hitting F5 does bring you back to the same page. As in, we do correctly pass through the requested URL into the Angular/React/etc router.
Apologies if I'm missing something obvious, but if something's missing in handling of routing, could you give repro steps and say what you would want to happen (and what happens instead)?
Thanks!

I think he's hinting at rendering only part of the page using React or other js library instead of the whole page including html and so on. In most cases this comes in play only for things like title or meta tags and the usual solution is to export such information from the server renderer and update the tags of the accordingly.
I believe the best would be if the hosting model was pluggable, so there could be packages like NodeServices.Node, NodeServices.VroomJs or NodeServices.EdgeJs and let the end user decide which fits the best.

Sorry for the delay.

Can you clarify what problem you're getting at? I'm not familiar with the donut-hole analogy or in what other way you'd want to serve your page besides responding to HTTP GET requests.

The previous reply nailed it. You aren't rendering the meta tags. This makes it impossible to have client-side routing that manages the title/meta tags as well.
Also, what is the plan to handle individual server routes to fetch data to pre-render, specific to that page?

I agree with @Kukkimonsuta  and @pauldotknopf about wanting better support for server-side rendering. I'd also like to have the option to avoid using Razor for server-side rendering (the asp-prerender-module and asp-prerender-webpack-config tags). I would prefer to just configure these things in the controller and render without Razor altogether.

OK, thanks for clarifying.

You aren't rendering the meta tags.
You can render as much of the page with your JS code as you want - your Razor page can be nothing but an invocation of your Angular/React app if desired. I appreciate that the samples don't demonstrate this.

I'd also like to have the option to avoid using Razor for server-side rendering
OK, understood. This is already possible, in the sense that you can directly invoke Microsoft.AspNetCore.SpaServices.Prerendering.Prerenderer.RenderToString, though the API isn't exactly optimised for ease of use, and it would be nicer to have an IActionResult that does this so the controller code is more testable. I'll look into adding an action result for this.

Also, what is the plan to handle individual server routes to fetch data to pre-render, specific to that page?
The templates demonstrate ways of fetching data, and in the case of Angular2Spa and ReactReduxSpa which do server-side rendering, the data is being fetched and prerendered on the server. Could you clarify what additional feature you're looking for, or is this what you need?

I'll close this now as the discussion seems to have concluded, and the original suggestion (support in-process JS engine) is reasonably covered by the existing issue #5. I don't think we're heading towards using a standalone V8 engine (as opposed to Node) because of the immense benefits of using Node and having its wide ecosystem all working perfectly.

authors: Kukkimonsuta SteveSandersonMS joshburgess pauldotknopf xabikos

repo: aspnet/NodeServices


text:
Core: Implement CSharp lowering pass (run time)

Convert IR created in this issue into runtime CSharp code.

5d4c4e1ccf67dc81118e7ef1da5c5c29020bd9d7
eb230e0408a5d7b087c102ae6f8e83293cfec7a1

repo: aspnet/Razor


text:
Added temporary parse error for helper directive

#472
@NTaylorMullen

:watch:

Updated.

:shipit: once @Eilon's comment is addressed.

authors: NTaylorMullen ajaybhargavb


text:
Scaffolding MVC w/views assumes the presence of _ValidationScriptsPartial.cshtml

When scaffolding a new MVC controller with views using Entity Framework, the Create and Edit views reference _ValidationScriptsPartial.cshtml, which is only included in the Individual Auth template, causing this error in other templates:
InvalidOperationException: The partial view '_ValidationScriptsPartial' was not found. The following locations were searched:
 /Views/Movies/_ValidationScriptsPartial.cshtml
 /Views/Shared/_ValidationScriptsPartial.cshtml

Everything seems to work after copying the file from another project.

TFS Bug#233433

This appears to be controlled by the "Reference script libraries" checkbox on the Add Controller dialog.  It's interesting that it won't generate the file if it's missing.

For anyone that lands here in the mean time...  I scaffolded a blank asp.net core project and found that the file should look like:
Add a file _ValidationScriptsPartial.cshtml to Views/Shared folder with the following:
<environment names="Development">
    <script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
    <script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
</environment>
<environment names="Staging,Production">
    <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.15.0/jquery.validate.min.js"
            asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js"
            asp-fallback-test="window.jQuery && window.jQuery.validator">
    </script>
    <script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js"
            asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
            asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive">
    </script>
</environment>

authors: Tratcher barrytang jsturtevant

repo: aspnet/Scaffolding


text:
Cleanup resx

Run build /t:resx to normalize the designer
@Tratcher

@HaoK,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

authors: HaoK dnfclas

repo: aspnet/Security


text:
Razor Class Library template should be in the .NET Standard node of New Project dialog rather than in One Asp Net dialog

INSTALL STEPS

VS 15.7 Preview 5 build d15.7.27622.00
CLI for .NET Core 2.1 RC (version 2.1.300-rc1-008662)

ACTUAL
The new "Razor Class Library" template currently shows up in the One Asp Net dialog when "ASP.NET Core 2.1" is selected
When you create a project using the template, the TFM in csproj is netstandard2.0. It's unclear from the One Asp Net UI that the project's TFM will be netstandard2.0 and it does not really correlate with the ".NET Core / .NET Framework" dropdown in the One Asp Net dialog.

EXPECTED
Suggestion: Below "Class Library (.NET Standard)" template, there can be a "Razor Class Library (.NET Standard)" template

Would the ".NET Standard" node in New Project Dialog be a better location for the "Razor Class Library" template? If the template applies to ASP.NET Core 2.1 projects only, perhaps we can get the template to show up only when the CLI for .NET Core 2.1 is installed.

Thanks for contacting us. We believe that the question you've raised have been answered. If you still feel a need to continue the discussion, feel free to reopen it and add your comments.

authors: balachir mkArtakMSFT

repo: aspnet/templating


text:
Aspose Pdf to Word

Hi,
We are trying to convert a PDF to Word Document using aspose api.
But the word document we get after conversion is loosing the whitespace characters and the text in the word document are wrapped one on another.
Could you please provide some sample code for PDF to Doc Conversion or any customizations in the conversion to be good.
we are using Aspose PDF 11.0.0.jar
Please see the below image for reference. (there are no spaces in between the words)

Hi,
The problem appears to be related to input document. Can you please upload the document to some free file sharer and share the link, so that we can test the scenario in our environment. We apologize for this inconvenience.

Hi CodeWarrior,
Thanks for a quick response
Please find the input pdf and let us know how to resolve.
Your help is highly appreciated.
Thanks,
Venkatesh.
input.pdf

Hi Wenky,
Thanks for sharing the resource file.
I have tested the PDF to DOC conversion and as per my observations, the space between words is being removed. For the sake of correction, I have logged it as PDFNEWJAVA-35854 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Hi ,
Could you please share the ETA for this issue.
We are waiting for this fix  as it is critical to our business.

Hi Wenky,
Thanks for your patience.
The product team has started investigating earlier reported issue but due to some technical limitations in API, they are not yet resolved. However as soon as we have some definite updates, we will let you know.

Hi CodeWarior,
Could you please share the technical difficulty or any work around for this.
I'm a developer by myself .
So I can try a work around for time beeing.

Hi Wenky,
Thanks for your patience.
The product team has started the investigation of earlier reported issue but I am afraid due to some technical limitations in our API, the issue is not yet resolved. However I have inquired latest updates and have requested the product team to share any possible workaround. As soon as we have some further updates, we will let you know.

Hi Code Warrior,
Could you please let us know the issue can be fixed.
Or please let us know the technical difficulty in this PDF.We will try to generate a Latest Version of PDF if required.
Please let us know the exact TECHNICAL DIFFICULTY , we would like to solve from our end.

Hi Wenky,
Thanks for your patience.
Until or unless we have investigated the issue in details, we may not be able to share the exact reasons causing this problem. However as soon as we have some definite updates, we will let you know.

Hi CodeWarrior,
Any update on this. :)

Hi Wenky,
Thanks for your patience. The product team has started investigating earlier reported issue but due to some technical limitations in API, its not yet resolved. However we plan to get it resolved in Aspose.Pdf for Java 12.0.0 which is scheduled to release in Q4-2016. As soon as we have some definite updates, we will let you know.

Thanks CodeWarior.
That's a great news for us.
Just if it is possible,Could you please share the converted word document prior to the release(in a near time now).
So that we can wait for the release.

Hi Wenky,
Once the product team has made some progress and we have some better output, we will share the result file for your reference Your patience and comprehension is greatly appreciated in this regard.
In case of any further query, please feel free to contact.

Hi Codewarrior,
Any update on this.we are waiting for this fix.

Hi Wenky,
Thanks for your patience. The product team has completed an initial investigating and I am in coordination with product team to get possible ETA. As soon as we have some definite updates, we will let you know.
We are sorry for this delay and inconvenience.

Hi CodeWarrior,
Thanks for the fix.
We have verified with the above mentioned release.
We are getting the spaces between the words..But still the PDF is not looking good for the user perspective.
The fonts/text are not looking good.
Is this anything that can be changed programatically in aspose

Hi CodeWarrior,
Any Update on this?

Hi Wenky,
Thanks for sharing the feedback and sorry for the delayed response.
I have tested the scenario using latest release of Aspose.Pdf for Java 16.10.0 and I am unable to notice any issue. Can you please try using the latest release and share your findings. Please take a look over image shared over this link.

Hi CodeWarior,
The link  you showed did a really good conversion,May it is not finding any fonts required for the conversion on our machines.
Could you please share as any extra fonts that need to be added to get the output in the link.
Is there a way you can help us in finding the fonts required for the conversion.

Hi Wenky,
In order to perform proper conversion, you need to have all fonts used in your PDF file, available on your system. In case the fonts are missing, the conversion may encounter issues.

Hi CodeWarrior,
Can you please guide us in finding the required fonts.
We are doing the conversion on a linux machine.we have copied the fonts from our windows machine to linux, But still the same problem exists.

Hi Wenky,
In order to determine the required fonts, please check Fonts tab under Document properties section. Furthermore, please note that for non-Windows OS's, you need to set font folder path according to your system before start any processing. You can use following methods to get system folder of fonts or set font path to font folders. Hopefully it will help you to fix the issue.
Document.getLocalFontPath () - shows the system folder in which project will look for fonts.
Document.setLocalFontPath (String) - Setting font path to custom folder
//adding a new font path
String path = "c:\fonts\";
com.aspose.pdf.Document.addLocalFontPath(path);
....
....
Moreover please also check following code snippet to set font path if there are more than one font path.
//getting the list for standard font directories in different OS
java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();
//setting the user list for standard font directories
list.add("c:\fonts2\");
list.add("c:\fonts3\");
com.aspose.pdf.Document.setLocalFontPaths(list);

Hello,
When talking about the pdf file, I got a bad word with the Aspose library:

Our client does not accept blocks, he sees a word document like that of the original office.
Do you have an idea please?

authors: LemjidMohamed codewarior wenky


text:
Pdf to vectorial

Hi is there a way to convert a pdf page to vectorial instruction. Tried to use GraphicsDevice but not sure if it's the right solution.

Hi,
Thanks for using Aspose.Pdf for Java. Please note that in order to convert PDF to SVG format which is standard for Vector graphics by W3c. Please try following the instructions specified over Convert PDF to SVG Format. In case you encounter any related issue, please share the resource file, so that we can further look into this matter..

thanks seems great. But for my purpose it would be great to have more control on page rendering, and  having an intermediary representation not svg that is quiet complex but just vectorial instruction provided by a sort of GraphicalHandler.

Hi,
Thanks for sharing the details.
I am afraid currently Aspose.Pdf for Java does not support the feature to convert PDF page contents to vectorial instruction. However for the sake of correction, I have logged this requirement as PDFJAVA-35921 in our issue tracking system. We will further look into the details of this requirement and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

thanks @codewarior. Please contact me when it's ok ;-)

Hi,
Once we have updates, we will surely update you. Have a nice time and once again, thanks for using our API's.

authors: codewarior llgcode

license: mit

license_source: bigquery


text:
Update AbstractCharSequenceAssert.java reference

PR Summary
Small PR - Commit 3f3110fd56b2dc9b55ab8b4fb1a12b0fab439cef moved AbstractCharSequenceAssert.java. This PR adjusts sources to changes.

Thanks @emmanuel-ferdman, good catch.

authors: emmanuel-ferdman joel-costigliola

repo: assertj/assertj


text:
Certificação de Software em Angola

Boa tarde,
Alguém que já tenha feito a certificação do software na AGT, pode pff dar algum input sobre o processo?
Como se despoleta? Como decorre? Como podemos validar o ficheiro SAFT que estamos a desenvolver?
Obrigado desde já,
Filipe

Boa noite caríssimo,
por acaso estou no mesmo processo,

aceder o portal https://invoice.minfin.gov.ao/portalSupplier/views/login/login.html,
Efectuar o cadastro
Efectuar uma Solicitação de Validação do Software Comercial
aguardar pelo pronunciamento da AGT

Boa noite,
Muito obrigado!
Em termos de processo, sabe se é necessário fazer uma demonstração à AGT?
A estrutura do SAFT pode ser validado, nesse link que me enviou?
Obrigado
Filipe

@FMACC1, sei que é necessário fazer essa demonstração sim, no email terá essa informação, no link que enviei depois de efectuar o cadastro terá sim como testar o saft.
no meu caso estou a terminar o saft, mais estou com dificuldades em trabalhar com o RSA, conhece algum site onde posso encontrar informações a respeito ou exemplo de códigos, que funcionem tal como o openssl?

Ainda estou no início do processo, ainda não investiguei essa parte.
Mas veja este tópico: https://github.com/assoft-portugal/SAF-T-AO/issues/49
Pode ser que alguém o ajude.

@FMACC1, sei que é necessário fazer essa demonstração sim, no email terá essa informação, no link que enviei depois de efectuar o cadastro terá sim como testar o saft. no meu caso estou a terminar o saft, mais estou com dificuldades em trabalhar com o RSA, conhece algum site onde posso encontrar informações a respeito ou exemplo de códigos, que funcionem tal como o openssl?

Boa noite caríssimo, por acaso estou no mesmo processo,

aceder o portal https://invoice.minfin.gov.ao/portalSupplier/views/login/login.html,
Efectuar o cadastro
Efectuar uma Solicitação de Validação do Software Comercial
aguardar pelo pronunciamento da AGT

Olá família. Também estou nesta luta!!
Os requisitos se mantêm os mesmos??
E como é o processo da assinatura digital nas facturas?
SE poderem me ajudar, agradeço imenso.

authors: FMACC1 juliaokataleko vd-king

repo: assoft-portugal/SAF-T-AO


text:
Sidebar doesn't load on second page request

If I go to a page without the sidebar and then navigate to a page with the sidebar, it renders as this
[object External]
Steps:

run project and go to /news as first page loaded
click on home link on nav and go to /

Results:
Sidebar renders as [object External]

I will take a look into this.

Stumbled accross this while testing astoilkov/jsblocks#109 against this app as sugested.
Things I fund out:

Appears in Firefox (maybe other browsers but definitly not chrome) when the template()-data-query is rendered client side.

It renders correctly when inserting a string and not a reference to the object e.g. :

That could be a jsblocks issue but I'm not sure yet. I'll look into this after I'm done with testing the PR.

but using a string in template() data-query seems to be derpy when rendered server-side.
From the example above the content would be just sidebar but when rendered as reference it renders correctly.
Btw. all I comment here is tested with v0.3.4 and not my PR.

Okay the issue of the [object External] that occurs in firefox is one of the harder edge cases.
Let me explain:
when jsblocks finds a  data-query it starts parsing it and executes the parameters in a function which results in something like that:
data-qeury:template(sidebarId)
function (c) {
  with(c) {
     with ($this) {
       return templateId;
    }
  }
}

when this function gets executet it gets the current context as the parameter.
Blocks uses the behaviour of browsers that element-ids get attached to the window element as the this-context of the function is window and in the context (c) is no ```templateIdit will return the value ofwindow.templateId. In Firefox the property sidebaris [already used](https://developer.mozilla.org/de/docs/Web/API/Window/sidebar) and will not get overwritten by the script with the idsidebar. Firefox window.sidebar`` property will return '[object External]' when it get's converted to a string.
I think we should change the behaivor as it will fail with all properties attached to the window object.

authors: Kanaye astoilkov clarkeadg

repo: astoilkov/jsblocks-shopping-example


text:
Windows tests fail during ruff_macros discovery

Ex: https://github.com/astral-sh/ruff/actions/runs/9105298538/job/25030681657?pr=11438

This is so annoying lol. What even changed here?

repo: astral-sh/ruff


text:
Avoid failures due to non-deterministic binding ordering

Summary
We're seeing failures in https://github.com/astral-sh/ruff/issues/10470 because resolve_qualified_import_name isn't guaranteed to return a specific import if a symbol is accessible in two ways (e.g., you have both import logging and from logging import error in scope, and you want logging.error). This PR breaks up the failing tests such that the imports aren't in the same scope.
Closes https://github.com/astral-sh/ruff/issues/10470.
Test Plan
I added a bindings.reverse() to resolve_qualified_import_name to ensure that the tests pass regardless of the binding order.

Would also be solved by https://github.com/astral-sh/ruff/issues/10479.


text:
FEAT: Support to set the Project Version using uv command

Currently I'm using poetry and would like move into uv world. One of the migration point is to be able to set the project version in pyproject.toml using  uv command.
[project]
name = "package"
version = "0.0.0" # will be always like this in pyproject.toml & need updating on release

Similarly using poetry: poetry version 1.0.0 -- This feature will help to simplify the Pypi Publishing workflow.
In my case, here is the sample Github Workflow step:
    - name: Build and publish
      run: |
        poetry version $(git describe --tags --abbrev=0)
        poetry build
        poetry publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }}

My expectation is that something I can do the same for uv:
    - name: Build and publish
      run: |
        uv version $(git describe --tags --abbrev=0)
        uv build
        uv publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }}

OR:
    - name: Build and publish
      run: |
        uv build --version $(git describe --tags --abbrev=0)
        uv publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }}

Thanks for the issue. This is a duplicate of #6298

authors: datnguye zanieb

repo: astral-sh/uv


text:
Allow path with fragment

This PR handles the fragment part of the URL path.
It achieves this by splitting the fragment from the path before normalization and parsing. It then sets the fragment back after the URL has been parsed.
Resolve #2501

Nice, thank you. Looks like there's one test failure on Windows.

Will review and merge tomorrow, thanks!


text:
Add Optimistic Block Executor logic to Auctioneer

[ ] Link to system diagram
[ ] Link to master doc

As per the requirements outlined in the trusted auctioneer MVP design, the auctioneer will receive blocks optimistically from the sequencer and pass them to the bundle service for execution. A task to manage this needs to be implemented.
The OptimisticBlockExecutor will:
### Tasks
- [x] Subscribe to the `OptimisticBlockStream` and `BlockCommitment` streams from the sequencer
- [x] Set up the bidirectional streams with the `BundleService` in Geth
- [x] Convert `FilteredSequencerBlock` received from the `OptimisticBlockStream` to `BaseBlock` and push to the `BundleService` for optimistic execution
- [x] Process the optimistic execution results streamed from the `BundleService` to trigger the start the auction

This issue is stale because it has been open 45 days with no activity. Remove stale label or this issue
be closed in 7 days.

This issue was closed because it was stale

authors: itamarreif joroshiba

repo: astriaorg/astria


text:
conductor: refactor and implement full node sync from sequencer

Summary
This patch adds sync functionality to conductor. On every startup conductor will get all blocks up to the latest height from sequencer and forward them to the executor before submitting blocks it got from its subscription.
Background
Because conductor is thought of as stateless sidecar to a rollup node there needs to be a mechanism to bring the rollup node to the latest state. This patch adds that functionality by fetching all sequencer blocks up to the latest sequencer height for the target chain ID and replaying ("executing") them against the rollup node.
Because the prior implementation of conductor was strictly sequential (blocking the async loop) this patch required a refactor of conductor into fully async components.
Changes

Replace all http clients by websocket clients.
Add an object pool of websocket clients with a managing task that restarts the websocket connection on failure.
Remove the Driver type.
Simplify Executor by not being generic over some client
Introduce the data_availability::Reader and sequencer::Reader types that are independently reading off celestia and sequencer, respectively
Refactor data_availability::Reader from a for-loop blocking the actor's event loop into a chain of futures that are driven by its event loop
Perform sequencer namespace data verification in one step:

the block verifier need not get a validator set for each rollup blob retrieved from celestia; it is enough to run its inclusion proof + data against the root in the sequencer data.
since the sequencer namespace data is verified and rollup processing does not continue without it this is enough

Add sync functionality to sequencer::Reader: fetch all sequencer blocks between a configured initial height and the latest height and submit them to the rollup node for execution before submitting newer blocks.
Refactor the Conductor entry point to track its constituent tasks in a JoinMap.

Testing
These tests have to be tested by running conductor in devnet. Conductor does not currently have black box tests. These must be added in a follow PR.
The executor mock tests have been uncommented because executor should not be generic. These too will be replaced by blackbox tests.
Breaking Changelist

the ASTRIA_CONDUCTOR_TENDERMINT_URL has been removed. All communication with cometbft/sequencer happens over the URL configured in ASTRIA_CONDUCTOR_SEQUENCER_URL.
no other breaking changes should be observable.

Related Issues
closes #439
closes #451
closes #452

Update: I have significantly simplified sequencer::Reader by moving the sync process into its own future.


text:
Can't create more than two PYENV environments

# syntax=quay.io/astronomer/airflow-extensions:v1

FROM quay.io/astronomer/astro-runtime:9.11.0

PYENV 3.11 dbt_1_7_0 requirements/dbt_1_7_0.txt
PYENV 3.11 dbt_1_7_2 requirements/dbt_1_7_2.txt
PYENV 3.11 crawler requirements/crawler.txt

When I add more than 2 environments, I get the following error:
 => ERROR [stage-0 32/39] RUN ln -s /usr/local/include/python3.11 /usr/local/include/python3.11m                                                                                0.3s
------
 > [stage-0 32/39] RUN ln -s /usr/local/include/python3.11 /usr/local/include/python3.11m:
0.310 + ln -s /usr/local/include/python3.11 /usr/local/include/python3.11m
0.311 ln: failed to create symbolic link '/usr/local/include/python3.11m/python3.11': File exists
------
Dockerfile:57
--------------------
  55 |     RUN /sbin/ldconfig /usr/local/lib
  56 |
  57 | >>> RUN ln -s /usr/local/include/python3.11 /usr/local/include/python3.11m
  58 |     USER astro
  59 |     RUN mkdir -p /home/astro/.cache/pip /home/astro/.venv/crawler
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -e -u -x -c ln -s /usr/local/include/python3.11 /usr/local/include/python3.11m" did not complete successfully: exit code: 1
Error: command 'docker build -t cdp-snowstorm_617a0d/airflow:latest failed: failed to execute cmd: exit status 1

I don't get the same error when I have just two environments, though.

I can reproduce this issue. This Dockerfile fails with the same error. If you comment out the three line it works. Docker 25.0.3
# syntax=quay.io/astronomer/airflow-extensions:v1

FROM quay.io/astronomer/astro-runtime:9.11.0

PYENV 3.11 one
PYENV 3.11 two
PYENV 3.11 three

@gasci Releases as v1.0.2 of the buildkit has been pushed (and re-pushed as quay.io/astronomer/airflow-extensions:v1 that should fix this)

I confirm that the issue has been resolved @ashb

authors: ashb gasci techgnosis

repo: astronomer/astro-provider-venv