Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken links #1173

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aspnet/fundamentals/localization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The `IViewLocalizer <https://docs.asp.net/projects/api/en/latest/autoapi/Microso
.. literalinclude:: localization/sample/Views/Home/About.cshtml
:language: HTML

The default implementation of ``IViewLocalizer`` finds the resource file based on the view's file name. There is no option to use a global shared resource file. ``ViewLocalizer`` implements the localizer using `IHtmlLocalizer <IHtmlLocalizer>`__, so Razor doesn't HTML encode the localized string. You can parameterize resource strings and ``IViewLocalizer`` will HTML encode the parameters, but not the resource string. Consider the following Razor markup:
The default implementation of ``IViewLocalizer`` finds the resource file based on the view's file name. There is no option to use a global shared resource file. ``ViewLocalizer`` implements the localizer using `IHtmlLocalizer <https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Mvc/Localization/IHtmlLocalizer/index.html>`__, so Razor doesn't HTML encode the localized string. You can parameterize resource strings and ``IViewLocalizer`` will HTML encode the parameters, but not the resource string. Consider the following Razor markup:

.. code-block:: HTML

Expand Down Expand Up @@ -326,4 +326,4 @@ Additional Resources

- `Localization.StarterWeb project <https://github.com/aspnet/entropy>`__ used in the article.
- `Resource Files in Visual Studio <https://msdn.microsoft.com/en-us/library/xbx3z216(v=vs.110).aspx#VSResFiles>`__
- `Resources in .resx Files <https://msdn.microsoft.com/en-us/library/xbx3z216(v=vs.110).aspx#ResourcesFiles>`__
- `Resources in .resx Files <https://msdn.microsoft.com/en-us/library/xbx3z216(v=vs.110).aspx#ResourcesFiles>`__
2 changes: 1 addition & 1 deletion aspnet/fundamentals/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The call to the log method can utilize a format string with named placeholders (
:lines: 35
:dedent: 16

In your real world applications, you will want to add logging based on application-level, not framework-level, events. For instance, if you have created a Web API application for managing To-Do Items (see `Building Your First Web API with ASP.NET Core </tutorials/first-web-api>`_), you might add logging around the various operations that can be performed on these items.
In your real world applications, you will want to add logging based on application-level, not framework-level, events. For instance, if you have created a Web API application for managing To-Do Items (see :doc:`/tutorials/first-web-api`), you might add logging around the various operations that can be performed on these items.

The logic for the API is contained within the `TodoController`, which uses :doc:`dependency-injection` to request the services it requires via its constructor. Ideally, classes should follow this example and use their constructor to `define their dependencies explicitly <http://deviq.com/explicit-dependencies-principle/>`_ as parameters. Rather than requesting an `ILoggerFactory` and creating an instance of `ILogger` explicitly, `TodoController` demonstrates another way to work with loggers in your application - you can request an `ILogger<T>` (where `T` is the class requesting the logger).

Expand Down
2 changes: 1 addition & 1 deletion aspnet/fundamentals/middleware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Run, Map, and Use
You configure the HTTP pipeline using the extensions methods Run_, Map_, and Use_. By convention, the ``Run`` method is simply a shorthand way of adding middleware to the pipeline that doesn't call any other middleware (that is, it will not call a ``next`` request delegate). Thus, ``Run`` should only be called at the end of your pipeline. ``Run`` is a convention, and some middleware components may expose their own Run[Middleware] methods that should only run at the end of the pipeline. The following two examples (one using ``Run`` and the other ``Use``) are equivalent to one another, since the second one doesn't use its ``next`` parameter:

.. _Run: https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Builder/RunExtensions/index.html#meth-Microsoft.AspNet.Builder.RunExtensions.Run
.. _Map: Map https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Builder/MapExtensions/index.html#meth-Microsoft.AspNet.Builder.MapExtensions.Map
.. _Map: https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Builder/MapExtensions/index.html#meth-Microsoft.AspNet.Builder.MapExtensions.Map
.. _Use: https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Builder/UseExtensions/index.html#meth-Microsoft.AspNet.Builder.UseExtensions.Use


Expand Down
2 changes: 1 addition & 1 deletion aspnet/fundamentals/owin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Another example of how OWIN-based servers' features can be leveraged by ASP.NET
:linenos:
:emphasize-lines: 7, 9-10

This `sample <https://github.com/aspnet/Docs/tree/master/docs/fundamentals/owin/sample>`__ is configured using the same ``NowinServerFactory`` as the previous one - the only difference is in how the application is configured in its ``Configure`` method. A simple test using `a simple websocket client <https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en>`_ demonstrates that the application works as expected:
This `sample <https://github.com/aspnet/Docs/tree/master/aspnet/fundamentals/owin/sample>`__ is configured using the same ``NowinServerFactory`` as the previous one - the only difference is in how the application is configured in its ``Configure`` method. A simple test using `a simple websocket client <https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en>`_ demonstrates that the application works as expected:

.. image:: owin/_static/websocket-test.png

Expand Down
2 changes: 1 addition & 1 deletion aspnet/fundamentals/request-features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ASP.NET Core defines a number of `HTTP feature interfaces <https://docs.asp.net/
`IHttpResponseFeature <https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Http/Features/IHttpResponseFeature/index.html>`_
Defines the structure of an HTTP response, including the status code, headers, and body of the response.

`IHttpAuthenticationFeature <https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Http/Features/IHttpAuthenticationFeature/index.html>`_
`IHttpAuthenticationFeature <https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Http/Features/Authentication/IHttpAuthenticationFeature/index.html>`_
Defines support for identifying users based on a ``ClaimsPrincipal`` and specifying an authentication handler.

`IHttpUpgradeFeature <https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNet/Http/Features/IHttpUpgradeFeature/index.html>`_
Expand Down
4 changes: 3 additions & 1 deletion aspnet/migration/http-modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ However, in ASP.NET Core a new configuration model is used in place of *Web.conf

The new :doc:`configuration system </fundamentals/configuration>` gives you these options to solve this:

* Directly inject the options into the middleware, as shown in the `next section <loading-middleware-options-through-direct-injection>`_.
* Directly inject the options into the middleware, as shown in the :ref:`next section <loading-middleware-options-through-direct-injection>`.
* Use the :ref:`options pattern <options-config-objects>`:

1. Create a class to hold your middleware options, for example:
Expand Down Expand Up @@ -262,6 +262,8 @@ The new :doc:`configuration system </fundamentals/configuration>` gives you thes

This is not limited to ``IOptions`` objects. Any other object that your middleware requires can be injected this way.

.. _loading-middleware-options-through-direct-injection:

Loading middleware options through direct injection
---------------------------------------------------
The options pattern has the advantage that it creates loose coupling between options values and their consumers.
Expand Down
4 changes: 2 additions & 2 deletions aspnet/mvc/controllers/filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ By `Steve Smith`_
:local:
:depth: 1

`View or download sample from GitHub <https://github.com/aspnet/Docs/tree/master/mvc/controllers/filters/sample>`_.
`View or download sample from GitHub <https://github.com/aspnet/Docs/tree/master/aspnet/mvc/controllers/filters/sample>`_.

How do filters work?
--------------------
Expand Down Expand Up @@ -321,4 +321,4 @@ Filters vs. Middleware

In general, filters are meant to handle cross-cutting business and application concerns. This is often the same use case for :doc:`middleware </fundamentals/middleware>`. Filters are very similar to middleware in capability, but let you scope that behavior and insert it into a location in your app where it makes sense, such as before a view, or after model binding. Filters are a part of MVC, and have access to its context and constructs. For instance, middleware can't easily detect whether model validation on a request has generated errors, and respond accordingly, but a filter can easily do so.

To experiment with filters, `download, test and modify the sample <https://github.com/aspnet/Docs/tree/master/mvc/controllers/filters/sample>`_.
To experiment with filters, `download, test and modify the sample <https://github.com/aspnet/Docs/tree/master/aspnet/mvc/controllers/filters/sample>`_.
2 changes: 1 addition & 1 deletion aspnet/performance/caching/response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Response Caching
:local:
:depth: 1

`View or download sample code <https://github.com/aspnet/Docs/tree/master/aspnet/mvc/performance/response-caching/sample>`_
`View or download sample code <https://github.com/aspnet/Docs/tree/master/aspnet/performance/caching/response-caching/sample>`_

What is Response Caching
------------------------
Expand Down
4 changes: 2 additions & 2 deletions aspnet/testing/integration-testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Refactoring is the process of changing an application's code to improve its desi

This code works, but it's far from how we would like to implement this kind of functionality in an ASP.NET application, even as simple a one as this is. Imagine what the ``Configure`` method would look like if we needed to add this much code to it every time we added another URL endpoint!

One option we can consider is adding `MVC <http://docs.asp.net/projects/mvc>`_ to the application, and creating a controller to handle the prime checking. However, assuming we don't currently need any other MVC functionality, that's a bit overkill.
One option we can consider is adding :doc:`MVC </mvc/index>` to the application, and creating a controller to handle the prime checking. However, assuming we don't currently need any other MVC functionality, that's a bit overkill.

We can, however, take advantage of ASP.NET Core :doc:`middleware </fundamentals/middleware>`, which will help us encapsulate the prime checking logic in its own class and achieve better `separation of concerns <http://deviq.com/separation-of-concerns/>`_ within the ``Configure`` method.

Expand Down Expand Up @@ -159,4 +159,4 @@ Additional Resources
--------------------

- :doc:`unit-testing`
- :doc:`/fundamentals/middleware`
- :doc:`/fundamentals/middleware`
2 changes: 1 addition & 1 deletion aspnet/testing/unit-testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ASP.NET Core has been designed with testability in mind, so that creating unit t
:local:
:depth: 1

`View or download sample code <sample>`__
`View or download sample code <https://github.com/aspnet/Docs/tree/master/aspnet/testing/unit-testing/sample>`__

Getting Started with Testing
----------------------------
Expand Down
4 changes: 2 additions & 2 deletions aspnet/tutorials/first-mvc-app/controller-methods-views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Run the application and navigate to the ``/Movies`` URL. Click an **Edit** link.
:language: HTML
:emphasize-lines: 1,6,10,17,24, 28

The ``<input>`` elements are in an ``HTML <form>`` element whose ``action`` attribute is set to post to the ``/Movies/Edit/id`` URL. The form data will be posted to the server when the ``Save`` button is clicked. The last line before the closing ``</form>`` element shows the hidden `XSRF <:doc:/security/anti-request-forgery>`__ token generated by the `Form Tag Helper <http://www.davepaquette.com/archive/2015/05/18/mvc-6-form-tag-helper.aspx>`__.
The ``<input>`` elements are in an ``HTML <form>`` element whose ``action`` attribute is set to post to the ``/Movies/Edit/id`` URL. The form data will be posted to the server when the ``Save`` button is clicked. The last line before the closing ``</form>`` element shows the hidden :doc:`XSRF </security/anti-request-forgery>` token generated by the `Form Tag Helper <http://www.davepaquette.com/archive/2015/05/18/mvc-6-form-tag-helper.aspx>`__.

Processing the POST Request
--------------------------------------
Expand All @@ -151,7 +151,7 @@ The following listing shows the ``[HttpPost]`` version of the ``Edit`` action me
:lines: 109-122
:dedent: 8

The ``[ValidateAntiForgeryToken]`` attribute validates the hidden `XSRF <:doc:/security/anti-request-forgery>`__ token generated by the anti-forgery token generator in the `Form Tag Helper <http://www.davepaquette.com/archive/2015/05/18/mvc-6-form-tag-helper.aspx>`__.
The ``[ValidateAntiForgeryToken]`` attribute validates the hidden :doc:`XSRF </security/anti-request-forgery>` token generated by the anti-forgery token generator in the `Form Tag Helper <http://www.davepaquette.com/archive/2015/05/18/mvc-6-form-tag-helper.aspx>`__.

The :doc:`model binding </mvc/models/model-binding>` system takes the posted form values and creates a ``Movie`` object that's passed as the ``movie`` parameter. The ``ModelState.IsValid`` method verifies that the data submitted in the form can be used to modify (edit or update) a ``Movie`` object. If the data is valid, the movie data is saved to the ``Movies`` collection of the database(``ApplicationDbContext`` instance). The new movie data is saved to the database by calling the ``SaveChanges`` method of ``ApplicationDbContext``. After saving the data, the code redirects the user to the ``Index`` action method of the ``MoviesController`` class, which displays the movie collection, including the changes just made.

Expand Down
4 changes: 2 additions & 2 deletions aspnet/tutorials/first-mvc-app/new-field.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Adding a New Field

By `Rick Anderson`_

In this section you'll use `Entity Framework <http://ef.readthedocs.org/en/latest/getting-started/index.html>`__ Code First Migrations to migrate some changes to the model classes so the change is applied to the database.
In this section you'll use `Entity Framework <http://ef.readthedocs.io/en/latest/getting-started.html>`__ Code First Migrations to migrate some changes to the model classes so the change is applied to the database.

By default, when you use Entity Framework Code First to automatically create a database, as you did earlier in this tutorial, Code First adds a table to the database to help track whether the schema of the database is in sync with the model classes it was generated from. If they aren't in sync, the Entity Framework throws an error. This makes it easier to track down issues at development time that you might otherwise only find (by obscure errors) at run time.

Expand Down Expand Up @@ -85,4 +85,4 @@ The ``migrations add`` command tells the migration framework to examine the curr

If you delete all the records in the DB, the initialize will seed the DB and include the ``Rating`` field. You can do this with the delete links in the browser or from SSOX.

Run the app and verify you can create/edit/display movies with a ``Rating`` field. You should also add the ``Rating`` field to the ``Edit``, ``Details``, and ``Delete`` view templates.
Run the app and verify you can create/edit/display movies with a ``Rating`` field. You should also add the ``Rating`` field to the ``Edit``, ``Details``, and ``Delete`` view templates.
6 changes: 3 additions & 3 deletions aspnet/tutorials/first-mvc-app/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Double tap the **http://localhost:1235/Movies HTTP POST 200** line and then tap

.. image:: search/_static/f12_rb.png

You can see the search parameter and `XSRF <:doc:../../security/anti-request-forgery>`__ token in the request body. Note, as mentioned in the previous tutorial, the `Form Tag Helper <http://www.davepaquette.com/archive/2015/05/18/mvc-6-form-tag-helper.aspx>`__ generates an `XSRF <:doc:../../security/anti-request-forgery>`__ anti-forgery token. We're not modifying data, so we don't need to validate the token in the controller method.
You can see the search parameter and :doc:`XSRF <../../security/anti-request-forgery>` token in the request body. Note, as mentioned in the previous tutorial, the `Form Tag Helper <http://www.davepaquette.com/archive/2015/05/18/mvc-6-form-tag-helper.aspx>`__ generates an :doc:`XSRF <../../security/anti-request-forgery>` anti-forgery token. We're not modifying data, so we don't need to validate the token in the controller method.

Because the search parameter is in the request body and not the URL, you can't capture that search information to bookmark or share with others. We'll fix this by specifying the request should be ``HTTP GET``. Notice how intelliSense helps us update the markup.

Expand All @@ -138,7 +138,7 @@ Now when you submit a search, the URL contains the search query string. Searchin

.. image:: search/_static/search_get.png

The `XSRF <:doc:../../security/anti-request-forgery>`__ token and any other posted form elements will also be added to the URL.
The :doc:`XSRF <../../security/anti-request-forgery>` token and any other posted form elements will also be added to the URL.

Adding Search by Genre
--------------------------
Expand Down Expand Up @@ -183,4 +183,4 @@ Add an ``Html.DropDownList`` helper to the *Views/Movies/Index.cshtml* file. The

.. note:: The next version of this tutorial will replace the ``Html.DropDownList`` helper with the `Select Tag Helper <http://www.davepaquette.com/archive/2015/05/18/mvc6-select-tag-helper.aspx>`__.

Test the app by searching by genre, by movie title, and by both.
Test the app by searching by genre, by movie title, and by both.
2 changes: 1 addition & 1 deletion aspnet/tutorials/first-web-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ASP.NET Core has built-in support for MVC building Web APIs. Unifying the two fr
:local:
:depth: 1

`View or download sample code <https://github.com/aspnet/Docs/tree/master/aspnet/mvc/getting-started/first-web-api/sample>`__
`View or download sample code <https://github.com/aspnet/Docs/tree/master/aspnet/tutorials/first-web-api/sample>`__

Overview
--------
Expand Down
6 changes: 3 additions & 3 deletions webhooks/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Nuget Packages
Microsoft ASP.NET WebHooks is also available as preview Nuget packages which means that you have to select the Preview
flag in Visual Studio in order to see them.

The `Nuget packages <http://nuget.org/packages/Microsoft.AspNet.WebHooks>`_ are devided into three parts:
The `Nuget packages <https://nuget.org/packages?q=Microsoft.AspNet.WebHooks>`_ are devided into three parts:

* `Common <https://www.nuget.org/packages?q=Microsoft.AspNet.WebHooks.Common>`_: A common package that is shared between senders and receivers.

* `Sender <https://www.nuget.org/packages?q=Microsoft.AspNet.WebHooks.Custom>`_ A set of packages supporting sending your own WebHooks to others.
* `Sender <https://www.nuget.org/packages?q=Microsoft.AspNet.WebHooks.Custom>`_: A set of packages supporting sending your own WebHooks to others.
The functionality for sending WebHooks is described in more detail in :doc:`sending/index`.

* `Receivers <https://www.nuget.org/packages?q=Microsoft.AspNet.WebHooks.Receivers>`_ A set of packages supporting receiving WebHooks from others.
* `Receivers <https://www.nuget.org/packages?q=Microsoft.AspNet.WebHooks.Receivers>`_: A set of packages supporting receiving WebHooks from others.
The functionality for receiving WebHooks is described in more detail in :doc:`receiving/index`.