Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Self hosting web application using Hostable Web Core

Am trying to host a web application (aspx web form) using hostable web core feature.

Using this when i tried to load the aspx page, am getting error

error details :

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

Then i changed the CodeBehind attribute to CodeFile , after that am getting this error :

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

In the same application am having a test page in html format. When i tried to access that page, it's rendering properly.

Here am adding my configuration file also

AppHostAspNet.config

like image 849
thejustv Avatar asked Mar 18 '17 10:03

thejustv


1 Answers

After some code changes and some configuration changes now it's working.

Here am attaching the working sample. Sample

In Program.cs change the code physical path

WebServer server = new WebServer( @"C:\project_path", port, siteId );
like image 132
thejustv Avatar answered Oct 20 '22 00:10

thejustv