2017-03-18 25 views
6
kullanarak web uygulaması barındırma

Bir web uygulaması (aspx web formu) barındırılabilir web çekirdek özelliği kullanarak ev sahipliği yapmaya çalışıyorum.Kendi web uygulaması Hostable Web Core

i aspx sayfa yüklemeye çalıştığında hatayı

hata ayrıntılarını alıyorum, bu kullanarak:

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

Sonra ben bu aksam sonra, CodeFileiçin CodeBehind niteliğini değiştirdi bu hatayı alma:

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

Aynı uygulamada html formatında bir test sayfası yaşıyorum. Bu sayfaya erişmeye çalıştığımda, düzgün bir şekilde oluşturuluyor. İşte

bazı kod değişiklikleri ve şimdi işe yarıyor bazı yapılandırma değişikliklerden sonra benim yapılandırma dosyasını da

AppHostAspNet.config

+0

'hostable web çekirdek değiştirmek ? Daha fazla detay verebilir misiniz? ArcGIS sunucu lisansının olmaması nedeniyle – Win

+1

, HWC kullanarak kendini bir barındırma uygulaması olarak barındırmaya çalışıyoruz – thejustv

cevap

2

ekliyorum.

İşte çalışma örneğini ekliyorum. Sample

Program.cs

IIS içinde barındırması planya muyuz feature.` kod fiziksel yolunu

WebServer server = new WebServer(@"C:\project_path", port, siteId); 
İlgili konular