.NET Framework 4.0を使用しているIIS7アプリケーションがあります。アプリケーションプールは、アプリケーションのフォルダに権限(読み取り/書き込み/実行)を持ち、データベースに対する権限(選択/読み取り/接続)を持っています。 IIS7はaspxファイルを受け入れますが、サーバの外部からtiを呼び出すと、すべてがうまくいくように見えますが、404エラーが表示されます。私は、サーバーに行くとhttp://localhostリンクを呼び出すと、私はデフォルト-defaut.htmlファイルを呼び出す場合オブジェクト参照がオブジェクトのインスタンスに設定されていないことを示すIIS7
は、私はこのエラー
Server Error in '/Phonebook/PhoneBook' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhanded 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.NullReferenceException: Object reference not set to an instance of an object.
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.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
PhoneBookApplication.DBUtils.Execute(SqlCommand command) +399
PhoneBookApplication._Default.FillddlSearch() +156
PhoneBookApplication._Default.Page_Load(Object sender, EventArgs e) +54
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
System.Web.UI.Control.LoadRecursive() +70
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3047
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
を取得し、それは動作しますが、私は、デフォルト-defautを呼び出さない場合.aspx。しかし、daufaultのページ設定では、aspxとhtmlの両方があります。
はまた、SQL Serverとは何かを持っているようだが、私はこれをやっていることは考えている
ことをデバッグするために見てどこ理解していません。助けてもらえますか?
テーブルでselectを行い、サーバーから使用しているデータベースに自分のマシンから試してみましたが、正常に動作しています。クラスはまた、うまく動作する他のアプリケーションのために私はそれを使用しているので、エラーは発生しません。 – Hugo
@Hugoは、使用されるパラメータをチェックします。それらは正しく初期化されていないものです。おそらく存在するはずのクッキーはありませんか? (クッキーはドメイン名と連動しているので、ある種のenvrionementで動作すると意味があります)コードを実行すると助けになります – David
エラーが見つかりませんでした。アプリケーションを実行してもストアドプロシージャを実行するアクセス権がありませんでした。 – Hugo