Unable to connect to the web server. What would you like to do?

Vote:
 

Hi

I am getting below mentioned error message when clicking on edit view in EPiserver7.0 site.I am using IIS Express.

Error:Unable to connect to the web server. What would you like to do?

Could anyone help me to resolve this issue.

 

#88120
Jul 02, 2014 12:31
Vote:
 

Is the site running fine in "normal" mode? Did you install the application core files for EPiServer? Any StackTrace?

#88122
Jul 02, 2014 12:45
Vote:
 

extremely sorry bodahl

Actually i am getting this error in normal mode.

I have installed EPiserver7.0 CMS,Framework,CMO and Search.

Please let me know how to install application core files.

No stack trace.

#88124
Jul 02, 2014 12:58
Vote:
 

Have a look in the browser log console log or network log (press F12 to open it).

You'll probably see a failed request (500), and you can also see the server stack trace.

 

#88129
Jul 02, 2014 14:06
Vote:
 

How did you set up your site?

Have you seen the guides here? http://world.episerver.com/Documentation/CMS/Get-started-with-CMS/Introduction/

#88132
Jul 02, 2014 14:27
Vote:
 

I have migrated EPiserver5.2 to 6.0 and then 7.0.

This is a migrated site.

#88135
Jul 02, 2014 15:24
Vote:
 

A colleague of mine have a great blog post about migrating from 4 - 6. There might be some important parts for you there as well (Skipping the 4-5 part of course) http://www.epinova.no/blog/arild-henrichsen/dates/2010/9/migrating-between-episerver-4-5-6-is-as-easy-as-1-2-3-part-1/http://www.epinova.no/en/blog/arild-henrichsen/dates/2010/9/migrating-between-episerver-4-5-6-is-as-easy-as-1-2-3-part-2/

Was the site running ok at version 6? Did you go from 5 to 6 R1 to 6 R2 to 7? Have you switched your app.pool to .net 4? EPiServer 7 requires .net 4.

Joel has a blog post about going from 6 to 7. http://joelabrahamsson.com/upgrading-a-site-from-episerver-cms-6-to-episerver-7/

You need to give more details on your error. Can you post the full error message including the stacktrace?

#88137
Edited, Jul 02, 2014 16:21
Vote:
 

It is working fine in 6. I migrated it from 5 to 6 R1 to 6 R2 to 7.

I have converted framework from 3.5 to 4.5 and I have also changed appool to .net4.0

There is no console log or network log but I found something in event viewer which is mentioned below.

2014-07-03 07:14:54,721 [53] EPiServer.Global.Global_Error(:0)

- 1.2.5 Unhandled exception in ASP.NET

System.PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.

at System.Web.HttpResponse.get_Headers()

at System.Web.HttpResponseWrapper.get_Headers()

at EPiServer.Shell.Services.Rest.RestHttpHandler.ValidateAntiForgeryToken(HttpContextBase httpContext)

at EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContextBase httpContext)

at EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContext context)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

#88148
Jul 03, 2014 8:05
Vote:
 

Sounds like you have to set "Managed pipeline mode" on the application pool to "Integrated" 

#88152
Jul 03, 2014 8:56
Vote:
 

I think on development server we require IIS express to run the EPiserver7.0 web application.

when I am running application through IIS express I am getting below mentioned error.Earlier I was running in visual studio development server.

Internet Explorer cannot display the webpage.

 

Could you please help me to resolve this one.

#88161
Jul 03, 2014 11:39
Vote:
 

Did you change your web.config when going from .net 3.5 to 4.5?

It is hard to give advice with so little information. Turn on debug log in EPiSererLog.config. Is it logging anything at all?

Try to install an empty EPiServer demo site and compare the config files with your files.

What happens if you run the site in regular IIS?

#88162
Jul 03, 2014 11:58
Vote:
 

I know its a configuration issue but unable to find out.

No I did not change the web.config when going from .net 3.5 to 4.5?

Do you know what changeswe have to do in web.config when going from .net 3.5 to 4.5.

#88165
Jul 03, 2014 13:10
Vote:
 

Have you converted the config-file to run IIS 7 if you havent run on that environment before? You could actually tryt to install a clean episerver website and copy that config-file. Then your website should start and it might be easier to add your custom settings then try to find out the errors in your old web.config-file

#88167
Jul 03, 2014 13:39
Vote:
 

I copied the config of clean episerver site but it is giving the same error.Now It looks like its not configuration error as it is working fine on visual stdio development server.

It might be redirection issue when using IIS express.

Before giving error it shows ieframe.dll in browser tab for fraction of second.

Belwo is the event viewer warning:

Exception information:

Exception type: NullReferenceException

Exception message: Object reference not set to an instance of an object.

at EPiServerSample.Global.UrlRewriteModule_HttpRewriteInit(Object sender, UrlRewriteEventArgs e) in c:\Projects\App Teller7.0\Source\User Interface\TellerNo\Global.asax.cs:line 49

at EPiServer.Web.UrlRewriteModuleBase.OnHttpRewriteInit(UrlRewriteEventArgs e)

at EPiServer.Web.RoutingUrlRewriteModule.Init(HttpApplication application)

at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)

at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)

at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)

at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

#88177
Jul 04, 2014 9:26
Vote:
 

And what happens on line 49 in Global.asax.cs?

#88179
Jul 04, 2014 10:06
Vote:
 

What is you vs development server? Is it IIS Express or the old asp.net dev server? If it is working ok in the old you have some configuration error most likely. I would olso like to know what you are doing in global.asax since it looks like you have a rewrite module or something like that..

#88181
Jul 04, 2014 10:23
Vote:
 

This is my code in global.asax.cs file.

protected void Application_Start(Object sender, EventArgs e)

{

EPiServer.Web.UrlRewriteModule.HttpRewriteInit += new EventHandler(UrlRewriteModule_HttpRewriteInit);

}

///

/// This adds the hooks to the UrlRewriter instance

///

void UrlRewriteModule_HttpRewriteInit(object sender, EPiServer.Web.UrlRewriteEventArgs e)

{

UrlRewriteModuleBase module = sender as UrlRewriteModuleBase;

if (module != null)

{

module.HtmlAddingRewriteToExternalFilter += module_HtmlAddingRewriteToExternalFilter;

UrlRewriteProvider.ConvertedToExternal += UrlRewriteProvider_ConvertedToExternal;   line 49

}

}

///

/// Remove language from path if it is the default for the hostname.

///

private void UrlRewriteProvider_ConvertedToExternal(object sender, UrlRewriteEventArgs e)

{

if (e.IsModified)

{

string lang = LanguageSelection.GetLanguageFromHost();

if (e.Url.Path.StartsWith('/' + lang + '/'))

{

e.Url.Path = e.Url.Path.Substring(lang.Length + 1);

}

}

}

#88187
Jul 04, 2014 11:40
Vote:
 


This is my code in global.asax.cs file.

protected void Application_Start(Object sender, EventArgs e)

{

EPiServer.Web.UrlRewriteModule.HttpRewriteInit += new EventHandler(UrlRewriteModule_HttpRewriteInit);
}

///

/// This adds the hooks to the UrlRewriter instance

///

void UrlRewriteModule_HttpRewriteInit(object sender, EPiServer.Web.UrlRewriteEventArgs e)

{

UrlRewriteModuleBase module = sender as UrlRewriteModuleBase;

if (module != null)

{

module.HtmlAddingRewriteToExternalFilter += module_HtmlAddingRewriteToExternalFilter;

UrlRewriteProvider.ConvertedToExternal += UrlRewriteProvider_ConvertedToExternal; line 49

}

}

///

/// Remove language from path if it is the default for the hostname.

///

private void UrlRewriteProvider_ConvertedToExternal(object sender, UrlRewriteEventArgs e)

{

if (e.IsModified)

{

string lang = LanguageSelection.GetLanguageFromHost();

if (e.Url.Path.StartsWith('/' + lang + '/'))

{

e.Url.Path = e.Url.Path.Substring(lang.Length + 1);

}

}

}

#88193
Jul 04, 2014 12:36
Vote:
 

I would suggest you try and build the site.  Does it compile?  You must have left parts of your global.asax.cs out.

Read the docs on the UrlRewriteProvider of EPiServer.Global (that your global.asax.cs is derived from). There you can see that this property must not be called this early in the initialization.

EPiServer.Global on 7.0 SDK

Create an initialization module and call this code from there, make sure to add proper module dependencies. Read more about initialization and initialization modules here: Developer's Guide on Initialization Modules

For example: 

[ModuleDependency(typeof(EPiServer.Web.InitializationModule))]

Good luck!

#88199
Jul 04, 2014 14:18
Vote:
 

Now I am getting below mentioned error after I removed the code from application_start event and  rewrite section in web.config file. 

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.]
   EPiServer.Configuration.Settings.get_Instance() +49
   EPiServer.UriSupport.get_InternalUIUrl() +73
   EPiServer.SiteBase.OnValidateRequestAccess(ValidateRequestAccessEventArgs e) +141
   EPiServer.Global.Global_PreRequestHandlerExecute(Object sender, EventArgs e) +131
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

#88250
Jul 08, 2014 12:42
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.