Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all 7215 articles
Browse latest View live

Created Feature: Expose ExpectedType and ActualType from IDelta [1078]

$
0
0
When looking at a delta internally we know the actual type and expected type, but this code is internal.
It is very useful, and is needed to create a bridge between WCF Data Services and Web API and is locked away.

I talked to Eilon about this and he was okay with making this change for RTM.

Closed Issue: MQ: Add SHA1 to assembly file properties [844]

$
0
0
Add SHA1 to assembly information similar to what we started doing for Katana/SignalR. Allows us to trace DLLs back to git commits.

Commented Issue: Broken Image link in Bing SearchBox helper [624]

$
0
0
To reproduce this, follow these steps:

1. Create a new site that references Microsoft.Web.Helpers.
2. Add @Bing.SearchBox to one of the pages.
3. Navigate to the page in the browser of your choice.

Result: The search button image will be broken. This appears to be a recent development.
Expected: We should be using a current, valid image for the search button. It looks like Bing is currently using a sprite from the image file http://www.bing.com/fd/s/a/sw17.png


Comments: How to replace the http://www.bing.com/siteowner/s/siteowner/searchbutton_normal_k.gif with http://www.bing.com/siteowner/s/siteowner/Spyglass_24x24.gif ? The 1st one is showing on the "view source" of the page when bing image is broken.

Created Unassigned: HttpActionBindingTracer is doubly wrapped [1079]

$
0
0
The ActionValueBinderTracer unconditionally wraps an HttpActionBindingTracer around whatever object is returned from its innerBinder.GetBinding. If the binding has already been wrapped with a tracer, it gets wrapped again.

The ActionValueBinderTracer should not wrap another tracer around the results of GetBinding() if it is already a tracer.

Created Unassigned: HttpActionDescriptorTracer is doubly wrapped [1080]

$
0
0
The ActionSelectorTracer unconditionally wraps an HttpActionDescriptorTracer around whatever object is returned from innerSelector.SelectAction. But if that object is already wrapped by a tracer, it gets wrapped a 2nd time.

ActionSelectorTracer should check that its HttpActionDescriptor has already been wrapped by a tracer.

Closed Issue: .NET 4.5 post-upgrade cleanups [841]

$
0
0

After we upgrade the projects under Runtime.sln to .NET 4.5, we need to reivew and cleanup the source code to make sure we're making full use of .NET 4.5.

Consider the followings:
* Remove ParameterInfoExtensions.GetCustomAttributes<TAttribute> and use .NET 4.5's CustomAttributeExtensions.GetCustomAttributes<T>
* Remove the package dependency on Microsoft.Web.Infrastructure. Should be able to use everything from System.Web
* Remove MachineKey40CryptoSystem, no longer needed for 4.5
* Review the use of obsolete APIs MachineKey.Encode/Decode
* Remove the System.Web.Helpers.UnvalidatedRequestValues class, this can be replaced with System.Web.UnvalidatedRequestValues
* Consider removing System.Web.Helpers.Validation extensions, should just use Request.Unvalidated which is available in 4.5

Closed Feature: Error when using ODataQueryOptions with primitive return type. [546]

$
0
0
Scenario:
I have a Persons controller, which is a regular Web API controller and not based on OData.
I would like users to be able to supply queryable options on Person and only return small amounts of data rather than the full Person objects.
Example: returning list of names of all Persons whose age > 30 years.

Actual: Error thrown during parameter binding
Expected: Since user wants to take care of applying options himself, he should be able to do whatever he wants within the action and return data of any kind(primitive or non-primitive)

Model
-----
public class Person
{
public string Name { get; set; }

public DateTime DateOfBirth { get; set; }

public int Id { get; set; }
}

Web API Action
--------------
public IEnumerable<string> Get(ODataQueryOptions options)


Exception
---------
{"Message":"An error has occurred.","ExceptionMessage":"No EntitySet exists in the EdmModel with EntityClrType 'System.String'.","ExceptionType":"System.InvalidOperationException","StackTrace":" at System.Web.Http.OData.ODataQueryContext..ctor(IEdmModel model, Type entityClrType) in d:\\Runtime\\src\\System.Web.Http.OData\\OData\\ODataQueryContext.cs:line 68\r\n at System.Web.Http.OData.ODataQueryParameterBindingAttribute.ODataQueryParameterBinding.ExecuteBindingAsync(ModelMetadataProvider metadataProvider, HttpActionContext actionContext, CancellationToken cancellationToken) in d:\\Runtime\\src\\System.Web.Http.OData\\OData\\ODataQueryParameterBindingAttribute.cs:line 95\r\n at System.Web.Http.Controllers.HttpActionBinding.<>c__DisplayClass1.<ExecuteBindingAsync>b__0(HttpParameterBinding parameterBinder)\r\n at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n at System.Threading.Tasks.TaskHelpers.IterateImpl(IEnumerator`1 enumerator, CancellationToken cancellationToken)"}
Comments: Verified. Users can return Persons and can use $select now.

Commented Unassigned: [WebApiOnOwin]Formatter write exceptions generated HttpError responses are sent in chunked encoding format [998]

$
0
0
When there are exceptions during a formatter's write to stream, I am seeing that the HttpError responses is being sent in chunked encoding format.

I noticed that this HttpError response behavior is correct(i.e non-chunked) when its generated for exceptions happening at other layers (for example, inside an action).

Attached a standalone repro.

__NOTE__: this bug is different from #993 in sense that the current scenario has a body in it, where as #993 does not have one.
Comments: Fixed: https://aspnetwebstack.codeplex.com/SourceControl/changeset/caa9c635597ffc06d7693848d91cbf0b40932b7c

Edited Issue: [WebApiOnOwin]Formatter write exceptions generated HttpError responses are sent in chunked encoding format [998]

$
0
0
When there are exceptions during a formatter's write to stream, I am seeing that the HttpError responses is being sent in chunked encoding format.

I noticed that this HttpError response behavior is correct(i.e non-chunked) when its generated for exceptions happening at other layers (for example, inside an action).

Attached a standalone repro.

__NOTE__: this bug is different from #993 in sense that the current scenario has a body in it, where as #993 does not have one.

Closed Issue: MVC areas do not support RouteCollection.LowercaseUrls [685]

$
0
0
See http://stackoverflow.com/questions/13271048/net-4-5-mvc-routecollection-lowercaseurls-breaks-when-using-area for full details.

It appears that this is caused by there being multiple instance of RouteCollection - one "global" one, and one per area. Presumably we'd need to propagate the settings from the parent RouteCollection to the area ones (or something like that).
Comments: Verified.

Closed Issue: [WebApiOnOwin]Formatter write exceptions generated HttpError responses are sent in chunked encoding format [998]

$
0
0
When there are exceptions during a formatter's write to stream, I am seeing that the HttpError responses is being sent in chunked encoding format.

I noticed that this HttpError response behavior is correct(i.e non-chunked) when its generated for exceptions happening at other layers (for example, inside an action).

Attached a standalone repro.

__NOTE__: this bug is different from #993 in sense that the current scenario has a body in it, where as #993 does not have one.
Comments: Verified.

Closed Issue: Progress Notifications should support more than 2G of bytes sent/received [271]

$
0
0
In progress notifications, bytes received and bytes sent should be Int64 and not Int32 as they contain the cumulative values of the number of bytes received or sent and not just the number immediately received or sent. As it is fully possible to upload/download more than 2G of data with Web API this should be changed to Int64 to match how we deal with content-length in general (always as Int64).
Comments: Verified.

Commented Unassigned: HttpActionBindingTracer is doubly wrapped [1079]

$
0
0
The ActionValueBinderTracer unconditionally wraps an HttpActionBindingTracer around whatever object is returned from its innerBinder.GetBinding. If the binding has already been wrapped with a tracer, it gets wrapped again.

The ActionValueBinderTracer should not wrap another tracer around the results of GetBinding() if it is already a tracer.
Comments: This double wrapping happens when using OData because attributes like ODataFormatterAttribute are *lazily* initialized, and they are initialized *after* the tracing layer has already initialized. The ODataFormatterAttribute replaces the ActionValueBinder service (already wrapped) with a PerRequestActionValueBinder that delegates to its inner binder. But because the inner binder is the ActionValueBinderTracer, the bindings it returns are wrapped with tracers. The net result is double wrapping. To repro: 1) Make a standard vanilla WebApi app with VS 2) Add [ODataFormatter] to the ValuesController (I know -- you don't need to use OData to trigger this) 3) Add the Tracing NuGet package to enable tracing 4) Set a breakpoint on ActionValueBinderTracer.GetBinding where it creates a new HttpActionBindingTracer. 5) Start the app 6) Use Fiddler to hit the api/Values controller with a GET 7) In time, the breakpoint will be triggered, and the inner binder the tracer is about to wrap is already a tracer. The net effect is of course double tracing. More importantly, it is chaining multiple continuations together.

Commented Issue: Provide a method to update the user of the form token for AntiForgery [944]

$
0
0
If you look at this SO thread: [AntiForgeryToken invalid after sign in](http://stackoverflow.com/questions/9096769/antiforgerytoken-invalid-after-sign-in)

It seems to me that an official method, is needed to cleanly update the form token, when the user has been successfully authenticated. This comes very handy on Single Page Applications.
Comments: Some discussion related here: [https://aspnetwebstack.codeplex.com/discussions/435876](https://aspnetwebstack.codeplex.com/discussions/435876)

Commented Issue: Provide a method to update the user of the form token for AntiForgery [944]

$
0
0
If you look at this SO thread: [AntiForgeryToken invalid after sign in](http://stackoverflow.com/questions/9096769/antiforgerytoken-invalid-after-sign-in)

It seems to me that an official method, is needed to cleanly update the form token, when the user has been successfully authenticated. This comes very handy on Single Page Applications.
Comments: I have found a "solution", please see the discussion

Closed Issue: EntityFramework CRUD scaffolding template incorrectly uses Single() [251]

$
0
0
The templated Delete action for an "API controller with read/write actions, using Entity Framework" produces the following code:

Platform platform = db.Platforms.Single(p => p.Id == id);
if (platform == null)
{
return Request.CreateResponse(HttpStatusCode.NotFound);
}

If I'm not mistaken, Single will throw on a null/no elements in sequence, and so the null check in the 2nd line will never run and the 404 will not be returned.

The template needs to be updated to use SingleOrDefault.

Thanks!

Closed Issue: MimeMultipartBodyPartParser fails with IOException for file of size 26 bytes [257]

$
0
0
System.AggregateException: One or more errors occurred. ---> System.IO.IOException: Unexpected end of MIME multipart stream. MIME multipart message is not complete.
at System.Net.Http.Formatting.Parsers.MimeMultipartBodyPartParser.<ParseBuffer>d__0.MoveNext() in f:\workspace\runtime\src\System.Net.Http.Formatting\Formatting\Parsers\MimeMultipartBodyPartParser.cs:line 129
at System.Net.Http.HttpContentMultipartExtensions.MoveNextPart(MultipartAsyncContext context) in f:\workspace\runtime\src\System.Net.Http.Formatting\HttpContentMultipartExtensions.cs:line 267
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.IO.IOException: Unexpected end of MIME multipart stream. MIME multipart message is not complete.
at System.Net.Http.Formatting.Parsers.MimeMultipartBodyPartParser.<ParseBuffer>d__0.MoveNext() in f:\workspace\runtime\src\System.Net.Http.Formatting\Formatting\Parsers\MimeMultipartBodyPartParser.cs:line 129
at System.Net.Http.HttpContentMultipartExtensions.MoveNextPart(MultipartAsyncContext context) in f:\workspace\runtime\src\System.Net.Http.Formatting\HttpContentMultipartExtensions.cs:line 267<---

Closed Issue: input type="date" not in correct format [457]

$
0
0
I just ran across this issue today in Chrome. If you create a page with the following

Model:

public class Model {
[DataType(DataType.Date)]
public DateTime LastModified { get; set; }
}

Page:

@Html.EditorFor(x => x.LastModified)

Generates This:

<input type="date" value="01/01/2001" />

However the specs require an RFC 3339 / ISO 8601 Date. The Chrome browser refuses to use the date in this format. Here is the line to the spec.

http://dev.w3.org/html5/markup/datatypes.html#form.data.date

In order to get this to work in MVC4 I have to use the following:

@Html.TextBox(
name: "LastModified"
value: Model.LastModified.ToString("yyyy-MM-dd"),
htmlAttributes: new { type="date" })


Edited Issue: input type="date" not in correct format [457]

$
0
0
I just ran across this issue today in Chrome. If you create a page with the following

Model:

public class Model {
[DataType(DataType.Date)]
public DateTime LastModified { get; set; }
}

Page:

@Html.EditorFor(x => x.LastModified)

Generates This:

<input type="date" value="01/01/2001" />

However the specs require an RFC 3339 / ISO 8601 Date. The Chrome browser refuses to use the date in this format. Here is the line to the spec.

http://dev.w3.org/html5/markup/datatypes.html#form.data.date

In order to get this to work in MVC4 I have to use the following:

@Html.TextBox(
name: "LastModified"
value: Model.LastModified.ToString("yyyy-MM-dd"),
htmlAttributes: new { type="date" })


Closed Issue: ASP.NET Web API does not call GetRouteData for custom HttpRoutes [453]

$
0
0
Here is the issue explained and a repro http://stackoverflow.com/questions/12544150/asp-net-web-api-rtm-and-subdomain-routes
Comments: Verified.
Viewing all 7215 articles
Browse latest View live