Справка: Как включить аутентификацию Windows на Сервере разработки ASP.NET?

Благодаря @PaulAsjes мне удалось собрать хорошее решение.

Окончательный вариант выглядит следующим образом: для всех, кому интересно.

const CardDetail = ({ stripe }) => {
  /* new state, ready */
  const [{ ready, token }, setState] = React.useState({
    ready: false,
  });

  const submit = () => {
    stripe.createToken({ name: "Name" }).then(({ token }) => {
      setState({ token });
    });
  };
  /* I added this */
  const onReady = () => setState({ error, ready: true });

  return (
    <div>
      <label>
        <p>Please provide your card details.</p>
        {/* this shows/hides my spinner */}
        {!ready && <MyLoadingSpinner size="small" />}
        {/* and listen here ↓ */}
        <CardElement onReady={onReady} style={{ base: { fontSize: "20px" } }} />
      </label>
      <button onClick={submit}>
        Save Card
      </button>
    </div>
  );
};
11
задан 12 May 2009 в 22:38
поделиться

2 ответа

ASP.Net Development Server is very limited. It only serves requests originating from the same machine that it is running on, and it will not serve files that are outside of its application scope. It is based on the Cassini server. Cassini does not support WCF web services. Documentation for ASP.Net Development Server says that it does support NTLM. If you are just browsing to a page from the local machine it should work fine unless the page is referencing an unavailable resource.

check out http://msdn.microsoft.com/en-us/library/58wxa9w5.aspx for more info.

4
ответ дан 3 December 2019 в 06:47
поделиться

Я бы установил и настроил IIS на вашем локальном устройстве Dev и использую это в предпочтении для использования встроенного веб-сервера. Чтобы использовать локальные IIS для отладки Выберите «Пользовательский локальный IIS Web Server» на веб-вкладке «Свойства проекта». Использование IIS, а не встроенный веб-сервер, также означает, что вы можете настроить свое приложение точно так же, как он будет настроен на производственном сервере, и это уменьшит никакие потенциальные сюрпризы, когда вы переходите в производственную среду.

2
ответ дан 3 December 2019 в 06:47
поделиться
Другие вопросы по тегам:

Похожие вопросы: