Commit Graph

39740 Commits

Author SHA1 Message Date
ajcvickers 30dac08fe8 It's DbDatabase! (Updating for changes to database creation APIs) 2014-04-29 10:27:03 -07:00
Yishai Galatzer 297bb5d36d Layout compilation error not showing in browser - GitHub WebFX #286
An exception thrown in a layout (or for that matter anything that is a rendering time exception)
is not bubbling to the end user.

The reason is that the StreamWrite is flushing because it's in a dispose pattern.
The solution is to wrap the stream and prevent writes/flushes if an exception has been thrown.

At the same time we stop writing BOM out to html files by default.

Also specified charset explicitly - so there is matches the encoding of the page.
2014-04-29 10:26:22 -07:00
Praburaj b7a989256f Few changes with this checkin:
1. Enabling a work around to add an album to the store (Due to bug# https://github.com/aspnet/WebFx/issues/339) currently its not possible to create / edit an album in the store.
2. Removing a not necessary route from the webFx routes - A previous CR feedback.
2014-04-28 18:02:21 -07:00
Praburaj e324f989e7 EditorForModel and EditorFor Html helpers are available now.
EditorForModel and EditorFor Html helpers are available now. Updating the sample to use those helpers.
2014-04-28 17:04:55 -07:00
Chris Ross 19d49b06a6 #53 - Add Auth unit tests. 2014-04-28 16:19:00 -07:00
Chris Ross cfe76de294 #53 - Reduce auth exceptions for missing handlers. 2014-04-28 16:18:58 -07:00
Praburaj 80bccdd810 A bug in authorization filter fixed. Modifying sample to use the fix.
A bug in authorization filter at a controller level failing to honor a [AllowAnonymous]
override at an action level was fixed. Modifying the sample to use the fix.
2014-04-28 16:17:23 -07:00
Praburaj e57ca9ab61 A bug in Html Summary when trying to render error messages in a model state error bag is fixed.
Modifying the sample to use the fix.
2014-04-28 16:15:14 -07:00
Praburaj 92904e0d9e Bug in filtering a claim of a specific type and value is now fixed.
Modifying the sample to use the fix.
2014-04-28 16:12:08 -07:00
Chris Ross 8e23200fd2 #3 - Implement IHttpRequestLifetime 2014-04-28 14:54:33 -07:00
dougbu f7704ba68f Implement `Editor*()` HTML helpers
- copy over legacy `Editor*()` extensions and default editor templates
- get working in the new world
 - usual `var`, `String` -> `string`, `internal` -> `public`, namespaces, ...
 - longest overloads into `IHtmlHelper[<TModel>]` and implementation classes
 - clean up `ViewContext.ViewData` -> `ViewData`, trailing whitespace, long lines
 - remove `MultilineTextTemplate()` since `TextArea()` doesn't exist yet
 - remove `ColorInputTemplate()` since `Color` type doesn't exist
 - use `html.Label()`, not `LabelExtensions.LabelHelper()`: equivalent helper
   is protected.  only downside is potential `ModelMetadata` re-discovery.
 - rename `HtmlInputTemplateHelper()` -> `GenerateTextBox()`
- copy over `Html5DateRenderingMode` and `html.Html5DateRenderingMode` property
 - and get them working in new world
- hook the default editor templates up
- use `Editor()`, `EditorFor()`, `EditorForModel()` in MVC sample
 - add an on-disk editor template to MVC sample
2014-04-28 14:53:07 -07:00
Sebastien Ros b3046a0285 AllowAnonymous can override AuthorizeAttribute
#309
2014-04-28 14:04:10 -07:00
Sebastien Ros e5aeb738e3 Adding a unit test for AuthorizeAttribute
#314
2014-04-28 13:57:29 -07:00
Yishai Galatzer 3636440cae Fix bug# 289
The ordering algorithm was ignoring errors that came from user code,
and only respected errors from model properties
2014-04-28 12:51:55 -07:00
Sebastien Ros 4568e74954 Adding null check in ctor 2014-04-28 12:38:38 -07:00
Chris Ross e2d8020727 #20 - Enable SendFile on CoreClr. 2014-04-28 12:32:17 -07:00
Praburaj 4a26d740b5 Issue related to having multiple antiforgery token helpers in a single page is now fixed with latest build.
I'm uncommenting the code to accomodate the fix now.
2014-04-28 12:08:59 -07:00
David Fowler 8d53d40647 CR feedback 2014-04-28 11:19:36 -07:00
David Fowler cff4a21e08 Make razor roslyn compilation work on mono
- Added a metadata cache (we need this for core clr). Will consider
moving this into the core
- Skip pdb generation on mono
2014-04-28 11:19:36 -07:00
harshgMSFT 926b335101 Fix for Issue #319 2014-04-28 11:18:15 -07:00
Praburaj a0f5369a20 Model binding can now handle nullable enums. Bug (https://github.com/aspnet/WebFx/issues/256) was fixed to address this.
Deleting the comment and uncommenting the sample code.
2014-04-28 11:01:46 -07:00
dougbu 66ca046135 Reintroduce `IHtmlHelper` and use it everywhere possible
- no more `IHtmlHelper<object>` in `DefaultDisplayTemplates` and also no
  need for `ViewDataDictionary<object>` in a few places
- mostly removals from `IHtmlHelper<TModel>` but did cleanup comments and
  add `[NotNull]` for `DisplayFor()`, `DisplayNameFor()`,
  `DisplayNameForInnerType()`, and `LabelFor()`
- also add `[NotNull]` for `this` and `Expression` parameters in some
  extension methods
2014-04-28 10:57:36 -07:00
Praburaj 647ac5dac0 Modifying the Helios.cmd, Selfhost.cmd and CustomHost.cmd to start the application on different ports on different hosting models.
This will help us to root cause issues faster with fewer questions.
2014-04-28 10:32:59 -07:00
sornaks e21688ffb5 #190 Tighten protections around `ModelStateDictionary` additions 2014-04-28 08:46:47 -07:00
David Fowler fb3528f7f8 Added build.sh 2014-04-27 17:00:45 -07:00
David Fowler be5a98d38f Added build.sh 2014-04-26 20:52:00 -07:00
David Fowler 01daa33403 Added xml assembly since it's no included on mono by default 2014-04-26 13:03:51 -07:00
David Fowler e90fe3cefa Fixed issues with no finding main project k package if not on mono 2014-04-26 12:53:45 -07:00
David Fowler 90a149ab80 Added initial support for mono 2014-04-26 12:46:37 -07:00
Pranav K f740aabb79 Reviving RangeAttributeAdapter, RequiredAttributeAdapter,
StringLengthAttributeAdapter

* Adding remaining DataTypeAttribute adapter rules
2014-04-26 11:39:29 -07:00
Praburaj acb8421c90 Enabling Url.IsLocalUrl in the music store code 2014-04-25 15:58:20 -07:00
Yishai Galatzer a5afd3eb42 ActionResult implements IActionResult, and all our default implementations now use ActionResult
All controller methods return the specific ActionResult type
2014-04-25 15:57:02 -07:00
Pranav K f5ba63ea1e Fixing missing files in kproj
Fixing typo in sample filter
2014-04-25 14:48:14 -07:00
Ryan Nowak 8eecad9d83 Bringing back UrlHelper.IsLocalUrl
This has been compied verbatim from MVC (intentional). The tests have been
modernized a bit as well, but all the cases covered in the original are
there.

This may be moved to HttpAbstractions at some point in the future.
2014-04-25 14:29:00 -07:00
Praburaj 23fb4d8e7d 1. Enabling code to use the [Authorize] filter
2. Marked a few places with bug#s with work arounds
3. Making the app run on CoreCLR by default again (which I reverted by mistake in a previous submit).
2014-04-25 14:06:38 -07:00
harshgMSFT f26cc51e2e Introducing AntiForgery System :
- Config is cleaned up to not have IAdditionalDataProvider and SuppressIdentityChecks.

- Added a DefaultClaimUidExtractor which looks for NameIdentifier and if not present serializes entire claims.

- Added HtmlHelper.

- AntiForgery now returns an AntiForgeryTokenSet which represents a tuple of cookie and form tokens.
2014-04-24 18:12:11 -07:00
Pranav K d61915149c DictionaryBasedValueProvider results null when value is not found
* Guard against Dictionary returning null values
2014-04-24 18:10:06 -07:00
ajcvickers ab1af578dd Updating EntitySet/EntityContext to DbSet/DbContext 2014-04-24 17:25:33 -07:00
ajcvickers 9d25c0b1f1 Updating EntitySet/EntityContext to DbSet/DbContext 2014-04-24 17:19:01 -07:00
Chris Ross 78bb008681 #38 - Provide a default dictionary for HttpContext.Items that returns null for missing values. 2014-04-24 16:27:18 -07:00
Sebastien Ros 0fe028a4dd Implementing Authorize attribute
#272
2014-04-24 16:21:43 -07:00
Sebastien Ros f5200a1d55 Implementing IAuthorizationService
#7
2014-04-24 16:16:15 -07:00
Pranav K 2ba8780ee0 Reviving MinLength and MaxLength attribute adapters 2014-04-24 15:52:05 -07:00
Glenn 3e02b8a869 Update README.md 2014-04-24 15:32:05 -07:00
Pranav K b0c7dc9220 Make IModelBinder and IValueProvider methods async 2014-04-24 15:16:27 -07:00
Praburaj 8bd2d01b11 Adding the switch to turn on Helios errors when deployed to remote.
Currently the detailed errors are displayed only for local requests.
2014-04-24 14:53:19 -07:00
Chris Ross 8ad7b489e2 #18 - Add interfaces for request lifetime management. 2014-04-24 14:44:50 -07:00
Praburaj 470f217374 HttpContext.User is being populated with an anonymous identity with a recent change. So I dont have to check for null before.
Fixing the app accordingly.
2014-04-24 14:35:14 -07:00
ajcvickers cda544c04b IServiceProvider no longer available from EntityConfigurationBuilder. Using ISP passed to context instead. 2014-04-24 14:16:24 -07:00
N. Taylor Mullen d46389888d Modify search location for views.
When areas are not provided area locations are not searched for views.  Also
added tests for search locations in RazorViewEngine failures.
2014-04-24 14:03:36 -07:00