0

フォームベースの認証を使用してasp.netサイトを開発しました。このサイトは、Visual Studioの組み込みサーバーから実行すると機能しますが、IISサーバーに展開すると、ログインしようとすると次のエラーが表示されます。

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

asp.netのデフォルトテンプレートを使用していますが、web.configファイルを介してユーザー認証を構成しました。

<authentication mode="Forms">
  <forms loginUrl="~/Login.aspx" 
         name=".ASPXAUTH"
         path="/"
         requireSSL="false"
         slidingExpiration="true"
         defaultUrl="~/Admin/OrderHistory.aspx"
         cookieless="UseDeviceProfile"
         enableCrossAppRedirects="false"
         >
    <credentials passwordFormat="Clear">
      <user name="Admin" password="adm123$"/>
      <user name="Administrator" password="adm234%"/>
    </credentials>
  </forms>
</authentication>

インプ情報

VSビルトインサーバーを使用してログオンできますが、IISを使用してログインできません

編集

こんにちは、プロセスモデルIDをNetworkServiceに変更した後、以前のエラーはなくなりましたが、ログインできません

間違ったクレデンシャルエラーメッセージが表示されるたびに

ユーザー名とパスワードを取得するためにasp.netメンバーシップログインコントロールを使用しているim

VSビルトインサーバーでの動作

4

1 に答える 1

1

ローカル PC からライブ データベースに接続してみてください。これは、使用しているユーザー名/パスワードに関係があるかどうか、または IIS 構成を行う必要があるかどうかを明確にします。

このリンクを確認することもできますhttp://blogs.iis.net/bills/archive/2009/10/07/error-connecting-to-sql-server-from-windows-7-windows-2008-r2-with- asp-net.aspx

于 2012-05-28T10:09:11.580 に答える