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

Closed Feature: OData does not support $select [326]

$
0
0
This is the second most important odata commands after $filter. It's also trivial to implement because it's directly translatable to Dynamiclinq without alteration other than escaping it.
Comments: verified

Closed Feature: Add JSON Light support [483]

$
0
0
Need to set the ODataMessageWriterSetting.MetadataDocumentUri before calling ODataWriter
Comments: verified

Closed Feature: Attach request to the formatter for the OData code path [661]

$
0
0
We can attach the request to the formatter in the odata action selector.
Comments: verified

Closed Issue: Razor parser returns incorrect data tree for @section a {something} [899]

$
0
0
output returned by Razor parser for “@section a {something}” is as below. tree returned in incorrect.

- block {Markup Block at (0:0,0)::33 (Gen:None)} System.Web.Razor.Parser.SyntaxTree.Block
+ base {Markup Block at (0:0,0)::33 (Gen:None)} System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode {System.Web.Razor.Parser.SyntaxTree.Block}
- Children Count = 3 System.Collections.Generic.IEnumerable<System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode> {System.Collections.Generic.List<System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode>}
+ [0] {Markup Span at (0:0,0)::0 - [] Edit: <SpanEditHandler;Accepts:Any> Gen: <Markup> {HtmlSymbol:1}} System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode {System.Web.Razor.Parser.SyntaxTree.Span}
+ [1] {Section Block at (0:0,0)::21 (Gen:Section:a)} System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode {System.Web.Razor.Parser.SyntaxTree.Block}
+ [2] {Markup Span at (12:0,12)::12 - [something}
] Edit: <SpanEditHandler;Accepts:Any> Gen: <Markup> {HtmlSymbol:2}} System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode {System.Web.Razor.Parser.SyntaxTree.Span}


Comments: Verified with the 5/30 build

Closed Issue: Queryable on Class validates all methods must be IEnumerable etc. This is not valid logic [586]

$
0
0
Right now if you put the queryable attribute on a class it throws on Get(int ID) that returns a single object.

This is patently silly and must be removed. It is absolutely valid to put [Queryable] on a controller and have single item responses in it. Obviously you should SKIP processing any odata commands on methods that return a single object, or you can feel free to throw if there are odata $ commands on a call to a single object response. But if there are no $ commands then it should not throw.

The way it is right now you couldn't put it on an entire class without it being guaranteed to break.

In general I continue to be shocked and amazed by how little understanding of how Web API is going to be used. This isn't the first time I've slapped my head at the silliness of the implementations that are being checked in. It's especially bad when it comes to OData for some reason. You guys really need to figure out your use cases WAY better because if you continue down this path Web API is going to continue to be as useless as V1 was and the old Microsoft gets it right on V3 adage is going to hold true.
Comments: The behavior changed as part of the $select and $expand support, it works right now

Closed Feature: Add overload to the model builder to indicate whether the links are following convention [701]

$
0
0
Add overload to the model builder to indicate whether the links are following convention, which includes edit link, navigation and self link.

This is to prevent the links to show up for the Json light minimum metadata support.
Comments: verified

Closed Issue: Consider different signature for ODataMediaTypeFormatters.Create [700]

$
0
0
Per HongMei

Some possibilities:
Return Collection<T> instead of IEnumerable<T>
Move the method to ODataMediaTypeFormatter and call it something like CreateAll or CreateFormatters.
Comments: verified

Closed Issue: Validators in WebPages Do Not Work When Using @RenderPage [446]

$
0
0
In the Web Pages framework, if I browse directly to a page that contains a form, validation works as intended. If I call the page from another page using RenderPage, the ValidationSummary and ValidationMessage controls do not display their messages:
@RenderPage("~_MyForm.cshtml")

See attached sample for example.
Comments: Verified with the 5/30 build

Closed Issue: $select fails when Queryable has PageSize. [1020]

$
0
0
EntitySetController currently returns an IQueryable<T> for its Get() function. When supplying the $select query, it'll throw an ArgumentException stating that it is unable to convert the SelectExpandWrapper to IQueryable.

I suppose the function should be changed to return an IEnumerable instead and set the QueryableAttribute on it.
I also think the functions that return T should be adapted to utilize SingleResult<T>?
Comments: verified

Closed Issue: Make APIController more testable [175]

$
0
0
It is currently difficult to unit test actions on ApiController. The primary source of this are non-virtual and non-settable properties. Their getters must be satisfied through convoluted mechanisms.

I recommend these 3 properties be made either virtual or be given a public setter:
1) ApiController.Url
2) ApiController.ModelState
3) ApiController.User

If made virtual, consider making all the properties in ApiController virtual.
Comments: https://aspnetwebstack.codeplex.com/workitem/971 is keeping track of the remaining work

Closed Issue: OData : Select character encoding based on the content headers and remove hardcoded one [339]

$
0
0
Currently UTF8 encoding is hardcoded and is always used to write the content. We would need to use the base.SelectCharacterEncoding(..) to get the appropriate encoding to write. This helper method is used in xml and json formatters too.
Comments: verified

Commented Issue: Update the Web API OWIN adapter to use Microsoft.Owin once it behaves well [1054]

$
0
0
Biggest adoption blockers identified so far are:

1. Potential null refs when computing URIs
2. Doesn't throw when required keys are missing from the environment, or when the environment has the wrong type for a particular key
Comments: should also cover switching to getting a URI that respects the encoding of the #, ?, %, and \

Closed Issue: ODataQueryOptions overwrites InlineCount and NextPageLink even if the are set already. [976]

$
0
0
If you manually set the count to return by using SetInlineCount or NextPageLink, the QueryableAttribute action filter overwrites it, so your value is never returned in the response.

Confirmed as a bug by "raghuramn". A workaround exists in the discussion.
Link to discussion: https://aspnetwebstack.codeplex.com/discussions/439302#post1026333


Comments: verified

Closed Issue: HttpRoute.GetVirtualPath shouldn't fail just becase the route data property is missing [669]

$
0
0
GetVirtualPath on HttpRoute currently has this code:
IHttpRouteData routeData = request.GetRouteData();
if (routeData == null)
{
return null;
}

That's wrong. In MVC we don't require route data to generate a link. Instead, we just treat it as if the route data had an empty collection.

This behavior is particularly problematic for MediaTypeFormatters that need to serialize errors and use GetVirtualPath in their implementation. If routing itself fails, no route data property will be set. When the media type formatter is asked to serialize the resulting error, it won't be able to use GetVirtualPath.
Comments: verified

Closed Issue: Bug in MVC4: System.Web.PrefixContainer [616]

$
0
0
It seems that internal System.Web.PrefixContainer class was introduced in MVC4 and this class has the bug, which is reproduced with the following model, view and controller action method:

public class Model
{
public Model()
{
Value = new List<Item>();
}

public string SomeData { get; set; }

public string ValueIsSequence { get; set; }

public class Item
{
public string Data { get; set; }
}

public List<Item> Value { get; set; }
}

@using (Html.BeginForm())
{
<input type="text" name="SomeData" value="123" />
<input type="text" name="ValueIsSequence" value="True" />
<input type="text" name="Value[0].Data" value="ABC" />

<button type="submit">OK</button>
}

[HttpPost]
public ActionResult Testing(Model model)
{
var failed = model.Value.Count == 0;
return View();
}

The bug is that Model.Value list is empty and "Value[0].Data" form field is skipped. Prefix matching fails while checking "Value" prefix (for the Model.Value property) and probing "ValueIsSequence" field in binary search: "Value" is not equal to "ValueIsSequence" of course, and then the PrefixContainer supposed (incorrectly) that field can only be "Value." or ""Value[", but it detects "ValueIsSequence" that does not match "Value." nor "Value[", the comparer returns -1 (less) and binary search is moving to less half to probing "SomeData" field. So the binary search never detects "Value[0].Data" and Model.Value stays not filled.

Renaming "ValueIsSequence" to "IsSequence" for example, is a possible workaround.

Comments: verified

Commented Issue: Value validator should swallow exceptions from getters when traversing tree [611]

$
0
0
Otherwise the exception bubbles up and request fails
Comments: Fixed: https://aspnetwebstack.codeplex.com/SourceControl/changeset/0c9be54d660dc289206ae978baad4026f798a2bf

Closed Issue: UrlHelper throws MethodNotimplementedException with batching in webhost [215]

$
0
0
With the following batching code in webhost,

HttpConfiguration memoryConfig = new HttpConfiguration();
HttpServer memoryServer = new HttpServer(memoryConfig, GlobalConfiguration.DefaultHandler);
GlobalConfiguration.Configuration.MessageHandlers.Add(new BatchingMessageHandler(memoryServer));


we receive a MethodNotimplementedException while using UrlHelper.Route in the following action,

[ActionName("link"), HttpGet]
public string GetUrl()
{
return Url.Link("API Default", new { Controller = "batch", Action = "contacts" });
}


The issue here is that the routing is handled by HostedHttpRoute which expects the HttpRequestMessage to have a underlying asp.net HttpContextBase. But the request message that matches the route is a vanilla HttpRequestMessage created by the BatchingMessageHandler without any underlying HttpContextBase.


Fortunately, there is a workaround. Instead of reusing the routes from GlobalConfguration we need to create HttpRoute (not HostedHttpRoute) in the memory server of the BatchingHandler to make this scenario work like,

HttpConfiguration memoryConfig = new HttpConfiguration();
memoryConfig.MessageHandlers.Add(new SampleMemoryMessageHandler());
memoryConfig.Routes.MapHttpRoute(
name: "API Default",
routeTemplate: "app/api/{controller}/{action}",
defaults: new { controller = "Batch", action = RouteParameter.Optional }
);
HttpServer memoryServer = new HttpServer(memoryConfig);



Stack trace for the exception.

System.Web.dll!System.Web.HttpContextBase.Response.get() + 0x1e bytes
System.Web.dll!System.Web.Routing.RouteCollection.GetUrlWithApplicationPath(System.Web.Routing.RequestContext requestContext, string url) + 0x86 bytes
System.Web.dll!System.Web.Routing.RouteCollection.GetVirtualPath(System.Web.Routing.RequestContext requestContext, string name, System.Web.Routing.RouteValueDictionary values) + 0xd9 bytes
> System.Web.Http.WebHost.DLL!System.Web.Http.WebHost.Routing.HostedHttpRouteCollection.GetVirtualPath(System.Net.Http.HttpRequestMessage request, string name, System.Collections.Generic.IDictionary<string,object> values) Line 114 + 0x22 bytes C#


Comments: verified

Edited Issue: Value validator should swallow exceptions from getters when traversing tree [611]

$
0
0
Otherwise the exception bubbles up and request fails

Closed Issue: 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: Verified.

Closed Issue: 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.
Comments: Verified.
Viewing all 7215 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>