2017-03-18 5 views
6

ホスト可能なWebコア機能を使用してWebアプリケーション(aspx Webフォーム)をホストしようとしています。Hostable Webコアを使用した自己ホスティングWebアプリケーション

responce : 502

The connection to 'localhost' failed. Error: ConnectionRefused (0x274d). System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it 127.0.0.1:8080

その後、私はその午前の後、CodeFile分離コード属性を変更:私はaspxページをロードしようとしたとき、エラーに

エラーの詳細を取得しています、これを使用して

このエラーを取得:

Object reference not set to an instance of an object.

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.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.]
System.Web.HttpResponse.ApplyRedirectQueryStringIfRequired(String url) +144 System.Web.HttpResponse.Redirect(String url, Boolean endResponse) +546
System.Web.Security.FormsAuthenticationModule.OnLeave(Object source, EventArgs eventArgs) +1730
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +412 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +229

同じアプリケーションでは、html形式のテストページを持っています。そのページにアクセスしようとすると、正しくレンダリングされます。ここで

も、今では働いているいくつかのコードの変更と、いくつかの設定の変更後

AppHostAspNet.config

+0

コードの物理パスを変更しますか?あなたはもっと詳しく説明できますか? – Win

+1

は、ArcGISサーバーライセンスが不足しているため、当面はHWCを使用して自己ホスティングアプリケーションとしてホストしようとしています – thejustv

答えて

2

を自分の設定ファイルを追加しています。

ここでは作業サンプルを添付しています。 Program.csのでSample

は、IISでホストするために滑走ないです `ホスト可能なウェブコアfeature.`

WebServer server = new WebServer(@"C:\project_path", port, siteId); 
関連する問題