Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Action method with return type string returns in JSON format #906

Closed
balachir opened this issue Aug 1, 2014 · 5 comments
Closed

Action method with return type string returns in JSON format #906

balachir opened this issue Aug 1, 2014 · 5 comments

Comments

@balachir
Copy link

balachir commented Aug 1, 2014

This behavior seems to be new in recent builds. By design or bug?

WTE.Main.10730

1.Lauch vs and create a vNext empty application
2.Open project.json and add
"Microsoft.AspNet.Mvc": "6.0.0-alpha3-10550",
3.Insert code in Startup.cs
public class Startup
{
public void Configure(IBuilder app)
{
app.UseServices(services =>
{
services.AddMvc();
});
app.UseMvc();
}
}
public class HomeController
{
public string Index()
{
return "Hello World" + DateTime.Now;
}
}
4.F5

ACTUAL

.json file download and open it ,it shows with " " added.
image

@kichalla
Copy link
Member

kichalla commented Aug 1, 2014

the logic of returning text/plain based content has been moved to a new formatter #868 which is not yet checked in i think...

@yishaigalatzer
Copy link
Contributor

@harshgMSFT - Did we put it in the formatting without the text/plain formatter?

@yishaigalatzer yishaigalatzer added this to the 6.0.0-alpha3 milestone Aug 1, 2014
@yishaigalatzer
Copy link
Contributor

please fix this immediately so this makes it into the current milestone

@harshgMSFT
Copy link
Contributor

@balachir this should be fixed now .. can you please verify and close?

@harshgMSFT harshgMSFT assigned balaTest and unassigned harshgMSFT Aug 1, 2014
@danroth27 danroth27 modified the milestones: 6.0.0-alpha3, 6.0.0-alpha4 Aug 12, 2014
@balachir
Copy link
Author

Verified that this is fixed with VS CTP3 build.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants